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 008D826E158 for ; Fri, 9 May 2025 06:46:23 +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=1746773184; cv=none; b=l/59d9RNnrDd6mlKid9QVL12CN274duGN7OJJk4owXYOeka8sE4ugOnEF3ANFVfa0FEEy2MW+LAkQFvmMA4ew+dyVcZNrBXYkKkkH9/Yn4oC/TPiBQIUW5FJIdQZ7dO/qsta0CBQRutnlD9reRdG2KkaTVFopdQpuQy9jWnhHz0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746773184; c=relaxed/simple; bh=Rn/5nveD2UQv+msuhN9IUtsbpnxsdpWKlR/FJkKoQtQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YfCZh4B/AEWWNTgsxxyHiKWc08V4xt6x71bFuStcjxxaw34YzOfZ4/nmUhNfkIf0+J1exBljWIMBEPJcOmVz0vGWYzr0LMf0LXoxSybW+K8urDbLU1zaXPOnfFncc/KKSt2KrTuAyAaMQvT847TuYzIwSSTgZeQw5yuaS8iyG6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aLuwBAHS; 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="aLuwBAHS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7645EC4CEE4; Fri, 9 May 2025 06:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746773183; bh=Rn/5nveD2UQv+msuhN9IUtsbpnxsdpWKlR/FJkKoQtQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=aLuwBAHSAKTiY79yfR8ZmNWkUabUjMx2k9Cz3rsPSX8+ulPba+A1HwHE8BrRf3IT9 bWXeC9r63zrhnrRNgu8wzkCX2sBeo9gFYKn19ljgQx6GHr1pAzE4gLruEsITgAGP22 rjxWiBhitu0z/lsrUggv92YanTeJUizGRVrImNa8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37884: bpf: Fix deadlock between rcu_tasks_trace and event_mutex. Date: Fri, 9 May 2025 08:45:51 +0200 Message-ID: <2025050945-CVE-2025-37884-778b@gregkh> X-Mailer: git-send-email 2.49.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=2644; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kNHbxMbt1AZuC5KEh5mhfj9jjT5nf5yITYNEpU+IOjs=; b=kA0DAAIRMUfUDdst+ykByyZiAGgdpJmgcn904wamnCh8kZfAZIObjjWHxcTT2VRbA5MTVXICe YhdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmgdpJkACgkQMUfUDdst+ymQ/wCfXdSl leG8CCbtJ0FWvFykg9jihhwAnilvvCYVH1uFtG68dzEz+Sb6B7QG 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: Fix deadlock between rcu_tasks_trace and event_mutex. Fix the following deadlock: CPU A _free_event() perf_kprobe_destroy() mutex_lock(&event_mutex) perf_trace_event_unreg() synchronize_rcu_tasks_trace() There are several paths where _free_event() grabs event_mutex and calls sync_rcu_tasks_trace. Above is one such case. CPU B bpf_prog_test_run_syscall() rcu_read_lock_trace() bpf_prog_run_pin_on_cpu() bpf_prog_load() bpf_tracing_func_proto() trace_set_clr_event() mutex_lock(&event_mutex) Delegate trace_set_clr_event() to workqueue to avoid such lock dependency. The Linux kernel CVE team has assigned CVE-2025-37884 to this issue. Affected and fixed versions =========================== Fixed in 6.1.136 with commit 255cbc9db7067a83713fd2f4b31034ddd266549a Fixed in 6.6.89 with commit b5a528a34e1f613565115a7a6016862ccbfcb9ac Fixed in 6.12.26 with commit c5c833f6375f8ecf9254dd27946c927c7d645421 Fixed in 6.14.5 with commit 45286680b385f2592db3003554872388dee66d68 Fixed in 6.15-rc1 with commit 4580f4e0ebdf8dc8d506ae926b88510395a0c1d1 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-37884 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/bpf_trace.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/255cbc9db7067a83713fd2f4b31034ddd266549a https://git.kernel.org/stable/c/b5a528a34e1f613565115a7a6016862ccbfcb9ac https://git.kernel.org/stable/c/c5c833f6375f8ecf9254dd27946c927c7d645421 https://git.kernel.org/stable/c/45286680b385f2592db3003554872388dee66d68 https://git.kernel.org/stable/c/4580f4e0ebdf8dc8d506ae926b88510395a0c1d1