CVE-2026-31418
Description
In the Linux kernel, the following vulnerability has been resolved:
netfilter: ipset: drop logically empty buckets in mtype_del
mtype_del() counts empty slots below n->pos in k, but it only drops the bucket when both n->pos and k are zero. This misses buckets whose live entries have all been removed while n->pos still points past deleted slots.
Treat a bucket as empty when all positions below n->pos are unused and release it directly instead of shrinking it further.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Linux kernel netfilter ipset bug: mtype_del() fails to drop empty buckets when n->pos is non-zero, causing wasted memory.
Vulnerability
In the Linux kernel's netfilter ipset subsystem, the mtype_del() function has a logical flaw when removing entries from a hash bucket. The function counts empty slots below n->pos in variable k, but only drops (releases) the bucket when both n->pos and k are zero. This means that if n->pos still points past deleted slots after all live entries have been removed, the bucket is not treated as empty and is not released, leading to wasted memory. [1][2]
Exploitation
This vulnerability can be triggered by any local user with the ability to delete entries from an ipset (e.g., via iptables or nftables rules that manage ipsets). The attacker does not need special privileges beyond the capability to modify ipset content. Successfully deleting entries in a pattern that leaves n->pos pointing past freed slots will result in the bucket remaining allocated but logically empty. [3][4]
Impact
An attacker able to repeatedly trigger this condition can cause kernel memory to be retained indefinitely for empty buckets. While the immediate impact is memory bloat, under constrained environments this could contribute to denial-of-service conditions. The netfilter subsystem is commonly used in firewalling and network filtering, so the flaw affects systems relying on ipset for network policy enforcement.
Mitigation
The fix corrects the logic to treat a bucket as empty when all positions below n->pos are unused and to release it directly instead of attempting further shrinking. Patches have been applied to the stable kernel trees and are available in commits linked from the CVE references. Users should apply the latest kernel updates to ensure the fix is in place. [1][2][3][4]
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
8- git.kernel.org/stable/c/58f3a14826d4e6b0d5421f1a64be280b48601ea2nvdPatch
- git.kernel.org/stable/c/68ca0eea0af02bed36c5e2c13e9fa1647c31a7d4nvdPatch
- git.kernel.org/stable/c/6cea34d7ec6829b62f521a37a287f670144a2233nvdPatch
- git.kernel.org/stable/c/9862ef9ab0a116c6dca98842aab7de13a252ae02nvdPatch
- git.kernel.org/stable/c/ad92ee87462f9a3061361d392e9dbfe2e5c1c9fbnvdPatch
- git.kernel.org/stable/c/b7eef00f08b92b0b9efe8ae0df6d0005e6199323nvdPatch
- git.kernel.org/stable/c/c098ff857e7ca923539164af5b3c2fe3e8f8afafnvdPatch
- git.kernel.org/stable/c/ceacaa76f221a6577aba945bb8873c2e640aeba4nvdPatch
News mentions
1- Patch Tuesday - April 2026Rapid7 Blog · Apr 14, 2026