mirror-linux/net/bluetooth/bnep
Jann Horn 59e932ded9 Bluetooth: bnep: Fix UAF read of dev->name
bnep_add_connection() needs to keep holding the bnep_session_sem while
reading dev->name (just like bnep_get_connlist() does); otherwise the
bnep_session() thread can concurrently free the net_device, which can for
example be triggered by a concurrent bnep_del_connection().

(This UAF is fairly uninteresting from a security perspective;
calling bnep_add_connection() requires passing a capable(CAP_NET_ADMIN)
check. It also requires completely tearing down a netdev during a fairly
tight race window.)

Cc: stable@vger.kernel.org
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2026-05-20 16:35:47 -04:00
..
Kconfig
Makefile
bnep.h Bluetooth: Replace zero-length array with flexible-array member 2020-02-28 08:30:02 +01:00
core.c Bluetooth: bnep: Fix UAF read of dev->name 2026-05-20 16:35:47 -04:00
netdev.c netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
sock.c Bluetooth: Consolidate code around sk_alloc into a helper function 2023-08-11 11:36:50 -07:00