HIGH Introduced in 5.3
netfilter CtExpect UAF
CVE-2026-90237
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_ct: move custom expectation support to helper Originally, the ct expectation support called nf_ct_helper_ext_add() for confirmed conntracks, which is invalid, triggering a splat. This was fixed by commit 1710eb913bdc ("netfilter: nft_ct: skip expectations for confirmed conntrack") which restricted it to unconfirmed conntracks. However, early insertion of expectations into the expectations list when the conntrack is unconfirmed leads to stale entries pointing to the wrong hlist_head through .pprev due to ct extension reallocation. Commit 7c9664351980 ("netfilter: move nat hlist_head to nf_conn") moved the nat hlist_head to nf_conn for this reason: 1. ... 2. When reallocation of extension area occurs we need to fixup the bysource hash head via hlist_replace_rcu. I'd rather not increase the size of the struct nf_conn for this feature has very limited scope: only one expectation can be created at a time given expect_clash() will make nf_ct_expect_related() reports EBUSY. For this reason, relax nf_ct_expect_related() not to drop packets in case expectation creation fails, therefore, expectation creation becomes best effort. To address this issue, add an internal ct helper and attach it to the conntrack entry to streamline the custom ct expectation support with existing ct helpers. Expose a new nf_conntrack_helper_release() function to release the internal helper that is allocated and attached to the conntrack entry to create the custom expectations. The nft_ct module removal always waits for rcu grace period, then the NULL helper callback is observed after this. This patch also restricts the creation of expectations to different helpers other than this custom helper that is created for this type of expectations.
02KernelScan AI Analysis
Risk summary
A local user who can obtain CAP_NET_ADMIN inside a user namespace can install nftables conntrack expectation rules and generate matching traffic to trigger a use-after-free in the kernel's conntrack expectations list. This can lead to kernel memory corruption, information disclosure, or denial of service, and may enable container or namespace escape. Systems that allow unprivileged user namespaces or run untrusted container workloads are most at risk.
Vulnerability analysis
The nftables conntrack expectation feature creates expectations on unconfirmed conntrack entries during packet processing. When the conntrack extension area is subsequently reallocated to accommodate additional extensions, previously inserted expectation entries retain stale back-pointers into the now-freed old extension memory, creating a use-after-free in the conntrack expectations hash list. The fix moves expectation creation into an internal conntrack helper attached through the standard helper infrastructure, eliminating the early insertion that caused the stale pointers; expectation creation also becomes best-effort so that failures no longer drop packets. The vulnerable path is reachable from a local user with CAP_NET_ADMIN in a user namespace by installing an nftables rule with a ct expectation object and generating matching traffic.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.2 | 5.3 | 7.2.6 | af3fe52fd108 |
| mainline | 5.3 | 7.3-rc1 | 3679da4ad8be |