CVE-2026-45897: nft_counter Race Lets Counters Underflow in Linux Netfilter

CVE-2026-45897, published by NVD on May 27, 2026, covers a Linux kernel netfilter bug in nft_counter where concurrent dump-and-reset operations could subtract the same packet and byte counts twice, causing counter values to underflow. The fix is not glamorous: a global static spinlock serializes the reset path. But that small lock tells a larger story about the modern kernel’s security burden, where even accounting code inside firewall plumbing can become CVE material once concurrency, observability, and administrative trust collide.

Diagram showing Linux netfilter nftables counter race with dump-and-reset underflow and a global spinlock fix.A Counter Bug Becomes a Security Record Because Firewalls Are State Machines Now​

At first glance, CVE-2026-45897 looks almost comically narrow. The vulnerable path is not a packet parser, not a remote protocol decoder, and not a heap corruption primitive begging to be chained into a privilege escalation. It is a counter reset path in Linux’s nftables subsystem, the part that lets administrators ask how many packets and bytes matched a given rule and then optionally zero that accounting state.
That is precisely why it matters. Modern firewalling is not just a yes-or-no decision at the edge of a network; it is a running state machine that feeds monitoring, rate calculations, abuse detection, compliance reports, and sometimes billing. If the system can be induced to report impossible values because two readers reset the same counter at the same time, the bug may not hand an attacker a shell, but it can still corrupt the instrumentation that administrators use to decide whether something is wrong.
The kernel fix is terse: take a spinlock before fetching the total, hold it across the reset, and prevent two parallel dump-and-reset callers from reading the same value before both subtract it. The commit message’s plain explanation is the whole case. Without serialization, two resets can observe the same counter value and both deduct it, leaving the underlying accounting in an underflowed state.
That is not a Hollywood vulnerability. It is the kind of race condition that lives in production for years because the ordinary path works, the failure requires timing, and the damage appears as bad numbers rather than an obvious crash. Yet for administrators who depend on nftables counters as evidence, bad numbers are not harmless.

The Fix Is a Lock, and the Argument Is About Trust​

The choice of a global static spinlock is deliberately conservative. Rather than reshaping the accounting model or adding more elaborate per-network namespace locking, the patch serializes the rare operation that combines a read with a reset. That is the old kernel engineering bargain: make the uncommon path safe first, then optimize only if users can prove the lock hurts.
This is not the sort of change that should alarm performance-sensitive operators. Packet matching remains the hot path. The lock sits around reset operations, not every packet that increments a counter. In practical terms, an administrator or monitoring tool that frequently dumps and resets counters may now see slightly more serialization, but the alternative was allowing concurrent resetters to manufacture nonsense.
The interesting part is that the patch uses a global lock “for simplicity,” with the commit text explicitly leaving open a future per-net lock if bottlenecks appear. That is unusually candid and useful. It tells operators that upstream developers understand the trade-off: correctness is the emergency brake, scalability can come later.
For security teams, the word spinlock also carries a signal. This is not a mitigation papering over userland behavior. It is a kernel-side admission that the critical section was real and that atomicity had to be enforced where the accounting state actually lives. In a subsystem as historically exposed and heavily exercised as netfilter, that distinction matters.

Netfilter’s Attack Surface Is Bigger Than Packet Filtering​

Netfilter has spent the last decade moving from “the thing iptables uses” into a broader kernel facility that many Linux deployments treat as programmable infrastructure. Nftables brought a more expressive ruleset model, richer expressions, sets, maps, verdict logic, flow offload, and tight integration with the network stack. That flexibility is why nftables displaced iptables as the modern interface; it is also why the subsystem keeps attracting scrutiny.
CVE-2026-45897 does not appear to be in the same league as past netfilter memory safety flaws that enabled local privilege escalation or denial of service. The available description points to counter underflow during concurrent administrative operations, not arbitrary code execution. But netfilter’s history makes even small defects worth careful reading, because the subsystem sits in a privileged place: untrusted traffic enters, privileged state is updated, and userspace receives structured views of that state.
The counter expression is one of nftables’ most mundane building blocks. A rule can count packets and bytes, and administrators can inspect those numbers to understand what traffic matched. The subtlety arrives when inspection becomes mutation. A dump-and-reset operation is not merely looking at state; it is consuming state.
That makes it semantically closer to reading from a queue than reading from a file. If two consumers take the same item because the handoff is not serialized, the accounting model breaks. In this case, the apparent breakage is underflow: the counter logic can subtract more than it should because more than one reset path worked from the same observed total.

The Security Impact Is Modest, but the Operational Impact Is Real​

