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 E0EDD495042 for ; Fri, 25 Sep 2026 10:34:54 +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=1790332496; cv=none; b=GAFR6tl+hrac3kOBoDVSrmBQbX3407K+AaKbAzrb7tosjYUCjCXUtEixrfeOTxlJ0ZO3OEAdutSNo+yJAVU4V2f6i/VUOhlKboW701v256Vyv7NPs37JkLDI3UZ8tlHOhFpMzwAOcbMTb/z1ayssFmH32RkkG//71UClEhV1Bwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332496; c=relaxed/simple; bh=2XyZZaj/MK1TuJ6XPJelgKMITScwPSzvl4UPbzwYmD4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OlCi48YJ0hkbyecicAmfwaR6zzj3svGqRG0zCcXzKTX7JNTxLaovO+bVOuNFhI5OgnqBQnh0x5e85UFNlxeQqepqL0u0vJx3QRBPxdUbeZDEDzBeOZ7wa8/jpPkQUCcrwj1M0yVSmgvwj8F3Bv8mXPrTlYMA2TMmbpfcNL0Uv/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0nu/AVot; 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="0nu/AVot" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 384531F000FF; Fri, 25 Sep 2026 10:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790332494; bh=yCvVHYlSTFBG7T9gb4Rnm4P8DVBjtfhG5qhL/gTLDho=; h=From:To:Cc:Subject:Date:Reply-To; b=0nu/AVot01S1a22Wde8kbLMtBVv77fA7J8DBBCFH8IH6GkEJyS13T4Ga7tT95pEM9 XS72LnXkZmhAKu1/AHhhaYCCW2DX2B+eYLOuNA2RYln59uunMf8zUhC+dI1qvk3eOX ngILkZnBfl1c7QVKl+9gWodTBi293aT97xK4iCFo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98040: bpf: Mark the zero register precise for a register-form NULL check Date: Fri, 25 Sep 2026 12:25:42 +0200 Message-ID: <2026092530-CVE-2026-98040-96bf@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=2704; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UqGPoySEB8qtn2iCXgG32ggb+uj7Q1STcfMnlCTTk5o=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnbvNPKGzY65bQKLzY7+eHrNO0YBakmtduvjk84zO93U aVMd/KSjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAbjJGQzzLBrUVCWvLQlMPsdQ fPm076emm1f9GRbsmhPaHFg0aVkwOxenrZXjZJnwNEMA 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: Mark the zero register precise for a register-form NULL check check_cond_jmp_op() accepts "if rA rB" as a NULL check for a nullable pointer rA when rB is a scalar known to be zero, lifts PTR_MAYBE_NULL from rA in the corresponding branch and does not mark rB precise. Consider the following program: r0 = bpf_get_prandom_u32(); r6 = 1; /* the r6 == 0 path is explored first */ if (r0 == 0) goto 1f; r6 = 0; 1: r0 = bpf_map_lookup_elem(map, &0); /* absent, NULL at runtime */ if (r0 == r6) goto 2f; /* taken as a NULL check for r0 */ *(u8 *)(r0 + 0); /* verifier: map value; runtime: zero */ 2: return 0; The r6 == 0 path is explored first and the dereference is accepted. The r6 == 1 path is pruned at the checkpoint recorded for (1), so the comparison is never verified with a non-zero r6. At runtime a failed lookup returns NULL, NULL != 1 takes the non-NULL edge and the program dereferences a pointer that is zero. The Linux kernel CVE team has assigned CVE-2026-98040 to this issue. Affected and fixed versions =========================== Issue introduced in 7.1 with commit 2f4cb53eed448c1aeb6f4b40cf9c810716d8218c and fixed in 7.2.7 with commit ddca9a3b8833168dda3e62676648a636fb3f221c Issue introduced in 7.1 with commit 2f4cb53eed448c1aeb6f4b40cf9c810716d8218c and fixed in 7.3-rc2 with commit 6aed0134d3cda6382385a734ae0158eb7df6b142 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-98040 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/ddca9a3b8833168dda3e62676648a636fb3f221c https://git.kernel.org/stable/c/6aed0134d3cda6382385a734ae0158eb7df6b142