Skip to content
Commit 7cfd9c11 authored by Dmitry Fleytman's avatar Dmitry Fleytman Committed by Michael Roth
Browse files

NetRxPkt: Fix memory corruption on VLAN header stripping



This patch fixed a problem that was introduced in commit eb700029.

When net_rx_pkt_attach_iovec() calls eth_strip_vlan()
this can result in pkt->ehdr_buf being overflowed, because
ehdr_buf is only sizeof(struct eth_header) bytes large
but eth_strip_vlan() can write
sizeof(struct eth_header) + sizeof(struct vlan_header)
bytes into it.

Devices affected by this problem: vmxnet3.

Cc: qemu-stable@nongnu.org
Reported-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarDmitry Fleytman <dmitry@daynix.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
(cherry picked from commit df8bf7a7)
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent bddf2232
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment