{"api_version":"1","generated_at":"2026-07-23T22:18:37+00:00","cve":"CVE-2026-63951","urls":{"html":"https://cve.report/CVE-2026-63951","api":"https://cve.report/api/cve/CVE-2026-63951.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-63951","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-63951"},"summary":{"title":"zram: fix use-after-free in zram_writeback_endio","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nzram: fix use-after-free in zram_writeback_endio\n\nA crash was observed in zram_writeback_endio due to a NULL pointer\ndereference in wake_up.  The root cause is a race condition between the\nbio completion handler (zram_writeback_endio) and the writeback task.\n\nIn zram_writeback_endio, wake_up() is called on &wb_ctl->done_wait after\nreleasing wb_ctl->done_lock.  This creates a race window where the\nwriteback task can see num_inflight become 0, return, and free wb_ctl\nbefore zram_writeback_endio calls wake_up().\n\nCPU 0 (zram_writeback_endio)     CPU 1 (writeback_store)\n============================     ============================\n                                 zram_writeback_slots\n                                   zram_submit_wb_request\n                                   zram_submit_wb_request\n                                   wait_event(wb_ctl->done_wait)\nspin_lock(&wb_ctl->done_lock);\nlist_add(&req->entry, &wb_ctl->done_reqs);\nspin_unlock(&wb_ctl->done_lock);\nwake_up(&wb_ctl->done_wait);\n                                   zram_complete_done_reqs\nspin_lock(&wb_ctl->done_lock);\nlist_add(&req->entry, &wb_ctl->done_reqs);\nspin_unlock(&wb_ctl->done_lock);\n                                   while (num_inflight) > 0)\n                                     spin_lock(&wb_ctl->done_lock);\n                                     list_del(&req->entry);\n                                     spin_unlock(&wb_ctl->done_lock);\n                                     // num_inflight becomes 0\n                                     atomic_dec(num_inflight);\n\n                                 // Leave zram_writeback_slots\n                                 // Free wb_ctl\n                                 release_wb_ctl(wb_ctl);\n// UAF crash!\nwake_up(&wb_ctl->done_wait);\n\nThis patch fixes this race by using RCU.  By protecting wb_ctl with\nrcu_read_lock() in zram_writeback_endio and using kfree_rcu() to free it,\nwe ensure that wb_ctl remains valid during the execution of\nzram_writeback_endio.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-07-19 16:17:13","updated_at":"2026-07-20 15:16:58"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/bf62f69574b19720ae5fbbbcdf24a0c4e3e05e43","name":"https://git.kernel.org/stable/c/bf62f69574b19720ae5fbbbcdf24a0c4e3e05e43","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ebe2cbefc86291fa7f386447a81995640df4e2fd","name":"https://git.kernel.org/stable/c/ebe2cbefc86291fa7f386447a81995640df4e2fd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-63951","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63951","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f405066a1f0db818270f49a5e96be329bcabde1e ebe2cbefc86291fa7f386447a81995640df4e2fd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f405066a1f0db818270f49a5e96be329bcabde1e bf62f69574b19720ae5fbbbcdf24a0c4e3e05e43 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.19","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0.12 7.0.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"63951","cve":"CVE-2026-63951","epss":"0.002070000","percentile":"0.109150000","score_date":"2026-07-20","updated_at":"2026-07-21 00:13:13"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/block/zram/zram_drv.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"ebe2cbefc86291fa7f386447a81995640df4e2fd","status":"affected","version":"f405066a1f0db818270f49a5e96be329bcabde1e","versionType":"git"},{"lessThan":"bf62f69574b19720ae5fbbbcdf24a0c4e3e05e43","status":"affected","version":"f405066a1f0db818270f49a5e96be329bcabde1e","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/block/zram/zram_drv.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.19"},{"lessThan":"6.19","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.0.*","status":"unaffected","version":"7.0.12","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0.12","versionStartIncluding":"6.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.1","versionStartIncluding":"6.19","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nzram: fix use-after-free in zram_writeback_endio\n\nA crash was observed in zram_writeback_endio due to a NULL pointer\ndereference in wake_up.  The root cause is a race condition between the\nbio completion handler (zram_writeback_endio) and the writeback task.\n\nIn zram_writeback_endio, wake_up() is called on &wb_ctl->done_wait after\nreleasing wb_ctl->done_lock.  This creates a race window where the\nwriteback task can see num_inflight become 0, return, and free wb_ctl\nbefore zram_writeback_endio calls wake_up().\n\nCPU 0 (zram_writeback_endio)     CPU 1 (writeback_store)\n============================     ============================\n                                 zram_writeback_slots\n                                   zram_submit_wb_request\n                                   zram_submit_wb_request\n                                   wait_event(wb_ctl->done_wait)\nspin_lock(&wb_ctl->done_lock);\nlist_add(&req->entry, &wb_ctl->done_reqs);\nspin_unlock(&wb_ctl->done_lock);\nwake_up(&wb_ctl->done_wait);\n                                   zram_complete_done_reqs\nspin_lock(&wb_ctl->done_lock);\nlist_add(&req->entry, &wb_ctl->done_reqs);\nspin_unlock(&wb_ctl->done_lock);\n                                   while (num_inflight) > 0)\n                                     spin_lock(&wb_ctl->done_lock);\n                                     list_del(&req->entry);\n                                     spin_unlock(&wb_ctl->done_lock);\n                                     // num_inflight becomes 0\n                                     atomic_dec(num_inflight);\n\n                                 // Leave zram_writeback_slots\n                                 // Free wb_ctl\n                                 release_wb_ctl(wb_ctl);\n// UAF crash!\nwake_up(&wb_ctl->done_wait);\n\nThis patch fixes this race by using RCU.  By protecting wb_ctl with\nrcu_read_lock() in zram_writeback_endio and using kfree_rcu() to free it,\nwe ensure that wb_ctl remains valid during the execution of\nzram_writeback_endio."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"providerMetadata":{"dateUpdated":"2026-07-20T13:41:50.089Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/ebe2cbefc86291fa7f386447a81995640df4e2fd"},{"url":"https://git.kernel.org/stable/c/bf62f69574b19720ae5fbbbcdf24a0c4e3e05e43"}],"title":"zram: fix use-after-free in zram_writeback_endio","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-63951","datePublished":"2026-07-19T14:55:44.105Z","dateReserved":"2026-07-19T07:54:57.023Z","dateUpdated":"2026-07-20T13:41:50.089Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-07-19 16:17:13","lastModifiedDate":"2026-07-20 15:16:58","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"63951","Ordinal":"1","Title":"zram: fix use-after-free in zram_writeback_endio","CVE":"CVE-2026-63951","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"63951","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nzram: fix use-after-free in zram_writeback_endio\n\nA crash was observed in zram_writeback_endio due to a NULL pointer\ndereference in wake_up.  The root cause is a race condition between the\nbio completion handler (zram_writeback_endio) and the writeback task.\n\nIn zram_writeback_endio, wake_up() is called on &wb_ctl->done_wait after\nreleasing wb_ctl->done_lock.  This creates a race window where the\nwriteback task can see num_inflight become 0, return, and free wb_ctl\nbefore zram_writeback_endio calls wake_up().\n\nCPU 0 (zram_writeback_endio)     CPU 1 (writeback_store)\n============================     ============================\n                                 zram_writeback_slots\n                                   zram_submit_wb_request\n                                   zram_submit_wb_request\n                                   wait_event(wb_ctl->done_wait)\nspin_lock(&wb_ctl->done_lock);\nlist_add(&req->entry, &wb_ctl->done_reqs);\nspin_unlock(&wb_ctl->done_lock);\nwake_up(&wb_ctl->done_wait);\n                                   zram_complete_done_reqs\nspin_lock(&wb_ctl->done_lock);\nlist_add(&req->entry, &wb_ctl->done_reqs);\nspin_unlock(&wb_ctl->done_lock);\n                                   while (num_inflight) > 0)\n                                     spin_lock(&wb_ctl->done_lock);\n                                     list_del(&req->entry);\n                                     spin_unlock(&wb_ctl->done_lock);\n                                     // num_inflight becomes 0\n                                     atomic_dec(num_inflight);\n\n                                 // Leave zram_writeback_slots\n                                 // Free wb_ctl\n                                 release_wb_ctl(wb_ctl);\n// UAF crash!\nwake_up(&wb_ctl->done_wait);\n\nThis patch fixes this race by using RCU.  By protecting wb_ctl with\nrcu_read_lock() in zram_writeback_endio and using kfree_rcu() to free it,\nwe ensure that wb_ctl remains valid during the execution of\nzram_writeback_endio.","Type":"Description","Title":"zram: fix use-after-free in zram_writeback_endio"}]}}}