{"id":"CVE-2025-37949","aliases":["CVE-2025-37949"],"related":[],"kind":"vulnerability","state":"published","title":"xenbus: Use kref to track req lifetime","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nxenbus: Use kref to track req lifetime\n\nMarek reported seeing a NULL pointer fault in the xenbus_thread\ncallstack:\nBUG: kernel NULL pointer dereference, address: 0000000000000000\nRIP: e030:__wake_up_common+0x4c/0x180\nCall Trace:\n <TASK>\n __wake_up_common_lock+0x82/0xd0\n process_msg+0x18e/0x2f0\n xenbus_thread+0x165/0x1c0\n\nprocess_msg+0x18e is req->cb(req).  req->cb is set to xs_wake_up(), a\nthin wrapper around wake_up(), or xenbus_dev_queue_reply().  It seems\nlike it was xs_wake_up() in this case.\n\nIt seems like req may have woken up the xs_wait_for_reply(), which\nkfree()ed the req.  When xenbus_thread resumes, it faults on the zero-ed\ndata.\n\nLinux Device Drivers 2nd edition states:\n\"Normally, a wake_up call can cause an immediate reschedule to happen,\nmeaning that other processes might run before wake_up returns.\"\n... which would match the behaviour observed.\n\nChange to keeping two krefs on each request.  One for the caller, and\none for xenbus_thread.  Each will kref_put() when finished, and the last\nwill free it.\n\nThis use of kref matches the description in\nDocumentation/core-api/kref.rst","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nxenbus: Use kref to track req lifetime\n\nMarek reported seeing a NULL pointer fault in the xenbus_thread\ncallstack:\nBUG: kernel NULL pointer dereference, address: 0000000000000000\nRIP: e030:__wake_up_common+0x4c/0x180\nCall Trace:\n <TASK>\n __wake_up_common_lock+0x82/0xd0\n process_msg+0x18e/0x2f0\n xenbus_thread+0x165/0x1c0\n\nprocess_msg+0x18e is req->cb(req).  req->cb is set to xs_wake_up(), a\nthin wrapper around wake_up(), or xenbus_dev_queue_reply().  It seems\nlike it was xs_wake_up() in this case.\n\nIt seems like req may have woken up the xs_wait_for_reply(), which\nkfree()ed the req.  When xenbus_thread resumes, it faults on the zero-ed\ndata.\n\nLinux Device Drivers 2nd edition states:\n\"Normally, a wake_up call can cause an immediate reschedule to happen,\nmeaning that other processes might run before wake_up returns.\"\n... which would match the behaviour observed.\n\nChange to keeping two krefs on each request.  One for the caller, and\none for xenbus_thread.  Each will kref_put() when finished, and the last\nwill free it.\n\nThis use of kref matches the description in\nDocumentation/core-api/kref.rst","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: xenbus: Usar kref para rastrear el tiempo de vida de req. Marek informó haber visto un fallo de puntero nulo en la pila de llamadas xenbus_thread: ERROR: desreferencia de puntero nulo del kernel, dirección: 0000000000000000 RIP: e030:__wake_up_common+0x4c/0x180 Rastreo de llamadas:  __wake_up_common_lock+0x82/0xd0 process_msg+0x18e/0x2f0 xenbus_thread+0x165/0x1c0 process_msg+0x18e es req-&gt;cb(req). req-&gt;cb está configurado como xs_wake_up(), una envoltura ligera alrededor de wake_up(), o xenbus_dev_queue_reply(). Parece que en este caso era xs_wake_up(). Parece que req pudo haber despertado xs_wait_for_reply(), que liberó la solicitud. Cuando xenbus_thread se reanuda, falla en los datos con ceros. La segunda edición de los controladores de dispositivos de Linux indica: «Normalmente, una llamada wake_up puede provocar una reprogramación inmediata, lo que significa que otros procesos podrían ejecutarse antes de que wake_up regrese». ... lo cual coincidiría con el comportamiento observado. Se recomienda mantener dos krefs en cada solicitud: uno para el que realiza la llamada y otro para xenbus_thread. Cada uno ejecutará kref_put() al finalizar, y el último lo liberará. Este uso de kref coincide con la descripción en Documentation/core-api/kref.rst.","source":"nvd"}],"published":"2025-05-20T16:01:45.242Z","modified":"2026-10-15T22:18:22.450Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"fd8aa9095a95c02dcc35540a263267c29b8fda9d","fixed":"0e94a246bb6d9538010b6c02d2b1d4717a97b2e5","status":"affected"},{"type":"git","introduced":"fd8aa9095a95c02dcc35540a263267c29b8fda9d","fixed":"f1bcac367bc95631afbb918348f30dec887d0e1b","status":"affected"},{"type":"git","introduced":"fd8aa9095a95c02dcc35540a263267c29b8fda9d","fixed":"4d260a5558df4650eb87bc41b2c9ac2d6b2ba447","status":"affected"},{"type":"git","introduced":"fd8aa9095a95c02dcc35540a263267c29b8fda9d","fixed":"8b02f85e84dc6f7c150cef40ddb69af5a25659e5","status":"affected"},{"type":"git","introduced":"fd8aa9095a95c02dcc35540a263267c29b8fda9d","fixed":"cbfaf46b88a4c01b64c4186cdccd766c19ae644c","status":"affected"},{"type":"git","introduced":"fd8aa9095a95c02dcc35540a263267c29b8fda9d","fixed":"8e9c8a0393b5f85f1820c565ab8105660f4e8f92","status":"affected"},{"type":"git","introduced":"fd8aa9095a95c02dcc35540a263267c29b8fda9d","fixed":"2466b0f66795c3c426cacc8998499f38031dbb59","status":"affected"},{"type":"git","introduced":"fd8aa9095a95c02dcc35540a263267c29b8fda9d","fixed":"1f0304dfd9d217c2f8b04a9ef4b3258a66eedd27","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.11","status":"unaffected"},{"type":"semver","introduced":"5.4.294","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.238","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.183","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.139","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.91","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.29","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.14.7","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.11","fixed":"5.4.294"},{"status":"affected","introduced":"5.5","fixed":"5.10.238"},{"status":"affected","introduced":"5.11","fixed":"5.15.183"},{"status":"affected","introduced":"5.16","fixed":"6.1.139"},{"status":"affected","introduced":"6.2","fixed":"6.6.91"},{"status":"affected","introduced":"6.7","fixed":"6.12.29"},{"status":"affected","introduced":"6.13","fixed":"6.14.7"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/0e94a246bb6d9538010b6c02d2b1d4717a97b2e5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f1bcac367bc95631afbb918348f30dec887d0e1b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4d260a5558df4650eb87bc41b2c9ac2d6b2ba447","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8b02f85e84dc6f7c150cef40ddb69af5a25659e5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cbfaf46b88a4c01b64c4186cdccd766c19ae644c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8e9c8a0393b5f85f1820c565ab8105660f4e8f92","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2466b0f66795c3c426cacc8998499f38031dbb59","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1f0304dfd9d217c2f8b04a9ef4b3258a66eedd27","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:46:21.911Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-37949","url":"https://www.cve.org/CVERecord?id=CVE-2025-37949","licence":"CVE Terms of Use","modified":"2026-10-15T21:52:04.919Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-37949","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37949","licence":"Public domain","modified":"2026-10-15T22:18:22.450Z"}],"updatedAt":"2026-11-25T22:58:58.302Z","epss":{"score":0.0024,"percentile":0.16259,"date":"2026-12-01T12:00:22.000Z"}}