mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[NETFILTER]: nf_conntrack_ipv6: fix crash when handling fragments
When IPv6 connection tracking splits up a defragmented packet into its original fragments, the packets are taken from a list and are passed to the network stack with skb->next still set. This causes dev_hard_start_xmit to treat them as GSO fragments, resulting in a use after free when connection tracking handles the next fragment. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
656829e2d0
commit
f9f02cca25
1 changed files with 2 additions and 0 deletions
|
|
@ -835,6 +835,8 @@ void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb,
|
|||
s->nfct_reasm = skb;
|
||||
|
||||
s2 = s->next;
|
||||
s->next = NULL;
|
||||
|
||||
NF_HOOK_THRESH(PF_INET6, hooknum, s, in, out, okfn,
|
||||
NF_IP6_PRI_CONNTRACK_DEFRAG + 1);
|
||||
s = s2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue