From: Johannes Berg Date: Sun, 9 Dec 2012 23:41:06 +0000 (+0000) Subject: ipv4: ip_check_defrag must not modify skb before unsharing X-Git-Tag: v3.2.36~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bbb42f09dd86794f0ae82bdcbd511810d4ff2db;p=pandora-kernel.git ipv4: ip_check_defrag must not modify skb before unsharing [ Upstream commit 1bf3751ec90cc3174e01f0d701e8449ce163d113 ] ip_check_defrag() might be called from af_packet within the RX path where shared SKBs are used, so it must not modify the input SKB before it has unshared it for defragmentation. Use skb_copy_bits() to get the IP header and only pull in everything later. The same is true for the other caller in macvlan as it is called from dev->rx_handler which can also get a shared SKB. Reported-by: Eric Leblond Signed-off-by: Johannes Berg Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed