]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-net: Fix size check in dhclient workaround
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Fri, 22 Nov 2024 05:03:08 +0000 (14:03 +0900)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 25 Nov 2024 18:17:21 +0000 (21:17 +0300)
commitaac6bdec4cb37ac1f0c12d769589ab14c8a5bbad
treea2baf5608f1525af4f7d539effaf8b7be4862496
parent16da961911b2402eb1c87695a9bd0498bf7b0d63
virtio-net: Fix size check in dhclient workaround

work_around_broken_dhclient() accesses IP and UDP headers to detect
relevant packets and to calculate checksums, but it didn't check if
the packet has size sufficient to accommodate them, causing out-of-bound
access hazards. Fix this by correcting the size requirement.

Fixes: 1d41b0c1ec66 ("Work around dhclient brokenness")
Cc: qemu-stable@nongnu.org
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit a8575f7fb2f213e6690b23160b04271d47fdfaa8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/net/virtio-net.c