Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2895F3921CD for ; Sun, 19 Jul 2026 15:02:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784473359; cv=none; b=neju+1oi+r9f0MZsMT3WAh9pAyBKwu+qWX+xi9RmG1fHbhBrXJ/BfN/zl957IAthiB3NuCjjer9z8UcmQ59OsKsQNmUtHBInsizl5pvtwLgZdhO1dQUuzHVE+6YvmVob89dYbJayo9dPkvJu1RYhZoy5w2/iYTa5H3mEAi/gM+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784473359; c=relaxed/simple; bh=vQT4xJDsN0qnZmgAGwfpjSrNWwYDWlN6WZmt771ZI+U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DyK2mDbqrPDqlArVScRwuewc3gNcVk+tcm91Gp+jth65vwxaLIJWrdUmbAczMFbzhXTPSpkC84BidOU0A9k5pSt3rctWa7/QnKjrXKk75L2v6QMi8tCbV4SbHIaonku0MuWKWXBxId376k3G4DSc+QekdMgEMZUbn9rf+sOreDw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lLqZUc0/; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lLqZUc0/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6887A1F00A3A; Sun, 19 Jul 2026 15:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784473357; bh=yu7Xz0L0p12Nk5xxB/gFc0cKWi7caQFAO9X0il6iwHg=; h=From:To:Cc:Subject:Date:Reply-To; b=lLqZUc0/XkpweJ+VL7TqMu4roDj6kQHIJhLMePEzgG5/kFFz+6uCY6Xt+BrzMypXS d9XGdo3iABRD5BI80P+2rXvbbkfIz0hEb1cZoVjRa04hN8KM6RObCX3PlUmKQW1RAG JCB7pdhnbrXnffnQP93W1fNZw9uA6Jl40HZMgMAQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63951: zram: fix use-after-free in zram_writeback_endio Date: Sun, 19 Jul 2026 16:56:51 +0200 Message-ID: <2026071955-CVE-2026-63951-ab46@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3742; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tYoy98n4J7GDs+18SE2qdIJKgWJqUFp5ifHjHSP/UfQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxT6u9mNXCA/6s2yhVP+P0sxniRqe+P/cpNPZht2F5d rz4x3zWjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIhV6G+dWcVwpOVe09xFm+ bO2OqobWeIcZ/AwLli145uCZuvj4sXf9T7YolLkeuFi+AwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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. The Linux kernel CVE team has assigned CVE-2026-63951 to this issue. Affected and fixed versions =========================== Issue introduced in 6.19 with commit f405066a1f0db818270f49a5e96be329bcabde1e and fixed in 7.0.12 with commit ebe2cbefc86291fa7f386447a81995640df4e2fd Issue introduced in 6.19 with commit f405066a1f0db818270f49a5e96be329bcabde1e and fixed in 7.1 with commit bf62f69574b19720ae5fbbbcdf24a0c4e3e05e43 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-63951 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/block/zram/zram_drv.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/ebe2cbefc86291fa7f386447a81995640df4e2fd https://git.kernel.org/stable/c/bf62f69574b19720ae5fbbbcdf24a0c4e3e05e43