CVE-2023-54200: netfilter: nf_tables: always release netdev hooks from notifier
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftables: always release netdev hooks from notifier
This reverts "netfilter: nftables: skip netdev events generated on netns removal".
The problem is that when a veth device is released, the veth release callback will also queue the peer netns device for removal.
Its possible that the peer netns is also slated for removal. In this case, the device memory is already released before the preexit hook of the peer netns runs:
BUG: KASAN: slab-use-after-free in nfhookentryhead+0x1b8/0x1d0 Read of size 8 at addr ffff88812c0124f0 by task kworker/u8:1/45 Workqueue: netns cleanupnet Call Trace: nfhookentryhead+0x1b8/0x1d0 nfunregisternethook+0x76/0x510 nftnetdevunregisterhooks+0xa0/0x220 nftreleasehook+0x184/0x490 nftablespreexitnet+0x12f/0x1b0 ..
Order is: 1. First netns is released, vethdellink() queues peer netns device for removal 2. peer netns is queued for removal 3. peer netns device is released, unreg event is triggered 4. unreg event is ignored because netns is going down 5. preexit hook calls nftnetdevunregisterhooks but device memory might be free'd already.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2023-54200?
CVE-2023-54200 has an assigned risk score of 29, indicating a critical vulnerability.
How do I fix CVE-2023-54200?
To address CVE-2023-54200, update to the latest version of the Linux kernel that includes the patch for this vulnerability.
What type of vulnerability is CVE-2023-54200?
CVE-2023-54200 is classified as a Use After Free vulnerability in the Linux kernel.
Which software is affected by CVE-2023-54200?
CVE-2023-54200 affects the Linux kernel, specifically related to netfilter and nf_tables functionality.
What is the impact of CVE-2023-54200?
The impact of CVE-2023-54200 may lead to potential denial of service or execution of arbitrary code due to improper management of network device hooks.