milos-linux/net/phonet
Santosh Kalluri 71de0177b2 net: phonet: free phonet_device after RCU grace period
phonet_device_destroy() removes a phonet_device from the per-net device
list with list_del_rcu(), but frees it immediately. RCU readers walking
the same list can still hold a pointer to the object after it has been
removed, leading to a slab-use-after-free.

Use kfree_rcu(), matching the lifetime rule already used by
phonet_address_del() for the same object type.

Fixes: eeb74a9d45 ("Phonet: convert devices list to RCU")
Cc: stable@vger.kernel.org
Signed-off-by: Santosh Kalluri <santosh.kalluri129@gmail.com>
Acked-by: Rémi Denis-Courmont <remi@remlab.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-08 17:37:07 -07:00
..
af_phonet.c bonding: prevent potential infinite loop in bond_header_parse() 2026-03-16 19:29:45 -07:00
datagram.c net: remove addr_len argument of recvmsg() handlers 2026-03-02 18:17:17 -08:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pep-gprs.c net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
pep.c phonet/pep: disable BH around forwarded sk_receive_skb() 2026-05-21 07:38:21 -07:00
pn_dev.c net: phonet: free phonet_device after RCU grace period 2026-06-08 17:37:07 -07:00
pn_netlink.c phonet: do not call synchronize_rcu() from phonet_route_del() 2024-11-07 20:34:16 -08:00
socket.c net: phonet: do not BUG_ON() in pn_socket_autobind() on failed bind 2026-04-27 18:45:17 -07:00
sysctl.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00