CVE-2025-21823

batman-adv: Drop unmanaged ELP metric worker

MEDIUM
5.5
CVSS Score
Published: February 27, 2025 at 08:06 PM UTC
Updated: August 5, 2026 at 12:44 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: batman-adv: Drop unmanaged ELP metric worker The ELP worker needs to calculate new metric values for all neighbors "reachable" over an interface. Some of the used metric sources require locks which might need to sleep. This sleep is incompatible with the RCU list iterator used for the recorded neighbors. The initial approach to work around of this problem was to queue another work item per neighbor and then run this in a new context. Even when this solved the RCU vs might_sleep() conflict, it has a major problems: Nothing was stopping the work item in case it is not needed anymore - for example because one of the related interfaces was removed or the batman-adv module was unloaded - resulting in potential invalid memory accesses. Directly canceling the metric worker also has various problems: * cancel_work_sync for a to-be-deactivated interface is called with rtnl_lock held. But the code in the ELP metric worker also tries to use rtnl_lock() - which will never return in this case. This also means that cancel_work_sync would never return because it is waiting for the worker to finish. * iterating over the neighbor list for the to-be-deactivated interface is currently done using the RCU specific methods. Which means that it is possible to miss items when iterating over it without the associated spinlock - a behaviour which is acceptable for a periodic metric check but not for a cleanup routine (which must "stop" all still running workers) The better approch is to get rid of the per interface neighbor metric worker and handle everything in the interface worker. The original problems are solved by: * creating a list of neighbors which require new metric information inside the RCU protected context, gathering the metric according to the new list outside the RCU protected context * only use rcu_trylock inside metric gathering code to avoid a deadlock when the cancel_delayed_work_sync is called in the interface removal code (which is called with the rtnl_lock held)

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.6 ≤ v < 5.10.2354.6 ≤ v < 5.15.1794.6 ≤ v < 5.4.2914.6 ≤ v < 6.1.1294.6 ≤ v < 6.12.164.6 ≤ v < 6.13.44.6 ≤ v < 6.144.6 ≤ v < 6.6.795.11 ≤ v < 5.15.1795.16 ≤ v < 6.1.1295.5 ≤ v < 5.10.2356.13 ≤ v < 6.13.46.2 ≤ v < 6.6.796.7 ≤ v < 6.12.166.14 rc16.14 rc2c833484e5f3872a38fe232c663586069d5ad9645
Vendor states this is fixed in 0fdc3c166ac17b26014313fa2b93696354511b24 (fixed)
Vendor states this is fixed in 1c334629176c2d644befc31a20d4bf75542f7631 (fixed)
Vendor states this is fixed in 3c0e0aecb78cb2a2ca1dc701982d08fedb088dc6 (fixed)
Vendor states this is fixed in 781a06fd265a8151f7601122d9c2e985663828ff (fixed)
Vendor states this is fixed in 8c8ecc98f5c65947b0070a24bac11e12e47cc65d (fixed)
Vendor states this is fixed in a0019971f340ae02ba54cf1861f72da7e03e6b66 (fixed)
Vendor states this is fixed in a7aa2317285806640c844acd4cd2cd768e395264 (fixed)
Vendor states this is fixed in af264c2a9adc37f4bdf88ca7f3affa15d8c7de9e (fixed)
Vendor states this is fixed in 4.6 (unaffected)
Vendor states this is fixed in 5.10.235 (unaffected)
Vendor states this is fixed in 5.15.179 (unaffected)
Vendor states this is fixed in 5.4.291 (unaffected)
Vendor states this is fixed in 6.1.129 (unaffected)
Vendor states this is fixed in 6.12.16 (unaffected)
Vendor states this is fixed in 6.13.4 (unaffected)
Vendor states this is fixed in 6.14 (unaffected)
Vendor states this is fixed in 6.6.79 (unaffected)

References (10)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0fdc3c166ac17b26014313fa2b93696354511b24
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1c334629176c2d644befc31a20d4bf75542f7631
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3c0e0aecb78cb2a2ca1dc701982d08fedb088dc6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/781a06fd265a8151f7601122d9c2e985663828ff
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8c8ecc98f5c65947b0070a24bac11e12e47cc65d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a0019971f340ae02ba54cf1861f72da7e03e6b66
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a7aa2317285806640c844acd4cd2cd768e395264
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/af264c2a9adc37f4bdf88ca7f3affa15d8c7de9e

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card