Please sign in to comment.
netfilter: ipv6: nf_defrag: drop mangled skb on ream error
Dmitry Vyukov reported GPF in network stack that Andrey traced down to negative nh offset in nf_ct_frag6_queue(). Problem is that all network headers before fragment header are pulled. Normal ipv6 reassembly will drop the skb when errors occur further down the line. netfilter doesn't do this, and instead passed the original fragment along. That was also fine back when netfilter ipv6 defrag worked with cloned fragments, as the original, pristine fragment was passed on. So we either have to undo the pull op, or discard such fragments. Since they're malformed after all (e.g. overlapping fragment) it seems preferrable to just drop them. Same for temporary errors -- it doesn't make sense to accept (and perhaps forward!) only some fragments of same datagram. Fixes: 029f7f3 ("netfilter: ipv6: nf_defrag: avoid/free clone operations") Reported-by: Dmitry Vyukov <email@example.com> Debugged-by: Andrey Konovalov <firstname.lastname@example.org> Diagnosed-by: Eric Dumazet <Eric Dumazet <email@example.com> Signed-off-by: Florian Westphal <firstname.lastname@example.org> Acked-by: Eric Dumazet <email@example.com> Signed-off-by: Pablo Neira Ayuso <firstname.lastname@example.org>
- Loading branch information...
Showing with 3 additions and 3 deletions.