From mboxrd@z Thu Jan 1 00:00:00 1970 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 DAA8E368D60 for ; Sun, 18 Oct 2026 15:36:41 +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=1792337803; cv=none; b=YWlyKwo8Y/VDg36KlhmihpitLUE+GDovIwEgPBbXB91H2WNgNs4asHn6M/Pb4ScpIA1vG2VcW/rX4Jg8U7RlO7phUVaVVvYpEth9KYE7L7tXDnhdfkiJ4zoaat0BrXpLgonA+daMLX7WfqT0/Y+Gux8X/ctCQcsMOIZx1cWMW9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792337803; c=relaxed/simple; bh=9jOffZgAtugkhkvh9pKHGRyMfIqTG/AoWdn88q1QqpA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WFOj9L9vmjoHNdfaU4g0ams22PBoNSEzpfe2FPZIRdgptLHd2hHSCNF2k2cI7AC9Kbyws886cbfOOS9X9MVBHoohZSzJnu+azz4ixszqmuJeU0FJV77iXsUTOlcCvx88zq5blNIam2tR3KORDGdgHszterY5z4vC6jWzNbCC5xk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Jo3FogU7; 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="Jo3FogU7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05EC31F000C4; Sun, 18 Oct 2026 15:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792337801; bh=mi+Kb0wDcumzK5l0ATymYLHcS8R6wSCX3x08bFNaNEo=; h=From:To:Cc:Subject:Date:Reply-To; b=Jo3FogU7smdIDkURiyFiqrFi5RtlumDX3LeAMFFbC1OitZmxmOIbiyjIdG4UOazDP HRQz1XccALDt/9Yg0hFEVjW0hZqCdSp8NIilenK824033P9HOko0pmCTJtuqpliG6T NS4fo7ohs4MulEAcM72npNUsOoDq/Jka/V60HFgg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98641: bpf, arm64: set up the frame pointer for the exception callback Date: Sun, 18 Oct 2026 17:18:25 +0200 Message-ID: <2026101846-CVE-2026-98641-911e@gregkh> X-Mailer: git-send-email 2.56.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=3958; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yulnNjZ8/am8JUkZhcOMD+n6AZW5Dkbp4HvNlaEuHv0=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlXHi2KtE+VvLBVLj18/pzM/jsGTlke9zMyVW3Kz+svn GF3xby/I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACayqJNhDj/3x0lt/1TX3TLr mD374qVJgYu/LmSY77Uiea+J0qk/q+Z2bDJceV3kpq+mGgA= 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, arm64: set up the frame pointer for the exception callback A program acting as exception boundary saves all callee-saved registers, so build_prologue() takes the exception_cb path and never calls push_callee_regs(). That is the only place find_used_callee_regs() runs, and with it the only place ctx->fp_used is set, so the callback prologue does not emit the mov x25, sp that points BPF_REG_FP at the frame the callback runs on. x25 keeps whatever it held when bpf_throw() was called. If the throw came from a subprogram that uses its own BPF stack, that is the subprogram's frame pointer, and since the subprogram never returns it never restores x25 either. Stack accesses through BPF_REG_FP are rewritten to be stack pointer relative, so those still land in the callback's own frame. Materializing the register does not: a callback that passes the address of a local variable to a helper hands over an address in the dead subprogram's frame. That address is below the callback's stack pointer by then, and the helper's own call chain covers it, so the helper can write over its own return address. 0x1234 below is the value the helper was asked to store: pc : 0x1234 lr : 0x1234 Call trace: 0x1234 (P) bpf_test_run+0x188/0x3e0 bpf_prog_test_run_skb+0x47c/0x998 __sys_bpf+0xbdc/0xdd8 Kernel panic - not syncing: Oops: Fatal exception in interrupt Set ctx->fp_used on the exception callback path so that the existing code further down sets x25 from the stack pointer. The epilogue restores it from the main program's save area along with the other callee-saved registers, as it already does. x86 sets the frame pointer for the callback from the argument it is passed, and powerpc computes it from the stack pointer. The Linux kernel CVE team has assigned CVE-2026-98641 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff and fixed in 6.12.112 with commit ecdd770a9fc3eaf6c3127c5991312b84774a7b0f Issue introduced in 6.12 with commit 5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff and fixed in 6.18.55 with commit b67b4c763f211e7a6391c356fef552e2ea63f08a Issue introduced in 6.12 with commit 5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff and fixed in 7.2.9 with commit d7cd5ebe13989f265015910faa25e5d50faa4c22 Issue introduced in 6.12 with commit 5d4fa9ec5643a5c75d3c1e6abf50fb9284caf1ff and fixed in 7.3-rc5 with commit ef1fb82f12186dd26153b14d9fbcf4ec98db81b3 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-98641 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: arch/arm64/net/bpf_jit_comp.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/ecdd770a9fc3eaf6c3127c5991312b84774a7b0f https://git.kernel.org/stable/c/b67b4c763f211e7a6391c356fef552e2ea63f08a https://git.kernel.org/stable/c/d7cd5ebe13989f265015910faa25e5d50faa4c22 https://git.kernel.org/stable/c/ef1fb82f12186dd26153b14d9fbcf4ec98db81b3