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 B38C23F076D for ; Wed, 27 May 2026 12:24:25 +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=1779884666; cv=none; b=UfQNT/V1OXDHcBsm/0UO9sPgyhA2GbJudDdStiXT2ztzIaa/EopCYgMtMuWPbp6rw8nW2XDDDHNY7BNiMEAT60+pXNF058RmDOE5z5jM30jiokO34daMC+U4JbK1BYi0tz0BM61z8rW3VyR+8Mi+RvPABIJgvyCSAf6yjhAp8ro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884666; c=relaxed/simple; bh=P0xyMOxT+WUtU4163VZsXGVugqxVCGwHnizCXvFYB6Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BZfFy/df4fsLJYGpQZtR7YM/gENNnn5GEl7hEGsGAtOwHYA50KyysrlPjN8BGuDVx3ROmUlvfrPloKby33kScynNUDsPJimYGVMn818mrxASSaXdGscfDxNO/voqBtiLN0zgFfL3hoahBMPqk4DG3mCmQuNS/KCbbBVzz4usZ5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MOyzFrVs; 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="MOyzFrVs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 142EE1F000E9; Wed, 27 May 2026 12:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779884665; bh=TRTtCKQ2W9Uu8QDoS7y++EoX/KkkQN8B7w66FTFo/nw=; h=From:To:Cc:Subject:Date:Reply-To; b=MOyzFrVsqDjjKF33HquzNtBJdljclOLrVaBSJrPhPhUZhNF242zVFjQoXiPM0OBIF mu28dIIm1ROVFH4KeZIsnbOkwxSrGlGwjlkXxf01Vmj7D0XFmkC2KqQdlBGoYpjr1J qgwgiF2N+2Mf6Mz/b3ryOrUECEJ0/xLO04NVwFyo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-45933: bpf: Preserve id of register in sync_linked_regs() Date: Wed, 27 May 2026 14:19:35 +0200 Message-ID: <2026052727-CVE-2026-45933-ed08@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=4860; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HL/VwuqLIEMJNhF0r0pl15qIsxrjs+arP26OmICZAqI=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliD4WzbnBvs9VdP0uTzzzyJ6uQxK4Y8yPz7tRy6u+LT rnIvWpZRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkXhvDgktvv4cH/apmKSo6 rqq8T6jY+8DBZQxzZXVqpFLX68vdWqQ+961z1K6lu670AgA= 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: bpf: Preserve id of register in sync_linked_regs() sync_linked_regs() copies the id of known_reg to reg when propagating bounds of known_reg to reg using the off of known_reg, but when known_reg was linked to reg like: known_reg = reg ; both known_reg and reg get same id known_reg += 4 ; known_reg gets off = 4, and its id gets BPF_ADD_CONST now when a call to sync_linked_regs() happens, let's say with the following: if known_reg >= 10 goto pc+2 known_reg's new bounds are propagated to reg but now reg gets BPF_ADD_CONST from the copy. This means if another link to reg is created like: another_reg = reg ; another_reg should get the id of reg but assign_scalar_id_before_mov() sees BPF_ADD_CONST on reg and assigns a new id to it. As reg has a new id now, known_reg's link to reg is broken. If we find new bounds for known_reg, they will not be propagated to reg. This can be seen in the selftest added in the next commit: 0: (85) call bpf_get_prandom_u32#7 ; R0=scalar() 1: (57) r0 &= 255 ; R0=scalar(smin=smin32=0,smax=umax=smax32=umax32=255,var_off=(0x0; 0xff)) 2: (bf) r1 = r0 ; R0=scalar(id=1,smin=smin32=0,smax=umax=smax32=umax32=255,var_off=(0x0; 0xff)) R1=scalar(id=1,smin=smin32=0,smax=umax=smax32=umax32=255,var_off=(0x0; 0xff)) 3: (07) r1 += 4 ; R1=scalar(id=1+4,smin=umin=smin32=umin32=4,smax=umax=smax32=umax32=259,var_off=(0x0; 0x1ff)) 4: (a5) if r1 < 0xa goto pc+4 ; R1=scalar(id=1+4,smin=umin=smin32=umin32=10,smax=umax=smax32=umax32=259,var_off=(0x0; 0x1ff)) 5: (bf) r2 = r0 ; R0=scalar(id=2,smin=umin=smin32=umin32=6,smax=umax=smax32=umax32=255) R2=scalar(id=2,smin=umin=smin32=umin32=6,smax=umax=smax32=umax32=255) 6: (a5) if r1 < 0xe goto pc+2 ; R1=scalar(id=1+4,smin=umin=smin32=umin32=14,smax=umax=smax32=umax32=259,var_off=(0x0; 0x1ff)) 7: (35) if r0 >= 0xa goto pc+1 ; R0=scalar(id=2,smin=umin=smin32=umin32=6,smax=umax=smax32=umax32=9,var_off=(0x0; 0xf)) 8: (37) r0 /= 0 div by zero When 4 is verified, r1's bounds are propagated to r0 but r0 also gets BPF_ADD_CONST (bug). When 5 is verified, r0 gets a new id (2) and its link with r1 is broken. After 6 we know r1 has bounds [14, 259] and therefore r0 should have bounds [10, 255], therefore the branch at 7 is always taken. But because r0's id was changed to 2, r1's new bounds are not propagated to r0. The verifier still thinks r0 has bounds [6, 255] before 7 and execution can reach div by zero. Fix this by preserving id in sync_linked_regs() like off and subreg_def. The Linux kernel CVE team has assigned CVE-2026-45933 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 98d7ca374ba4b39e7535613d40e159f09ca14da2 and fixed in 6.12.75 with commit 58059335e46537de682db84984f7716c813208c4 Issue introduced in 6.11 with commit 98d7ca374ba4b39e7535613d40e159f09ca14da2 and fixed in 6.18.14 with commit 92a8cb1806adefb263cf096eab6705705cf7eee1 Issue introduced in 6.11 with commit 98d7ca374ba4b39e7535613d40e159f09ca14da2 and fixed in 6.19.4 with commit 65d114b5270b62aefb820ecd6c3b7caeea8f895d Issue introduced in 6.11 with commit 98d7ca374ba4b39e7535613d40e159f09ca14da2 and fixed in 7.0 with commit af9e89d8dd39530c8bd14c33ddf6b502df1071b6 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-45933 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: kernel/bpf/verifier.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/58059335e46537de682db84984f7716c813208c4 https://git.kernel.org/stable/c/92a8cb1806adefb263cf096eab6705705cf7eee1 https://git.kernel.org/stable/c/65d114b5270b62aefb820ecd6c3b7caeea8f895d https://git.kernel.org/stable/c/af9e89d8dd39530c8bd14c33ddf6b502df1071b6