NVD had not assigned a CVSS score when the record was first published, and that absence is appropriate caution rather than bureaucratic delay. The public description does not establish a remote trigger, a crash, or a privilege boundary crossing. A reasonable reading is that exploitation would require the ability to invoke or race nftables counter dump-and-reset operations, which is normally an administrative capability or a capability-bearing service action.
That said, “requires admin-ish access” should not end the discussion. Many real systems delegate network observability and firewall management to agents, containers, orchestration layers, appliance dashboards, or monitoring daemons that do not feel like a human root shell. If one of those components can drive reset operations in parallel, intentionally or accidentally, the system can end up with misleading counter state.
The risk is clearest in environments that use counters as control inputs. A script may reset counters every interval and calculate deltas. A security tool may alert if a rule’s packet count crosses a threshold. A network appliance may expose nftables-derived counters to an operator dashboard. Underflowed values can distort all of these layers, especially if downstream code was written under the assumption that kernel counters are monotonically sane between resets.
There is also a quieter forensic angle. Counters are often the first clue in an investigation: Did traffic hit the drop rule? Did a suspicious source match the quarantine chain? Did a mitigation actually absorb packets after it was installed? If the reset path can produce impossible arithmetic under concurrency, then the administrator’s timeline becomes less reliable.
This is why the CVE deserves attention even if it never becomes a banner headline. Security is not only about takeover; it is also about preserving the integrity of the signals defenders use after something goes wrong.

Linux Distributions Will Turn a Two-Line Idea Into a Patch-Management Problem​

For most users, CVE-2026-45897 will arrive not as a kernel mailing list patch but as a distribution update. That means the practical question is not “Can I cherry-pick commit 779c60a?” but “Which kernel package did my vendor ship, and did it include the stable backport?” The user-provided NVD record points to two stable kernel commits, which is the usual sign that the fix has been propagated beyond the original upstream change.
This is where Linux’s strength and messiness are the same thing. The fix can move quickly through stable trees, but administrators still live behind distribution kernels, enterprise errata processes, cloud image refresh cycles, and appliance vendor rebuilds. A bare-metal Arch box, an Ubuntu LTS server with an HWE kernel, a Debian stable host, a RHEL derivative, and a firewall appliance may all answer “am I fixed?” differently on the same day.
The lack of an NVD score also complicates triage dashboards. Many vulnerability management systems sort by CVSS before they sort by engineering relevance. Until enrichment lands, CVE-2026-45897 may sit as an unscored kernel CVE, which can make it look both more mysterious and less urgent than it is.
The better operational posture is boring and effective: track kernel vendor advisories, install the next supported kernel update that includes the stable fix, and reboot into it. Live patching programs may or may not carry a fix this narrow, and teams should not assume coverage unless their vendor explicitly says so. Kernel code that changes locking around netfilter state is exactly the kind of thing administrators should verify with the running kernel version, not merely with package metadata sitting on disk.

Containers Do Not Make Kernel Bugs Someone Else’s Problem​

The container angle is worth spelling out because nftables often hides underneath orchestration. Containers do not bring their own kernels; they share the host kernel. If the host kernel’s netfilter implementation has a race in counter reset handling, containerization does not magically isolate that code path.
That does not mean every Kubernetes cluster is directly exposed. The ability to manipulate nftables rules and counters depends on capabilities, namespaces, host configuration, and the privileges granted to networking components. But clusters routinely run CNI plugins, service proxies, ingress controllers, firewalls, and observability agents that interact with kernel networking features. The more automation a platform layers over netfilter, the more likely it is that concurrency assumptions matter.
This is also a reminder that “local” kernel CVEs often map poorly to cloud-native reality. A local capability in a traditional server model may be held by a daemon, a privileged container, or a vendor agent in a modern environment. The security boundary is not always the user at a shell prompt; sometimes it is the separation between platform components that all talk to the same kernel.
For WindowsForum readers running WSL, the relevance is narrower but still real. WSL 2 uses a Microsoft-supplied Linux kernel, and Linux networking behavior inside WSL is mediated by that kernel and the Windows host integration. Most desktop users are unlikely to be racing nftables counter resets in WSL. But developers who test Linux firewall behavior, run container stacks, or mirror production nftables rules inside WSL should still treat kernel updates as part of their security hygiene rather than assuming Windows Update covers every Linux-layer nuance instantly.

The Race Is a Symptom of Observability Becoming Stateful​

