CVE-2024-56655: netfilter: nf_tables: do not defer rule destruction via call_rcu
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftables: do not defer rule destruction via callrcu
nftableschaindestroy can sleep, it can't be used from callrcu callbacks.
Moreover, nftablesrulerelease() is only safe for error unwinding, while transaction mutex is held and the to-be-desroyed rule was not exposed to either dataplane or dumps, as it deactives+frees without the required synchronizercu() in-between.
nftruleexprdeactivate() callbacks will change ->use counters of other chains/sets, see e.g. nftlookup .deactivate callback, these must be serialized via transaction mutex.
Also add a few lockdep asserts to make this more explicit.
Calling synchronizercu() isn't ideal, but fixing this without is hard and way more intrusive. As-is, we can get:
WARNING: .. net/netfilter/nftablesapi.c:5515 nftsetdestroy+0x.. Workqueue: events nftablestransdestroywork RIP: 0010:nftsetdestroy+0x3fe/0x5c0 Call Trace: <TASK> nftablestransdestroywork+0x6b7/0xad0 processonework+0x64a/0xce0 workerthread+0x613/0x10d0
In case the synchronizercu becomes an issue, we can explore alternatives.
One way would be to allocate nfttransrule objects + one nfttranschain object, deactivate the rules + the chain and then defer the freeing to the nft destroy workqueue. We'd still need to keep the synchronizercu path as a fallback to handle -ENOMEM corner cases though.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56655?
CVE-2024-56655 has been classified with a moderate severity level due to its potential impact on system stability.
How do I fix CVE-2024-56655?
To fix CVE-2024-56655, update your Linux kernel to a version that includes the patch addressing this vulnerability.
What versions are affected by CVE-2024-56655?
CVE-2024-56655 affects Linux kernel versions between 6.6.61 and 6.6.67, as well as version 6.11.8 to 6.12.6 and specific release candidates.
What components are involved in CVE-2024-56655?
CVE-2024-56655 involves the netfilter subsystem and its nf_tables implementation within the Linux kernel.
Is CVE-2024-56655 exploitable?
While CVE-2024-56655 is not directly exploitable for remote code execution, it may lead to stability issues impacting system performance.