OpenCloudOS-Kernel/drivers/net/xen-netback
Jeongjun Park 143edf098b net/xen-netback: prevent UAF in xenvif_flush_hash()
[ Upstream commit 0fa5e94a1811d68fbffa0725efe6d4ca62c03d12 ]

During the list_for_each_entry_rcu iteration call of xenvif_flush_hash,
kfree_rcu does not exist inside the rcu read critical section, so if
kfree_rcu is called when the rcu grace period ends during the iteration,
UAF occurs when accessing head->next after the entry becomes free.

Therefore, to solve this, you need to change it to list_for_each_entry_safe.

Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Link: https://patch.msgid.link/20240822181109.2577354-1-aha310510@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-10 11:57:22 +02:00
..
Makefile
common.h xen/netback: don't do grant copy across page boundary 2023-03-28 14:16:40 +02:00
hash.c net/xen-netback: prevent UAF in xenvif_flush_hash() 2024-10-10 11:57:22 +02:00
interface.c kthread: add kthread_stop_put 2024-06-12 11:12:52 +02:00
netback.c xen-netback: properly sync TX responses 2024-02-23 09:25:03 +01:00
rx.c xen/netback: don't call kfree_skb() with interrupts disabled 2022-12-06 16:00:33 +01:00
xenbus.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00