Paolo Abeni
a864e70eef
udp: fix race between close() and udp_abort()
...
Kaustubh reported and diagnosed a panic in udp_lib_lookup().
The root cause is udp_abort() racing with close(). Both
racing functions acquire the socket lock, but udp{v6}_destroy_sock()
release it before performing destructive actions.
We can't easily extend the socket lock scope to avoid the race,
instead use the SOCK_DEAD flag to prevent udp_abort from doing
any action when the critical race happens.
Change-Id: I8ec3f73ed5f8324722b29450c37b4ae23a81c0f3
Diagnosed-and-tested-by: Kaustubh Pandey <kapandey@codeaurora.org>
Fixes: 5d77dca828 ("net: diag: support SOCK_DESTROY for UDP sockets")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-Commit: a8b897c7bcd47f4147d066e22cc01d1026d7640e
Git-repo: https://kernel.googlesource.com/pub/scm/linux/kernel/git/netdev/net.git
Signed-off-by: Kaustubh Pandey <kapandey@codeaurora.org>
2021-07-14 05:28:07 -07:00
..
ila
netfilter
netfilter: x_tables: Switch synchronization to RCU
2020-12-30 11:50:54 +01:00
addrconf.c
This is the 5.4.80 stable release
2020-11-25 12:46:13 +01:00
addrconf_core.c
addrlabel.c
ipv6: addrlabel: fix possible memory leak in ip6addrlbl_net_init
2020-12-08 10:40:23 +01:00
af_inet6.c
ah6.c
ah6: fix error return code in ah6_input()
2020-11-24 13:28:55 +01:00
anycast.c
ipv6: fix memory leaks on IPV6_ADDRFORM path
2020-08-11 15:33:39 +02:00
calipso.c
netlabel: cope with NULL catmap
2020-05-20 08:20:08 +02:00
datagram.c
net: Indicate whether a socket is a transparent socket
2020-04-13 12:06:23 -07:00
esp6.c
esp6_offload.c
esp6: get the right proto for transport mode in esp6_gso_encap
2020-06-03 08:21:35 +02:00
exthdrs.c
exthdrs_core.c
exthdrs_offload.c
fib6_notifier.c
fib6_rules.c
fou6.c
icmp.c
UPSTREAM: net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending
2021-03-05 06:50:46 +01:00
inet6_connection_sock.c
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c
Merge android11-5.4.86+ ( 75c93eb) into msm-5.4
2021-04-22 09:44:51 +05:30
ip6_flowlabel.c
ip6_gre.c
net: ip6_gre: set dev->hard_header_len when using header_ops
2020-12-08 10:40:26 +01:00
ip6_icmp.c
ANDROID: GKI: bring back icmpv6_send
2021-03-05 06:50:46 +01:00
ip6_input.c
ip6_offload.c
ip6_offload.h
ip6_output.c
ip6_tunnel.c
gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY
2020-09-03 11:26:39 +02:00
ip6_udp_tunnel.c
ip6_vti.c
vti6: Fix memory leak of skb if input policy check fails
2020-04-01 11:02:12 +02:00
ip6mr.c
net: don't return invalid table id error when we fall back to PF_UNSPEC
2020-06-03 08:20:41 +02:00
ipcomp6.c
ipv6_sockglue.c
ipv6: fix memory leaks on IPV6_ADDRFORM path
2020-08-11 15:33:39 +02:00
Kconfig
net: ipv6: fix kconfig dependency warning for IPV6_SEG6_HMAC
2020-09-26 18:03:13 +02:00
Makefile
mcast.c
mld: fix memory leak in ipv6_mc_destroy_dev()
2020-06-30 15:36:43 -04:00
mcast_snoop.c
mip6.c
ndisc.c
Revert "Exempt multicast addresses from five-second neighbor lifetime"
2020-11-25 17:38:41 +01:00
netfilter.c
netfilter: use actual socket sk rather than skb sk when routing harder
2020-11-18 19:20:17 +01:00
output_core.c
ping.c
proc.c
protocol.c
raw.c
reassembly.c
route.c
This is the 5.4.58 stable release
2020-08-11 18:37:58 +02:00
seg6.c
seg6_hmac.c
seg6_iptunnel.c
seg6_local.c
sit.c
IPv6: Set SIT tunnel hard_header_len to zero
2020-11-18 19:20:32 +01:00
syncookies.c
net: Update window_clamp if SOCK_RCVBUF is set
2020-11-18 19:20:32 +01:00
sysctl_net_ipv6.c
ipv6: Fix sysctl max for fib_multipath_hash_policy
2020-09-12 14:18:55 +02:00
tcp_ipv6.c
net: Indicate whether a socket is a transparent socket
2020-04-13 12:06:23 -07:00
tcpv6_offload.c
tunnel6.c
udp.c
udp: fix race between close() and udp_abort()
2021-07-14 05:28:07 -07:00
udp_impl.h
udp_offload.c
UPSTREAM: udp: ipv4: manipulate network header of NATed UDP GRO fraglist
2021-05-04 15:19:30 -07:00
udplite.c
xfrm6_input.c
xfrm6_output.c
xfrm: Always set XFRM_TRANSFORMED in xfrm{4,6}_output_finish
2020-04-29 16:33:11 +02:00
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c