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 76396302777 for ; Wed, 12 Nov 2025 10:24:43 +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=1762943083; cv=none; b=Wo++mF4vZ4XkL3D04PDqTuqXcqhbF/cfP7Z0WIhyTuQykRiAyA0uPUkbFaTFRiXguQyjVGQaxED/Tz1DaIgQUgmHR8HwNrPARtN6ZombLEVU+tIdHy+xhovIk0knDmWHZWGEfUASZTb/V+yH7R9BAkyqFo4EuEJ/ISYVLLPwuS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762943083; c=relaxed/simple; bh=faf3Ol82M2bf/nYDKbSwRQDircBWPcptZ4YORPkqBeo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n8vB3navPtSkneCNw8UMQPwz/1SBKzXsQa+sxz9D8MOWKQ3tJfV7X4362eG+8oapePz2pjfrrBSjAlNWx/cGpVTWMnGAqqIap86iPmrNKTQRtm+Ub2Urcq9BWOrmMy1+otMqs9PsgNEweGroptTF3Ty1r0RGLg6zxAIgvHR03pU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JVg7AKPX; 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="JVg7AKPX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AFEAC2BC86; Wed, 12 Nov 2025 10:24:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762943083; bh=faf3Ol82M2bf/nYDKbSwRQDircBWPcptZ4YORPkqBeo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JVg7AKPXPvY6Z0rBqIVnXZzXB3UWAhVpZQR49hb5V/stxIHZSR7ZPF+MXSldBGl6Y HGy4NxzQUMKxNk3HvKAq7yj+DWHCaqCkkC3nU9B67uhEm+0uKsl5nO9IiCPbepsevt qOTogwRuPcQOOtF1Kh0MQMlEDeE7P25/sRY82gBg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40151: LoongArch: BPF: No support of struct argument in trampoline programs Date: Wed, 12 Nov 2025 19:24:27 +0900 Message-ID: <2025111257-CVE-2025-40151-6cb9@gregkh> X-Mailer: git-send-email 2.51.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4094; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=e6lWoPNHpTwfFE0VlMehB+vc0WJOFGeUXsWurwMKoZc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkiCbZHpL/eCvm/10/6eeENX3HnJ082eajXCL9Zd+xAe NCNG2scOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiD48xzHf9ndC1XGRp0u9f nCe2Zi5O2SQeMI1hQd+hJv2bgRv/u3YqsH/oMwq4yHE+CQA= 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: LoongArch: BPF: No support of struct argument in trampoline programs The current implementation does not support struct argument. This causes a oops when running bpf selftest: $ ./test_progs -a tracing_struct Oops[#1]: CPU -1 Unable to handle kernel paging request at virtual address 0000000000000018, era == 9000000085bef268, ra == 90000000844f3938 rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: rcu: 1-...0: (19 ticks this GP) idle=1094/1/0x4000000000000000 softirq=1380/1382 fqs=801 rcu: (detected by 0, t=5252 jiffies, g=1197, q=52 ncpus=4) Sending NMI from CPU 0 to CPUs 1: rcu: rcu_preempt kthread starved for 2495 jiffies! g1197 f0x0 RCU_GP_DOING_FQS(6) ->state=0x0 ->cpu=2 rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_preempt state:I stack:0 pid:15 tgid:15 ppid:2 task_flags:0x208040 flags:0x00000800 Stack : 9000000100423e80 0000000000000402 0000000000000010 90000001003b0680 9000000085d88000 0000000000000000 0000000000000040 9000000087159350 9000000085c2b9b0 0000000000000001 900000008704a000 0000000000000005 00000000ffff355b 00000000ffff355b 0000000000000000 0000000000000004 9000000085d90510 0000000000000000 0000000000000002 7b5d998f8281e86e 00000000ffff355c 7b5d998f8281e86e 000000000000003f 9000000087159350 900000008715bf98 0000000000000005 9000000087036000 900000008704a000 9000000100407c98 90000001003aff80 900000008715c4c0 9000000085c2b9b0 00000000ffff355b 9000000085c33d3c 00000000000000b4 0000000000000000 9000000007002150 00000000ffff355b 9000000084615480 0000000007000002 ... Call Trace: [<9000000085c2a868>] __schedule+0x410/0x1520 [<9000000085c2b9ac>] schedule+0x34/0x190 [<9000000085c33d38>] schedule_timeout+0x98/0x140 [<90000000845e9120>] rcu_gp_fqs_loop+0x5f8/0x868 [<90000000845ed538>] rcu_gp_kthread+0x260/0x2e0 [<900000008454e8a4>] kthread+0x144/0x238 [<9000000085c26b60>] ret_from_kernel_thread+0x28/0xc8 [<90000000844f20e4>] ret_from_kernel_thread_asm+0xc/0x88 rcu: Stack dump where RCU GP kthread last ran: Sending NMI from CPU 0 to CPUs 2: NMI backtrace for cpu 2 skipped: idling at idle_exit+0x0/0x4 Reject it for now. The Linux kernel CVE team has assigned CVE-2025-40151 to this issue. Affected and fixed versions =========================== Issue introduced in 6.17 with commit f9b6b41f0cf31791541cea9644ddbedb46465801 and fixed in 6.17.3 with commit d1158559315143e11bfaabcd4b2bea98c7ed1be9 Issue introduced in 6.17 with commit f9b6b41f0cf31791541cea9644ddbedb46465801 and fixed in 6.18-rc1 with commit e82406c7cbdd368c5459b8a45e118811d2ba0794 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-2025-40151 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/loongarch/net/bpf_jit.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/d1158559315143e11bfaabcd4b2bea98c7ed1be9 https://git.kernel.org/stable/c/e82406c7cbdd368c5459b8a45e118811d2ba0794