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)
Advisories
Source ID Title
Debian DLA Debian DLA DLA-4102-1 linux-6.1 security update
Debian DLA Debian DLA DLA-4178-1 linux security update
EUVD EUVD EUVD-2025-5979 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)
Ubuntu USN Ubuntu USN USN-7510-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7510-2 Linux kernel (FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7510-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7510-4 Linux kernel (Real-time) vulnerabilities
Ubuntu USN Ubuntu USN USN-7510-5 Linux kernel (Azure FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7510-6 Linux kernel (AWS FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7510-7 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7510-8 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7511-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-7511-2 Linux kernel (GCP FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7511-3 Linux kernel (GKE) vulnerabilities
Ubuntu USN Ubuntu USN USN-7512-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-2 Linux kernel (GCP FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-4 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-5 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-6 Linux kernel (IBM) vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-7 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-8 Linux kernel (FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7516-9 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7517-1 Linux kernel (Xilinx ZynqMP) vulnerabilities
Ubuntu USN Ubuntu USN USN-7517-2 Linux kernel (IBM) vulnerabilities
Ubuntu USN Ubuntu USN USN-7517-3 Linux kernel (BlueField) vulnerabilities
Ubuntu USN Ubuntu USN USN-7518-1 Linux kernel (Azure FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7521-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7521-2 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-7521-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7539-1 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-7540-1 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-7593-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-7602-1 Linux kernel (Xilinx ZynqMP) vulnerabilities
Ubuntu USN Ubuntu USN USN-7640-1 Linux kernel (IoT) vulnerabilities
Ubuntu USN Ubuntu USN USN-7703-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7703-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7703-3 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-7703-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7719-1 Linux kernel (Raspberry Pi Real-time) vulnerabilities
Ubuntu USN Ubuntu USN USN-7737-1 Linux kernel (Azure) vulnerabilities
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Tue, 28 Oct 2025 03:00:00 +0000

Type Values Removed Values Added
First Time appeared Linux
Linux linux Kernel
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel

Thu, 13 Mar 2025 12:30:00 +0000


Fri, 28 Feb 2025 14:45:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Thu, 27 Feb 2025 20:15:00 +0000

Type Values Removed Values Added
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)
Title batman-adv: Drop unmanaged ELP metric worker
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2025-05-04T07:21:54.473Z

Reserved: 2024-12-29T08:45:45.775Z

Link: CVE-2025-21823

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

Published: 2025-02-27T20:16:04.793

Modified: 2025-10-28T02:50:08.230

Link: CVE-2025-21823

cve-icon Redhat

Severity : Moderate

Publid Date: 2025-02-27T00:00:00Z

Links: CVE-2025-21823 - Bugzilla

cve-icon OpenCVE Enrichment

No data.