CVE-2025-37949

Source
https://cve.org/CVERecord?id=CVE-2025-37949
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37949.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-37949
Downstream
Related
Published
2025-05-20T16:01:45.242Z
Modified
2026-03-20T12:42:35.408781Z
Summary
xenbus: Use kref to track req lifetime
Details

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 xenbus_thread 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 xswake_up() 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

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37949.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
fd8aa9095a95c02dcc35540a263267c29b8fda9d
Fixed
0e94a246bb6d9538010b6c02d2b1d4717a97b2e5
Fixed
f1bcac367bc95631afbb918348f30dec887d0e1b
Fixed
4d260a5558df4650eb87bc41b2c9ac2d6b2ba447
Fixed
8b02f85e84dc6f7c150cef40ddb69af5a25659e5
Fixed
cbfaf46b88a4c01b64c4186cdccd766c19ae644c
Fixed
8e9c8a0393b5f85f1820c565ab8105660f4e8f92
Fixed
2466b0f66795c3c426cacc8998499f38031dbb59
Fixed
1f0304dfd9d217c2f8b04a9ef4b3258a66eedd27

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37949.json"