# CVE-2026-23294: bpf: Fix race in devmap on PREEMPT\_RT

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.0
- **CVSS:** 7.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.13% (percentile 1, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2026-03-25T10:26:51.946Z
- **Modified:** 2026-08-05T12:21:10.341Z

## Who should check

- Anyone running Linux \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< 6c10b019785dc282c5f45d21e4a3f468b8fd6476; \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< ab1a56c9d99189aa5c6e03940d06e40ba6a28240; \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< 1872e75375c40add4a35990de3be77b5741c252c
- Anyone running Linux 6.18

## Description

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix race in devmap on PREEMPT\_RT

On PREEMPT\_RT kernels, the per-CPU xdp\_dev\_bulk\_queue (bq) can be
accessed concurrently by multiple preemptible tasks on the same CPU.

The original code assumes bq\_enqueue() and \_\_dev\_flush() run atomically
with respect to each other on the same CPU, relying on
local\_bh\_disable() to prevent preemption. However, on PREEMPT\_RT,
local\_bh\_disable() only calls migrate\_disable() (when
PREEMPT\_RT\_NEEDS\_BH\_LOCK is not set) and does not disable
preemption, which allows CFS scheduling to preempt a task during
bq\_xmit\_all(), enabling another task on the same CPU to enter
bq\_enqueue() and operate on the same per-CPU bq concurrently.

This leads to several races:

1. Double-free / use-after-free on bq-\>q\[\]: bq\_xmit\_all() snapshots
   cnt = bq-\>count, then iterates bq-\>q\[0..cnt-1\] to transmit frames.
   If preempted after the snapshot, a second task can call bq\_enqueue()
   -\> bq\_xmit\_all() on the same bq, transmitting (and freeing) the
   same frames. When the first task resumes, it operates on stale
   pointers in bq-\>q\[\], causing use-after-free.

2. bq-\>count and bq-\>q\[\] corruption: concurrent bq\_enqueue() modifying
   bq-\>count and bq-\>q\[\] while bq\_xmit\_all() is reading them.

3. dev\_rx/xdp\_prog teardown race: \_\_dev\_flush() clears bq-\>dev\_rx and
   bq-\>xdp\_prog after bq\_xmit\_all(). If preempted between
   bq\_xmit\_all() return and bq-\>dev\_rx = NULL, a preempting
   bq\_enqueue() sees dev\_rx still set (non-NULL), skips adding bq to
   the flush\_list, and enqueues a frame. When \_\_dev\_flush() resumes,
   it clears dev\_rx and removes bq from the flush\_list, orphaning the
   newly enqueued frame.

4. \_\_list\_del\_clearprev() on flush\_node: similar to the cpumap race,
   both tasks can call \_\_list\_del\_clearprev() on the same flush\_node,
   the second dereferences the prev pointer already set to NULL.

The race between task A (\_\_dev\_flush -\> bq\_xmit\_all) and task B
(bq\_enqueue -\> bq\_xmit\_all) on the same CPU:

  Task A (xdp\_do\_flush)          Task B (ndo\_xdp\_xmit redirect)
  ----------------------         --------------------------------
  \_\_dev\_flush(flush\_list)
    bq\_xmit\_all(bq)
      cnt = bq-\>count  /\* e.g. 16 \*/
      /\* start iterating bq-\>q\[\] \*/
    \<-- CFS preempts Task A --\>
                                   bq\_enqueue(dev, xdpf)
                                     bq-\>count == DEV\_MAP\_BULK\_SIZE
                                     bq\_xmit\_all(bq, 0)
                                       cnt = bq-\>count  /\* same 16! \*/
                                       ndo\_xdp\_xmit(bq-\>q\[\])
                                       /\* frames freed by driver \*/
                                       bq-\>count = 0
    \<-- Task A resumes --\>
      ndo\_xdp\_xmit(bq-\>q\[\])
      /\* use-after-free: frames already freed! \*/

Fix this by adding a local\_lock\_t to xdp\_dev\_bulk\_queue and acquiring
it in bq\_enqueue() and \_\_dev\_flush(). These paths already run under
local\_bh\_disable(), so use local\_lock\_nested\_bh() which on non-RT is
a pure annotation with no overhead, and on PREEMPT\_RT provides a
per-CPU sleeping lock that serializes access to the bq.

## Affected and fixed versions

- Linux: \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< 6c10b019785dc282c5f45d21e4a3f468b8fd6476; \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< ab1a56c9d99189aa5c6e03940d06e40ba6a28240; \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< 1872e75375c40add4a35990de3be77b5741c252c (cvelist)
- Linux: 6.18 (cvelist)

## Mitigation

- Upgrade Linux to 1872e75375c40add4a35990de3be77b5741c252c or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-23294. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-23294.md
Affected: Linux >= 3253cb49cbad4772389d6ef55be75db1f97da910, < 6c10b019785dc282c5f45d21e4a3f468b8fd6476; >= 3253cb49cbad4772389d6ef55be75db1f97da910, < ab1a56c9d99189aa5c6e03940d06e40ba6a28240; >= 3253cb49cbad4772389d6ef55be75db1f97da910, < 1872e75375c40add4a35990de3be77b5741c252c; Linux 6.18
Fixed in: Linux 6c10b019785dc282c5f45d21e4a3f468b8fd6476, Linux 1872e75375c40add4a35990de3be77b5741c252c

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-23294 being exploited?

There is no confirmed exploitation: CVE-2026-23294 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.13% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-23294?

High: CVSS 7.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-23294?

Linux \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< 6c10b019785dc282c5f45d21e4a3f468b8fd6476; \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< ab1a56c9d99189aa5c6e03940d06e40ba6a28240; \>= 3253cb49cbad4772389d6ef55be75db1f97da910, \< 1872e75375c40add4a35990de3be77b5741c252c; Linux 6.18.

### Is there a fix for CVE-2026-23294?

Yes. Fixed in Linux 6c10b019785dc282c5f45d21e4a3f468b8fd6476, Linux 1872e75375c40add4a35990de3be77b5741c252c. Upgrade Linux to 1872e75375c40add4a35990de3be77b5741c252c or later.

### How do I check if I'm affected by CVE-2026-23294?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/6c10b019785dc282c5f45d21e4a3f468b8fd6476>
- patch: <https://git.kernel.org/stable/c/ab1a56c9d99189aa5c6e03940d06e40ba6a28240>
- patch: <https://git.kernel.org/stable/c/1872e75375c40add4a35990de3be77b5741c252c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-23294>

HTML: <https://flawdb.com/CVE-2026-23294> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-23294>
