ubuntu 4.8 kernel, virtio_net error causes NAT packets to be lost
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Undecided
|
Jay Vosburgh | ||
Yakkety |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
SRU Justification:
Impact:
Configuring the 4.8 kernel with iptables MASQUERADE over virtio_net causes packets to be dropped by the hypervisor (host) due to improper flags being set based on the IP checksum state of the packet. The host performing MASQUERADE is affected by the bug.
Issue was introduced by
commit fd2a0437dc33b64
Author: Mike Rapoport <email address hidden>
Date: Wed Jun 8 16:09:18 2016 +0300
virtio_net: introduce virtio_
which first appears in v4.8-rc1
Fix:
Fixed upstream by
3e9e40e74753 virtio_net: Simplify call sites for virtio_
501db511397f virtio: don't set VIRTIO_
6391a4481ba0 virtio-net: restore VIRTIO_
3e9e40e74753 first appears in v4.9-rc5 (and is a prerequisite only), the others in v4.10-rc4.
Testcase:
Reproduction to date has been on GCE, although in principle it should manifest on any suitable topology using virtio_net. There is a dependency on the forwarded packets having skb->ip_summed == CHECKSUM_
On GCE, the following steps will induce the issue on an affected kernel:
Setup a network:
% gcloud compute networks create nat-network --mode legacy --range 10.240.0.0/16
% gcloud compute firewall-rules create nat-network-
% gcloud compute firewall-rules create nat-network-
Setup an Ubuntu 16.04 NAT VM:
% gcloud compute instances create nat-gateway-16 --zone us-central1-a --network nat-network --can-ip-forward --image-family ubuntu-1604-lts --image-project ubuntu-os-cloud --tags nat --metadata startup-
Setup a route to use the 16.04 NAT:
% gcloud compute routes create no-ip-internet-
Setup a simple test VM without any external network:
% gcloud compute instances create nat-client --zone us-central1-a --network nat-network --no-address --image-family ubuntu-1604-lts --image-project ubuntu-os-cloud --tags no-ip --metadata startup-
Wait for it to boot... maybe 30 seconds or so.
Look for serial port output:
% gcloud compute instances get-serial-
You will see that the connection to github never succeeds - it just gets stuck on "Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113" and will timeout. (ignore the previous attempt from the successful 14.04 based NAT).
Repeat the test by resettting the test client instance and watch for
serial output:
% gcloud compute instances reset nat-client --zone us-central1-a
Wait a minute or so for new boot, then check the serial-port-output as
above.
Changed in linux (Ubuntu): | |
assignee: | nobody → Jay Vosburgh (jvosburgh) |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu Yakkety): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu): | |
status: | Confirmed → Invalid |
This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:
apport-collect 1683947
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.