CVE-2025-21781: batman-adv: fix panic during interface removal

Published Feb 27, 2025
·
Updated

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

batman-adv: fix panic during interface removal

Reference counting is used to ensure that batadvhardifneighnode and batadvhardiface are not freed before/during batadvvelpthroughputmetricupdate work is finished.

But there isn't a guarantee that the hard if will remain associated with a soft interface up until the work is finished.

This fixes a crash triggered by reboot that looks like this:

Call trace: batadvvmeshfree+0xd0/0x4dc [batmanadv] batadvvelpthroughputmetricupdate+0x1c/0xa4 processonework+0x178/0x398 workerthread+0x2e8/0x4d0 kthread+0xd8/0xdc retfromfork+0x10/0x20

(the batadvvmeshfree call is misleading, and does not actually happen)

I was able to make the issue happen more reliably by changing hardifneigh->batv.metricwork work to be delayed work. This allowed me to track down and confirm the fix.

[sven@narfation.org: prevent entering batadvvelpgetthroughput without softiface]

Affected Software

11 affected components
Linux Kernel
Linux batman-adv
Linux Linux kernel>=4.6<5.4.291
Linux Linux kernel>=5.5<5.10.235
Linux Linux kernel>=5.11<5.15.179
Linux Linux kernel>=5.16<6.1.129
Linux Linux kernel>=6.2<6.6.79
Linux Linux kernel>=6.7<6.12.16
Linux Linux kernel>=6.13<6.13.4
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2

Event History

Feb 27, 2025
CVE Published
via MITRE·02:18 AM
Data Sourced
via MITRE·02:18 AM
Description
Data Sourced
via NVD·03:15 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-21781?

CVE-2025-21781 is classified as a medium severity vulnerability.

2

How do I fix CVE-2025-21781?

To fix CVE-2025-21781, update to the latest version of the Linux kernel that includes the patch for this vulnerability.

3

Which versions of the Linux kernel are affected by CVE-2025-21781?

CVE-2025-21781 affects multiple versions of the Linux kernel and the batman-adv module.

4

What are the risks associated with CVE-2025-21781?

Exploitation of CVE-2025-21781 could potentially lead to system crashes or denial of service.

5

Is CVE-2025-21781 related to network performance issues?

Yes, CVE-2025-21781 specifically addresses a panic during interface removal, which can impact network performance.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203