In the Linux kernel, the following vulnerability has been resolved: zram: fix use-after-free in zram_writeback_endio A crash was observed in… (CVE-2026-63951)
In the Linux kernel, the following vulnerability has been resolved: zram: fix use-after-free in zram_writeback_endio A crash was observed in zram_writeback_endio due to a NULL pointer dereference in wake_up. The root cause is a race condition between the bio completion handler (zram_writeback_endio) and the writeback task. In zram_writeback_endio, wake_up() is called on &wb_ctl->done_wait after releasing wb_ctl->done_lock. This creates a race window where the writeback task can see num_inflight become 0, return, and free wb_ctl before zram_writeback_endio calls wake_up(). CPU 0 (zram_writeback_endio) CPU 1 (writeback_store) ============================ ============================ zram_writeback_slots zram_submit_wb_request zram_submit_wb_request wait_event(wb_ctl->done_wait) spin_lock(&wb_ctl->done_lock); list_add(&req->entry, &wb_ctl->done_reqs); spin_unlock(&wb_ctl->done_lock); wake_up(&wb_ctl->done_wait); zram_complete_done_reqs spin_lock(&wb_ctl->done_lock); list_add(&req->entry, &wb_ctl->done_reqs); spin_unlock(&wb_ctl->done_lock); while (num_inflight) > 0) spin_lock(&wb_ctl->done_lock); list_del(&req->entry); spin_unlock(&wb_ctl->done_lock); // num_inflight becomes 0 atomic_dec(num_inflight); // Leave zram_writeback_slots // Free wb_ctl release_wb_ctl(wb_ctl); // UAF crash! wake_up(&wb_ctl->done_wait); This patch fixes this race by using RCU. By protecting wb_ctl with rcu_read_lock() in zram_writeback_endio and using kfree_rcu() to free it, we ensure that wb_ctl remains valid during the execution of zram_writeback_endio.
AI Analysis
Technical Summary
The Linux kernel's zram subsystem contained a use-after-free vulnerability in the zram_writeback_endio function. This was caused by a race condition where wake_up() was called on a data structure (wb_ctl->done_wait) after the structure could have been freed by another concurrent writeback task. Specifically, the writeback task could observe num_inflight reaching zero, return, and free wb_ctl before zram_writeback_endio called wake_up(), leading to a NULL pointer dereference and crash. The patch addressed this by protecting wb_ctl with rcu_read_lock() and freeing it with kfree_rcu(), ensuring the data remains valid during the completion handler execution.
Potential Impact
The vulnerability can cause a kernel crash due to a NULL pointer dereference triggered by a race condition in the zram writeback code. This could lead to denial of service on affected systems. There is no information about exploitation in the wild or privilege escalation.
Mitigation Recommendations
A fix has been implemented in the Linux kernel by applying RCU locking and deferred freeing (kfree_rcu) to prevent the use-after-free condition. Users should update their Linux kernel to a version that includes this patch. Patch status is not explicitly confirmed in the provided data; check the vendor or Linux kernel advisories for the exact fixed versions and apply updates accordingly.
In the Linux kernel, the following vulnerability has been resolved: zram: fix use-after-free in zram_writeback_endio A crash was observed in… (CVE-2026-63951)
Description
In the Linux kernel, the following vulnerability has been resolved: zram: fix use-after-free in zram_writeback_endio A crash was observed in zram_writeback_endio due to a NULL pointer dereference in wake_up. The root cause is a race condition between the bio completion handler (zram_writeback_endio) and the writeback task. In zram_writeback_endio, wake_up() is called on &wb_ctl->done_wait after releasing wb_ctl->done_lock. This creates a race window where the writeback task can see num_inflight become 0, return, and free wb_ctl before zram_writeback_endio calls wake_up(). CPU 0 (zram_writeback_endio) CPU 1 (writeback_store) ============================ ============================ zram_writeback_slots zram_submit_wb_request zram_submit_wb_request wait_event(wb_ctl->done_wait) spin_lock(&wb_ctl->done_lock); list_add(&req->entry, &wb_ctl->done_reqs); spin_unlock(&wb_ctl->done_lock); wake_up(&wb_ctl->done_wait); zram_complete_done_reqs spin_lock(&wb_ctl->done_lock); list_add(&req->entry, &wb_ctl->done_reqs); spin_unlock(&wb_ctl->done_lock); while (num_inflight) > 0) spin_lock(&wb_ctl->done_lock); list_del(&req->entry); spin_unlock(&wb_ctl->done_lock); // num_inflight becomes 0 atomic_dec(num_inflight); // Leave zram_writeback_slots // Free wb_ctl release_wb_ctl(wb_ctl); // UAF crash! wake_up(&wb_ctl->done_wait); This patch fixes this race by using RCU. By protecting wb_ctl with rcu_read_lock() in zram_writeback_endio and using kfree_rcu() to free it, we ensure that wb_ctl remains valid during the execution of zram_writeback_endio.
CVSS v3.1
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel's zram subsystem contained a use-after-free vulnerability in the zram_writeback_endio function. This was caused by a race condition where wake_up() was called on a data structure (wb_ctl->done_wait) after the structure could have been freed by another concurrent writeback task. Specifically, the writeback task could observe num_inflight reaching zero, return, and free wb_ctl before zram_writeback_endio called wake_up(), leading to a NULL pointer dereference and crash. The patch addressed this by protecting wb_ctl with rcu_read_lock() and freeing it with kfree_rcu(), ensuring the data remains valid during the completion handler execution.
Potential Impact
The vulnerability can cause a kernel crash due to a NULL pointer dereference triggered by a race condition in the zram writeback code. This could lead to denial of service on affected systems. There is no information about exploitation in the wild or privilege escalation.
Mitigation Recommendations
A fix has been implemented in the Linux kernel by applying RCU locking and deferred freeing (kfree_rcu) to prevent the use-after-free condition. Users should update their Linux kernel to a version that includes this patch. Patch status is not explicitly confirmed in the provided data; check the vendor or Linux kernel advisories for the exact fixed versions and apply updates accordingly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-jmwm-428x-w863
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-63951"]
- Ecosystems
- []
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a5d27aa2a4a8d598912e89d
Added to database: 07/19/2026, 19:38:18 UTC
Last enriched: 07/19/2026, 20:04:42 UTC
Last updated: 07/20/2026, 21:51:41 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.