CVE-2026-63951

Source
https://cve.org/CVERecord?id=CVE-2026-63951
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-63951.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-63951
Downstream
Published
2026-07-19T14:55:44.105Z
Modified
2026-07-22T05:30:08.225682716Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
zram: fix use-after-free in zram_writeback_endio
Details

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

zram: fix use-after-free in zramwritebackendio

A crash was observed in zramwritebackendio due to a NULL pointer dereference in wakeup. The root cause is a race condition between the bio completion handler (zramwriteback_endio) and the writeback task.

In zramwritebackendio, wakeup() is called on &wbctl->donewait after releasing wbctl->donelock. This creates a race window where the writeback task can see numinflight become 0, return, and free wbctl before zramwritebackendio calls wakeup().

CPU 0 (zramwritebackendio) CPU 1 (writebackstore) ============================ ============================ zramwritebackslots zramsubmitwbrequest zramsubmitwbrequest waitevent(wbctl->donewait) spinlock(&wbctl->donelock); listadd(&req->entry, &wbctl->donereqs); spinunlock(&wbctl->donelock); wakeup(&wbctl->donewait); zramcompletedonereqs spinlock(&wbctl->donelock); listadd(&req->entry, &wbctl->donereqs); spinunlock(&wbctl->donelock); while (numinflight) > 0) spinlock(&wbctl->donelock); listdel(&req->entry); spinunlock(&wbctl->donelock); // numinflight becomes 0 atomicdec(num_inflight);

                             // Leave zram_writeback_slots
                             // Free wb_ctl
                             release_wb_ctl(wb_ctl);

// UAF crash! wakeup(&wbctl->done_wait);

This patch fixes this race by using RCU. By protecting wbctl with rcureadlock() in zramwritebackendio and using kfreercu() to free it, we ensure that wbctl remains valid during the execution of zramwriteback_endio.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63951.json",
    "cna_assigner": "Linux"
}
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
f405066a1f0db818270f49a5e96be329bcabde1e
Fixed
ebe2cbefc86291fa7f386447a81995640df4e2fd
Fixed
bf62f69574b19720ae5fbbbcdf24a0c4e3e05e43

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-63951.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.0.12

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-63951.json"