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 8D33326F44C for ; Sat, 4 Oct 2025 15:19:29 +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=1759591169; cv=none; b=nwgocSpdsglvZNGgmKHG+cDkIvK0oRztGXbe0e4LgHfJ0dhFHM4nJrYqJJt4cA4t1IvHuNtl18jIdxbfTgVSPJtmer5mCkCSBfd0SjqDzoY2QMbpgqDY20av5qQec/XbLn7Co2VsWZViqpNCTHXVQYvxc1/Wd7P7qlAUalyDi54= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759591169; c=relaxed/simple; bh=HKCrCCZjWvRfyJTTzV9ZzY6VWMTZf2h1NCRCM3MOkmI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DBU699QYmaQr7Sp/URP+QIPyWC9ZoDZtm8kRcaoj2wX5OjSG5/NWTx7RAUADFthJ9lsUp2HJhroc54sYOT1PH6I9sbWo2mx5k7bsWPWSXthAE0MXgy1kmCkptzyLtvw5NW/c6ILD5o7zqatqHYx1i1y0w+OoULfZ9bkp8dCbpZ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=r7cryjpE; 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="r7cryjpE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A442C4CEF1; Sat, 4 Oct 2025 15:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759591169; bh=HKCrCCZjWvRfyJTTzV9ZzY6VWMTZf2h1NCRCM3MOkmI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=r7cryjpEScSpGbBEONYlyLtjRUgOXC82JCqA/p6lc/FxGwxnMIWjkgpAb4KJC9or1 AL9J2EHke7HfRK0Gk+jmLimAlFLEkZCENIJQttl1zXG1v5LzJ88jPP9RhdiUzEEwai e3Lj4Kj446fmu0+sXdyohgdxxkh8UeWcU0gUqqzI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53557: fprobe: Release rethook after the ftrace_ops is unregistered Date: Sat, 4 Oct 2025 17:17:11 +0200 Message-ID: <2025100449-CVE-2023-53557-e7ba@gregkh> X-Mailer: git-send-email 2.51.0 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=2921; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mQX08OSuVRkvRq0dEE03O3OIbWNx27cppI91af0YBAQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPrRLvFwabREs9+GzFxL9j8uWlt5w+c5/IVrm67vgei bSU22sed8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEJGIYFjQXtCh+enqvtFRj 2fw6q/zsqIthCQwLdnqdzVdrLpr8yezptmSmC7MPNgRsAwA= 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: fprobe: Release rethook after the ftrace_ops is unregistered While running bpf selftests it's possible to get following fault: general protection fault, probably for non-canonical address \ 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC NOPTI ... Call Trace: fprobe_handler+0xc1/0x270 ? __pfx_bpf_testmod_init+0x10/0x10 ? __pfx_bpf_testmod_init+0x10/0x10 ? bpf_fentry_test1+0x5/0x10 ? bpf_fentry_test1+0x5/0x10 ? bpf_testmod_init+0x22/0x80 ? do_one_initcall+0x63/0x2e0 ? rcu_is_watching+0xd/0x40 ? kmalloc_trace+0xaf/0xc0 ? do_init_module+0x60/0x250 ? __do_sys_finit_module+0xac/0x120 ? do_syscall_64+0x37/0x90 ? entry_SYSCALL_64_after_hwframe+0x72/0xdc In unregister_fprobe function we can't release fp->rethook while it's possible there are some of its users still running on another cpu. Moving rethook_free call after fp->ops is unregistered with unregister_ftrace_function call. The Linux kernel CVE team has assigned CVE-2023-53557 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 5b0ab78998e32564a011b14c4c7f9c81e2d42b9d and fixed in 6.1.40 with commit ce3ec57faff559ccae1e0150c1f077eb2df648a4 Issue introduced in 5.18 with commit 5b0ab78998e32564a011b14c4c7f9c81e2d42b9d and fixed in 6.4.5 with commit 03d63255a5783243c110aec5e6ae2f1475c3be76 Issue introduced in 5.18 with commit 5b0ab78998e32564a011b14c4c7f9c81e2d42b9d and fixed in 6.5 with commit 5f81018753dfd4989e33ece1f0cb6b8aae498b82 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-2023-53557 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/trace/fprobe.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/ce3ec57faff559ccae1e0150c1f077eb2df648a4 https://git.kernel.org/stable/c/03d63255a5783243c110aec5e6ae2f1475c3be76 https://git.kernel.org/stable/c/5f81018753dfd4989e33ece1f0cb6b8aae498b82