remarkable-linux/net
Wolfgang Bumiller 012e5e5b69 net: fix deadlock while clearing neighbor proxy table
[ Upstream commit 53b76cdf7e ]

When coming from ndisc_netdev_event() in net/ipv6/ndisc.c,
neigh_ifdown() is called with &nd_tbl, locking this while
clearing the proxy neighbor entries when eg. deleting an
interface. Calling the table's pndisc_destructor() with the
lock still held, however, can cause a deadlock: When a
multicast listener is available an IGMP packet of type
ICMPV6_MGM_REDUCTION may be sent out. When reaching
ip6_finish_output2(), if no neighbor entry for the target
address is found, __neigh_create() is called with &nd_tbl,
which it'll want to lock.

Move the elements into their own list, then unlock the table
and perform the destruction.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199289
Fixes: 6fd6ce2056 ("ipv6: Do not depend on rt->n in ip6_finish_output2().")
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-29 11:33:11 +02:00
..
6lowpan
9p 9p/trans_virtio: discard zero-length reply 2018-02-22 15:42:30 +01:00
802
8021q vlan: also check phy_driver ts_info for vlan's real device 2018-04-12 12:32:24 +02:00
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: Fix connection if directed advertising and privacy is used 2018-04-19 08:56:19 +02:00
bpf
bridge netfilter: compat: prepare xt_compat_init_offsets to return errors 2018-04-26 11:02:21 +02:00
caif
can can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once 2018-01-23 19:58:17 +01:00
ceph
core net: fix deadlock while clearing neighbor proxy table 2018-04-29 11:33:11 +02:00
dcb
dccp dccp: check sk for closed state in dccp_sendmsg() 2018-03-31 18:10:40 +02:00
decnet dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock 2018-02-25 11:07:52 +01:00
dns_resolver KEYS: DNS: limit the length of option strings 2018-04-29 11:33:10 +02:00
dsa net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00
ethernet
hsr
ieee802154 ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event() 2018-03-31 18:10:40 +02:00
ife
ipv4 tcp: md5: reject TCP_MD5SIG or TCP_MD5SIG_EXT on established sockets 2018-04-29 11:33:11 +02:00
ipv6 ipv6: sr: fix NULL pointer dereference in seg6_do_srh_encap()- v4 pkts 2018-04-29 11:33:10 +02:00
ipx
iucv net/iucv: Free memory obtained by kzalloc 2018-03-31 18:10:41 +02:00
kcm kcm: lock lower socket in kcm_attach 2018-03-31 18:10:40 +02:00
key af_key: fix buffer overread in parse_exthdrs() 2018-01-23 19:58:12 +01:00
l2tp l2tp: check sockaddr length in pppol2tp_connect() 2018-04-29 11:33:11 +02:00
l3mdev
lapb
llc llc: delete timers synchronously in llc_sk_free() 2018-04-29 11:33:11 +02:00
mac80211 mac80211: Fix setting TX power on monitor interfaces 2018-04-12 12:32:15 +02:00
mac802154
mpls mpls, nospec: Sanitize array index in mpls_label_ok() 2018-02-22 15:42:28 +01:00
ncsi
netfilter netfilter: x_tables: limit allocation requests for blob rule heads 2018-04-26 11:02:21 +02:00
netlabel
netlink netlink: make sure nladdr has correct size in netlink_connect() 2018-04-12 12:32:23 +02:00
netrom
nfc
nsh
openvswitch openvswitch: Remove padding from packet before L3+ conntrack processing 2018-04-26 11:02:15 +02:00
packet net: af_packet: fix race in PACKET_{R|T}X_RING 2018-04-29 11:33:11 +02:00
phonet
psample
qrtr
rds RDS: IB: Fix null pointer issue 2018-04-26 11:02:17 +02:00
rfkill
rose
rxrpc rxrpc: Don't put crypto buffers on the stack 2018-04-26 11:02:19 +02:00
sched net/sched: fix NULL dereference on the error path of tcf_skbmod_init() 2018-04-12 12:32:26 +02:00
sctp sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6 2018-04-12 12:32:24 +02:00
smc net/smc: fix NULL pointer dereference on sock_create_kern() error path 2018-03-15 10:54:28 +01:00
strparser strparser: Fix sign of err codes 2018-04-12 12:32:26 +02:00
sunrpc SUNRPC: Don't call __UDPX_INC_STATS() from a preemptible context 2018-04-26 11:02:19 +02:00
switchdev
tipc tipc: fix tipc_mon_delete() oops in tipc_enable_bearer() error path 2018-03-03 10:24:30 +01:00
tls tls: reset crypto_info when do_tls_setsockopt_tx fails 2018-01-31 14:03:48 +01:00
unix
vmw_vsock VSOCK: fix outdated sk_state value in hvs_release() 2018-02-25 11:07:59 +01:00
wimax
wireless nl80211: Check for the required netlink attribute presence 2018-03-03 10:24:34 +01:00
x25
xfrm xfrm: Refuse to insert 32 bit userspace socket policies on 64 bit systems 2018-04-08 14:26:29 +02:00
compat.c
Kconfig
Makefile
socket.c kmemcheck: remove annotations 2018-02-22 15:42:23 +01:00
sysctl_net.c