VirtualBox

Ticket #19930 (closed defect: fixed)

Opened 5 months ago

Last modified 4 weeks ago

Host-only networking virtual device inserts incorrect UDP checksum (checksum offloading) in rare case

Reported by: Pierre L Owned by:
Component: network/hostif Version: VirtualBox 6.1.10
Keywords: checksum offloading Cc:
Guest type: all Host type: all

Description

When using host-only networking with a transmitting guest OS that offloads the Internet checksum to hardware, in a certain rare case the inserted checksum is incorrect, such that it is discarded by the destination OS.

Instructions to reproduce:

  • send the attached packet (unfilledchecksum.pcap) through host-only networking, making sure the sending guest OS takes advantage of checksum offloading

expected behavior:

  • the packet is received by the other guest OS with checksum value 0xFFFF

observed behavior:

  • the packet is received by the other guest OS with checksum value 0x0000 as seen in illegalchecksum.pcap. As a result, packet is dropped by that other guest OS (Linux) and never reaches the destination socket.

Notes: as the UDP checksum scope includes the IP header, you will need to use the same source and destination addresses, among other data. The correct checksum value comes from Wireshark, and is consistent with this sentence in RFC 768: "If the computed checksum is zero, it is transmitted as all ones (the equivalent in one's complement arithmetic)"; as of revision 86228 of DevE1000.cpp, this does not appear to be observed. While this issue was uncovered with UDP, TCP would appear to have the same issue, though I have not similarly checked its standards documents. For what it's worth, both guest OS are Linux, and at no point were raw sockets used, only regular datagram sockets in the AF_INET6 domain. Seen with Version 6.1.12 r139181 (Qt5.6.2). I do not have the development environment in place to include a patch.

Attachments

Validation - main-2020-10-01-12-39-16.log Download (92.8 KB) - added by Pierre L 5 months ago.
VirtualBox log of the sending VM
unfilledchecksum.pcap Download (114 bytes) - added by Pierre L 5 months ago.
packet capture (one packet)
illegalchecksum.pcap Download (114 bytes) - added by Pierre L 5 months ago.
packet capture (one packet) where the incorrect data appears

Change History

Changed 5 months ago by Pierre L

VirtualBox log of the sending VM

Changed 5 months ago by Pierre L

packet capture (one packet)

Changed 5 months ago by Pierre L

packet capture (one packet) where the incorrect data appears

comment:1 Changed 3 months ago by aleksey

Indeed, e1000 code did not handle zero UDP checksum case correctly. The fix will be included into the next maintenance release. Please note, that this issue applies to UDP only where zero checksum means that no checksum was inserted, TCP does not consider zero checksum to be a special case.

comment:2 Changed 4 weeks ago by vushakov

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 6.1.18.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use