#19930 closed defect (fixed)
Host-only networking virtual device inserts incorrect UDP checksum (checksum offloading) in rare case
回報者: | Pierre L | 負責人: | |
---|---|---|---|
元件: | network/hostif | 版本: | VirtualBox 6.1.10 |
關鍵字: | checksum offloading | 副本: | |
Guest type: | all | Host type: | all |
描述
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.
附加檔案 (3)
更動歷史 (5)
4 年 前 由 編輯
4 年 前 由 編輯
附檔: | 新增 illegalchecksum.pcap |
---|
packet capture (one packet) where the incorrect data appears
comment:1 4 年 前 由 編輯
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.
VirtualBox log of the sending VM