CVE-2025-37949: xenbus: Use kref to track req lifetime

Published May 20, 2025
·
Updated

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

xenbus: Use kref to track req lifetime

Marek reported seeing a NULL pointer fault in the xenbusthread callstack: BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: e030:wakeupcommon+0x4c/0x180 Call Trace: <TASK> wakeupcommonlock+0x82/0xd0 processmsg+0x18e/0x2f0 xenbusthread+0x165/0x1c0

processmsg+0x18e is req->cb(req). req->cb is set to xswakeup(), a thin wrapper around wakeup(), or xenbusdevqueuereply(). It seems like it was xswakeup() in this case.

It seems like req may have woken up the xswaitforreply(), which kfree()ed the req. When xenbusthread resumes, it faults on the zero-ed data.

Linux Device Drivers 2nd edition states: "Normally, a wakeup call can cause an immediate reschedule to happen, meaning that other processes might run before wakeup returns." ... which would match the behaviour observed.

Change to keeping two krefs on each request. One for the caller, and one for xenbusthread. Each will krefput() when finished, and the last will free it.

This use of kref matches the description in Documentation/core-api/kref.rst

Affected Software

15 affected componentsFixes available
Linux Kernel
Linux Linux kernel>=4.11<5.4.294
Linux Linux kernel>=5.5<5.10.238
Linux Linux kernel>=5.11<5.15.183
Linux Linux kernel>=5.16<6.1.139
Linux Linux kernel>=6.2<6.6.91
Linux Linux kernel>=6.7<6.12.29
Linux Linux kernel>=6.13<6.14.7
Linux Linux kernel=6.15-rc1
Linux Linux kernel=6.15-rc2
Linux Linux kernel=6.15-rc3
Linux Linux kernel=6.15-rc4
Linux Linux kernel=6.15-rc5
Debian Debian Linux=11.0
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1
  2. Compensating control

    In xenbus, use kref to track each request's lifetime: keep two krefs per request—one for the caller and one for xenbus_thread; each holder calls kref_put() when finished, and the final kref_put() frees the request.

Event History

May 20, 2025
CVE Published
via MITRE·04:01 PM
Data Sourced
via MITRE·04:01 PM
DescriptionSeverity
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-37949?

CVE-2025-37949 has a moderate severity rating due to the potential for a NULL pointer dereference leading to system instability.

2

How do I fix CVE-2025-37949?

To fix CVE-2025-37949, upgrade to the latest stable version of the Linux kernel where the vulnerability has been addressed.

3

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

CVE-2025-37949 affects multiple versions of the Linux kernel prior to the security patch that resolves this issue.

4

What could happen if CVE-2025-37949 is exploited?

If exploited, CVE-2025-37949 may lead to a system crash or other instability due to the NULL pointer dereference.

5

Who reported CVE-2025-37949?

CVE-2025-37949 was reported by Marek, highlighting a critical issue in the xenbus_thread functionality.

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