• Guillaume Nault's avatar
    netfilter: ipv6: nf_defrag: accept duplicate fragments again · 9f150b4b
    Guillaume Nault authored
    [ Upstream commit 8a3dca632538c550930ce8bafa8c906b130d35cf ]
    
    When fixing the skb leak introduced by the conversion to rbtree, I
    forgot about the special case of duplicate fragments. The condition
    under the 'insert_error' label isn't effective anymore as
    nf_ct_frg6_gather() doesn't override the returned value anymore. So
    duplicate fragments now get NF_DROP verdict.
    
    To accept duplicate fragments again, handle them specially as soon as
    inet_frag_queue_insert() reports them. Return -EINPROGRESS which will
    translate to NF_STOLEN verdict, like any accepted fragment. However,
    such packets don't carry any new information and aren't queued, so we
    just drop them immediately.
    
    Fixes: a0d56cb911ca ("netfilter: ipv6: nf_defrag: fix leakage of unqueued fragments")
    Signed-off-by: 's avatarGuillaume Nault <gnault@redhat.com>
    Signed-off-by: 's avatarPablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    9f150b4b
Name
Last commit
Last update
..
ila Loading commit data...
netfilter Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
addrconf.c Loading commit data...
addrconf_core.c Loading commit data...
addrlabel.c Loading commit data...
af_inet6.c Loading commit data...
ah6.c Loading commit data...
anycast.c Loading commit data...
calipso.c Loading commit data...
datagram.c Loading commit data...
esp6.c Loading commit data...
esp6_offload.c Loading commit data...
exthdrs.c Loading commit data...
exthdrs_core.c Loading commit data...
exthdrs_offload.c Loading commit data...
fib6_notifier.c Loading commit data...
fib6_rules.c Loading commit data...
fou6.c Loading commit data...
icmp.c Loading commit data...
inet6_connection_sock.c Loading commit data...
inet6_hashtables.c Loading commit data...
ip6_checksum.c Loading commit data...
ip6_fib.c Loading commit data...
ip6_flowlabel.c Loading commit data...
ip6_gre.c Loading commit data...
ip6_icmp.c Loading commit data...
ip6_input.c Loading commit data...
ip6_offload.c Loading commit data...
ip6_offload.h Loading commit data...
ip6_output.c Loading commit data...
ip6_tunnel.c Loading commit data...
ip6_udp_tunnel.c Loading commit data...
ip6_vti.c Loading commit data...
ip6mr.c Loading commit data...
ipcomp6.c Loading commit data...
ipv6_sockglue.c Loading commit data...
mcast.c Loading commit data...
mcast_snoop.c Loading commit data...
mip6.c Loading commit data...
ndisc.c Loading commit data...
netfilter.c Loading commit data...
output_core.c Loading commit data...
ping.c Loading commit data...
proc.c Loading commit data...
protocol.c Loading commit data...
raw.c Loading commit data...
reassembly.c Loading commit data...
route.c Loading commit data...
seg6.c Loading commit data...
seg6_hmac.c Loading commit data...
seg6_iptunnel.c Loading commit data...
seg6_local.c Loading commit data...
sit.c Loading commit data...
syncookies.c Loading commit data...
sysctl_net_ipv6.c Loading commit data...
tcp_ipv6.c Loading commit data...
tcpv6_offload.c Loading commit data...
tunnel6.c Loading commit data...
udp.c Loading commit data...
udp_impl.h Loading commit data...
udp_offload.c Loading commit data...
udplite.c Loading commit data...
xfrm6_input.c Loading commit data...
xfrm6_mode_beet.c Loading commit data...
xfrm6_mode_ro.c Loading commit data...
xfrm6_mode_transport.c Loading commit data...
xfrm6_mode_tunnel.c Loading commit data...
xfrm6_output.c Loading commit data...
xfrm6_policy.c Loading commit data...
xfrm6_protocol.c Loading commit data...
xfrm6_state.c Loading commit data...
xfrm6_tunnel.c Loading commit data...