netfilter: nf_tables: fix memleak when more than 255 elements expired
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5f68718b34a531a556f2f50300ead2862278da26 · < 4aea243b6853d06c1d160a9955b759189aa02b14| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: fix memleak when more than 255 elements expired
When more than 255 elements expired we're supposed to switch to a new gc container structure.
This never happens: u8 type will wrap before reaching the boundary and nft_trans_gc_space() always returns true.
This means we recycle the initial gc container structure and lose track of the elements that came before.
While at it, don't deref 'gc' after we've passed it to call_rcu.
From the CVE record · Linux
The Linux kernel's nf_tables garbage collection leaks memory when more than 255 elements expire: an 8-bit counter wraps, and the initial container is reused, losing track of earlier elements. The input does not establish how an attacker could trigger this condition or whether network access, authentication, or user interaction is required.
Anyone running the Linux kernel should check whether their version is affected; affected versions are not specified in the input.