Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 921AC3DB646 for ; Wed, 6 May 2026 11:29:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778066945; cv=none; b=spDMPhNp1uixDZ/6BDg+fxh2E8Hmniepm/2gNcNs4UqUO3btnLSoW6i/MFFlTQrSbtrLrOsZo4Of3txS5R57Dg/BeyD+zNzDZtmerzGrIlDHJJeGknWj91E2gAjGNm4n/0IbKECADKZDMigSm6/LenLLn7RiBC5Rj7thNkqpMb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778066945; c=relaxed/simple; bh=AXMJ9nqJJwbdAbQXgJ31Z7Gr9yw7eREWWpnUJs1q5fU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YD8ntpzab6P6tJQO++r/LB577RsClRU5IvqWLq8f0XIqSMFrVdNr3LNWMIod3yY5fidqugdFW6DsrgyeP9iM4hV0APf7jzgoM1xOsfTS31XBjkPJcRFKzPnjetEI0gwLoioGbTIi9FCSmJIi6+RjvlNLW+DFaQGByoJnmxQRNG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sQFivH+S; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sQFivH+S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D89C9C2BCB8; Wed, 6 May 2026 11:29:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778066945; bh=AXMJ9nqJJwbdAbQXgJ31Z7Gr9yw7eREWWpnUJs1q5fU=; h=From:To:Cc:Subject:Date:Reply-To:From; b=sQFivH+S3WzSlGCnYmAKVIaL6dyRHWMF+01VOR4hPOLU/NKKF1ueU20ojZU20GLbF XQZzmlANdrmYiW0YGacYClI6w6MwTgmvbsTWNBAirujc881vcDaMnU70DSCgu3JEyB 7yPilacmTx5/Zw8dPNbBhZGiHhtFRsf2YTr2RQJQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-43121: io_uring/zcrx: fix user_ref race between scrub and refill paths Date: Wed, 6 May 2026 13:27:17 +0200 Message-ID: <2026050618-CVE-2026-43121-2a26@gregkh> X-Mailer: git-send-email 2.54.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=3338; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kH5L2l9Vg7rlnSAuDMw4NM0ty7+Ouh5RkAgNuMiVYok=; b=owGbwMvMwCRo6H6F97bub03G02pJDJm/VafxC3su6Yl5sdzb/m3VvZvOk2IEuksPt+gmiS0/1 ubTtImxI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYit5JhnoqDFK/TZaHcTTvK zm9s5z1xvOnhPYb5qXzh2/M6jmk18DFvbA9KWJWwKcsFAA== 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: io_uring/zcrx: fix user_ref race between scrub and refill paths The io_zcrx_put_niov_uref() function uses a non-atomic check-then-decrement pattern (atomic_read followed by separate atomic_dec) to manipulate user_refs. This is serialized against other callers by rq_lock, but io_zcrx_scrub() modifies the same counter with atomic_xchg() WITHOUT holding rq_lock. On SMP systems, the following race exists: CPU0 (refill, holds rq_lock) CPU1 (scrub, no rq_lock) put_niov_uref: atomic_read(uref) - 1 // window opens atomic_xchg(uref, 0) - 1 return_niov_freelist(niov) [PUSH #1] // window closes atomic_dec(uref) - wraps to -1 returns true return_niov(niov) return_niov_freelist(niov) [PUSH #2: DOUBLE-FREE] The same niov is pushed to the freelist twice, causing free_count to exceed nr_iovs. Subsequent freelist pushes then perform an out-of-bounds write (a u32 value) past the kvmalloc'd freelist array into the adjacent slab object. Fix this by replacing the non-atomic read-then-dec in io_zcrx_put_niov_uref() with an atomic_try_cmpxchg loop that atomically tests and decrements user_refs. This makes the operation safe against concurrent atomic_xchg from scrub without requiring scrub to acquire rq_lock. [pavel: removed a warning and a comment] The Linux kernel CVE team has assigned CVE-2026-43121 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 34a3e60821ab9f335a58d43a88cccdbefdebdec3 and fixed in 6.18.16 with commit a94f096e28bfc7975163a6b80f1c8f323efe317a Issue introduced in 6.15 with commit 34a3e60821ab9f335a58d43a88cccdbefdebdec3 and fixed in 6.19.6 with commit 485dc691257b96e6d3bdc25b0eff2daadcc5c46c Issue introduced in 6.15 with commit 34a3e60821ab9f335a58d43a88cccdbefdebdec3 and fixed in 7.0 with commit 003049b1c4fb8aabb93febb7d1e49004f6ad653b 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-43121 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: io_uring/zcrx.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/a94f096e28bfc7975163a6b80f1c8f323efe317a https://git.kernel.org/stable/c/485dc691257b96e6d3bdc25b0eff2daadcc5c46c https://git.kernel.org/stable/c/003049b1c4fb8aabb93febb7d1e49004f6ad653b