Netfilter: Fix for NAT core on nonlinear skbs
Subsystems (2)
PATCH 16/18 Netfilter: Fix for NAT core on nonlinear skbs
Name: Fix for NAT core on nonlinear skbs
Status: Tested under nfsim
Signed-off-by Rusty Russell <[email protected]>
The nat core calls skb_ip_make_writable() with a length too short. Found by nfsim.
net/ipv4/netfilter/ip_nat_core.c +1 -1
@@ -466,7 +466,7 @@struct iphdr *iph; (*pskb)->nfcache |=NFC_ALTERED ; -if (!skb_ip_make_writable (pskb, iphdroff+sizeof (iph))) +if (!skb_ip_make_writable (pskb, iphdroff+sizeof (*iph)))return 0 ; iph = (void *)(*pskb)->data + iphdroff;