The main point of this patchset is patch 1, which fixes a bug where a
crafted packet whose header fields claimed a header length smaller
than its total length could cause us to set ip_len to a negative
value, which then (because of a signed vs unsigned comparison where
ip_len gets promoted to unsigned) makes it through range checks so
that we checksum 64K of data off the end of the packet buffer and then
write the two byte checksum also potentially off the end of the packet
buffer.

This is CVE-2026-127233. The code is used by at least xen-nic,
virtio-net and the COLO filter rewriter, as well as various
out-of-security-scope devices, though it's not clear whether the bug
is exploitable in all those scenarios.

Patch 2 fixes something noted by one of the reporters in passing,
which is that we don't account for IP options in figuring out the
offset of the TCP or UDP header in the packet, which means that we
will write the checksum to the wrong place. This is just incorrect
behaviour, not a security issue.

thanks
-- PMM

Peter Maydell (2):
  net/checksum.c: Correct handling of IP header length
  net/checksum: Correct handling of checksums when IP options present

 net/checksum.c | 46 ++++++++++++++++++++++++++++++++++------------
 1 file changed, 34 insertions(+), 12 deletions(-)

-- 
2.43.0


Reply via email to