The deepest lesson in CVE-2026-45897 is that observability features are no longer passive. Counters, metrics, tracing buffers, flow tables, and per-rule statistics are now interactive state. Administrators do not just read them; tools scrape them, reset them, diff them, aggregate them, and feed them into decisions.
That shift changes the security meaning of a counter. A packet counter used to be a convenience. Now it may be an input to an automated response loop. If the counter lies, the loop may make the wrong decision.
The dump-and-reset pattern is especially vulnerable to this kind of mistake because it compresses two operations into one semantic unit. “Tell me what happened since last time, then clear the slate” is useful, but it creates ownership questions. Who is allowed to consume the interval? What happens if two consumers ask at once? Is the result duplicated, divided, or corrupted?
The kernel answer after this patch is simple: one resetter at a time. That is the right answer for correctness. It also quietly pushes back against the common assumption that observability is cheap and side-effect-free. In production systems, asking a question can change the thing being asked about.

The Patch Also Shows Why Kernel CVEs Feel Endless​

Linux kernel CVEs can feel relentless because the project now assigns identifiers to many fixes that once would have appeared only as stable commits. Some of that frustrates administrators, who see vulnerability scanners light up for bugs that do not fit the traditional mental model of exploitable security flaws. But CVE-2026-45897 is a good example of why the broader lens exists.
The bug sits at the intersection of privileged networking, accounting integrity, and concurrency. It is not a garden-variety typo. It is a flaw in how the kernel protects a state transition in a security-relevant subsystem. If a CVE program excludes that class of bug until someone demonstrates a dramatic exploit, defenders lose visibility into the exact patches they need to reason about their systems.
The cost is noise. Not every Linux kernel CVE deserves an emergency change window. Some deserve a normal maintenance update, a note in the risk register, and a check that no internal service is doing something unusual with the affected subsystem. The trick is to stop treating the CVE label as the entire severity analysis.
For CVE-2026-45897, the immediate severity appears limited by the need to invoke counter reset operations and by the nature of the impact. But the bug’s existence is still actionable. It tells firewall-heavy operators to update. It tells monitoring vendors to avoid assuming reset operations are harmless under concurrency. It tells kernel developers that state-consuming reads need the same scrutiny as writes.

The Admin Response Should Be Calm, Specific, and Verifiable​

The right response is not panic, and it is not dismissal. Administrators should first identify whether their systems use nftables and whether their kernel includes the affected nft_counter code path. On many modern distributions, nftables is either the default firewall framework or part of the plumbing behind higher-level tools, even when the administrator rarely types nft directly.
Next, teams should look for software that performs dump-and-reset operations rather than simple reads. Periodic counter collection is common; reset-on-read is a more specific pattern. If only one trusted process performs it, the practical exposure is smaller. If multiple agents, scripts, or dashboards reset counters independently, this CVE is a prompt to simplify ownership even after the kernel fix lands.
Finally, patch verification should happen at the running-kernel level. Kernel updates do not take effect until the system boots into the new kernel, and fleet tools can mislead when they report installed packages rather than active versions. This is doubly important on appliances and cloud images, where the vendor may control the kernel cadence.

The Little Lock That Should Shape the Patch Queue​

CVE-2026-45897 is small enough that it risks being ignored and specific enough that it rewards careful triage. The useful takeaways are concrete rather than dramatic:
  • CVE-2026-45897 affects the Linux kernel’s nftables counter reset path, not Windows networking code or ordinary user-space packet counters.
  • The bug allows concurrent dump-and-reset operations to race, letting two resetters read the same values and subtract them twice.
  • The upstream fix serializes reset operations with a global static spinlock because resets are expected to be infrequent.
  • Systems that use nftables for firewalling, monitoring, appliance logic, or container networking should take the fix through their normal kernel update channel.
  • The absence of an NVD CVSS score at publication should not be read as proof that the issue is either severe or irrelevant.
  • The most exposed environments are likely those with multiple automated tools reading and resetting nftables counters rather than systems where a human occasionally inspects firewall statistics.
The broader lesson is that the kernel’s quiet accounting paths deserve the same respect as its packet parsers. Firewalls are now programmable platforms, observability is now mutable state, and a race in a counter can become a security issue because defenders increasingly act on those counters. CVE-2026-45897 will probably be fixed for most users by an ordinary kernel update, but the design pressure it exposes is not going away: as Linux networking grows more automated, the line between “just statistics” and trusted security state will keep getting thinner.

References​

  1. Primary source: NVD / Linux Kernel
    Published: 2026-05-28T01:06:49-07:00
  2. Security advisory: MSRC
    Published: 2026-05-28T01:06:49-07:00
    Original feed URL
  3. Related coverage: cateee.net
  4. Related coverage: kernel.googlesource.com
  5. Related coverage: systemshardening.com
  6. Related coverage: kernelconfig.io
 

Back
Top