Linux KernelOperating system · Linux

CVE-2026-31657

CRITICAL · 9.8 CVSS v3.1 Published 2026-04-24
Fix available
A fix is available. Upgrade to 6.1.169 / 6.6.135 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
In the Linux kernel, the following vulnerability has been resolved: batman-adv: hold claim backbone gateways by reference batadv_bla_add_claim() can replace claim->backbone_gw and drop the old gateway's last reference while readers still follow the pointer. The netlink claim dump path dereferences claim->backbone_gw->orig and takes claim->backbone_gw->crc_lock without pinning the underlying backbone gateway. batadv_bla_check_claim() still has the same naked pointer access pattern. Reuse batadv_bla_claim_get_backbone_gw() in both readers so they operate on a stable gateway reference until the read-side work is complete. This keeps the dump and claim-check paths aligned with the lifetime rules introduced for the other BLA claim readers.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A race condition in batman-adv's Bridge Loop Avoidance (BLA) allows claim->backbone_gw to be replaced and freed while the netlink dump path and batadv_bla_check_claim() still dereference the stale pointer. The fix reuses batadv_bla_claim_get_backbone_gw() to hold a stable reference before accessing backbone_gw->orig and crc_lock, preventing use-after-free. CVSS 9.8 reflects trivial exploitability with no privileges or user interaction required.

MitigationApply the kernel patch that adds reference counting via batadv_bla_claim_get_backbone_gw() in the claim dump and claim check paths; update Linux kernel to the patched version.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Linux KernelOperating system
Affected:>= 3.5.1, < 6.1.169>= 6.2, < 6.6.135>= 6.7, < 6.12.82>= 6.13, < 6.18.23>= 6.19, < 6.19.13= 3.5= 7.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Verify batman-adv module is loaded
    Run 'lsmod | grep batman_adv' or check 'ls /sys/module/'. If the module is not loaded, the vulnerability cannot be triggered.
    Affected if batman-adv module is loaded in memory
  2. Confirm kernel version is within affected range
    Run 'uname -r' to get the running kernel version. Compare it against the affected ranges: >= 3.5.1, < 6.1.169; >= 6.2, < 6.6.135; >= 6.7, < 6.12.82; >= 6.13, < 6.18.23; >= 6.19, < 6.19.13; = 3.5; = 7.0
    Affected if kernel version matches any of the vulnerable version ranges listed
  3. Determine if Bridge Loop Avoidance (BLA) is enabled
    Check batctl settings: run 'batctl bla' or inspect debugfs at /sys/kernel/debug/batman_adv/ (if available). BLA must be active for the race condition to be exploitable.
    Affected if BLA is enabled and batman-adv is configured to use it
  4. Inspect kernel logs for use-after-free indicators
    Run 'dmesg' or check /var/log/kern.log for messages containing 'batman_adv', 'use-after-free', 'backbone_gw', or crash/panic entries related to batman-adv.
    Affected if logs show memory corruption, use-after-free, or crashes involving batman-adv BLA code

You are affected if you are running a vulnerable kernel version, the batman-adv module is loaded, and Bridge Loop Avoidance is enabled.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 6.1.169 / 6.6.135 / 6.12.82 or later
Fixed in 6.1.1696.6.1356.12.82
Vendor patch git.kernel.org →
Interim mitigation

Apply the kernel patch that adds reference counting via batadv_bla_claim_get_backbone_gw() in the claim dump and claim check paths; update Linux kernel to the patched version.

Recommended fix High confidence

6.1.169 / 6.6.135 / 6.12.82 / 6.18.23 (depending on your current branch)

  1. Identify the currently running Linux kernel version using `uname -r`
  2. Determine which version branch your kernel belongs to (e.g., 6.1.x, 6.2.x, 6.7.x, or 6.13.x)
  3. Upgrade to a kernel version >= 6.1.169 if running 6.1.x branch
  4. Upgrade to a kernel version >= 6.6.135 if running 6.2.x branch
  5. Upgrade to a kernel version >= 6.12.82 if running 6.7.x branch
  6. Upgrade to a kernel version >= 6.18.23 if running 6.13.x or later branch
  7. Reboot the system to load the patched kernel
  8. Verify the fix is applied by checking the kernel version matches one of the fixed releases
Caveat Standard kernel upgrade risks apply - ensure compatibility with custom drivers and user-space tools before rebooting

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Linux Kernel Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing6.0 h
  • Review / QA3.0 h
15.0 hours of engineering $2,560
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,096.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-31657 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-31657 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data