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 52DD9BE46 for ; Sat, 16 Aug 2025 11:14:37 +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=1755342879; cv=none; b=ET4do9GUx2ZrVQ3bqI1elqHknqexDTzk5QRb5QUpmACsjpf1yYzKAEvlHwXMhaMw/CVenilCojkDeeF1h1jofHo6xKnl6mim0DLU05qj5M+eP8C5nxQT7/mj5cnOpoWzcFowzcBwori7fQVEqAa2sz1w03vKpN/G5oKhvweRjAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755342879; c=relaxed/simple; bh=CtSgk4g/prBtfs9mlnpdPNNvYMIJN3W59/zbgTZrcCg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EW0o3d/ZjChcfDe3dJpcIltPLi5stPmFufRDKNVgIjrCBIghw41xiyHkHThKJZKUGoLn66/ngIziOjaqfg39SQxi7utpk5gkGImhbLpc6g4xh3WLC9QYa3FEoUEJM0avL4uDomE5v9/8nRhQ3ZkRB5bIijX2oZdsuXfKX0nvEv4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EkgmBcfX; 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="EkgmBcfX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59ED5C4CEEF; Sat, 16 Aug 2025 11:14:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755342877; bh=CtSgk4g/prBtfs9mlnpdPNNvYMIJN3W59/zbgTZrcCg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=EkgmBcfXO8WtpdvUrJe554qBrSjVs1auC2SGUqTAVY35hL7/aisfW5JG0uHn+OmKN QV+iXfcrJ+IH2vWMf1lIMWluVlV15zAfFmI5+kIEljXngtdhLPwkWEmGPotv6D6apg wAq62ewntz6c4+lGZrlAjN4JIqU1mo8cQHoVZoCc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38524: rxrpc: Fix recv-recv race of completed call Date: Sat, 16 Aug 2025 13:13:55 +0200 Message-ID: <2025081653-CVE-2025-38524-7277@gregkh> X-Mailer: git-send-email 2.50.1 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=3592; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=STcbLMQhl0SA944+KHDQpHPY35/IV1DEhxAZuHUIL8Y=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkL0j/O6xS5tDzM43TSljU7DnPYfQ9+ZK6YVjld/9j1X fITrcLndsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEWFYzzNM8+V3zbE2leyuj 9H3nV7k7t68wv8iwoNHwrmJV73upnf4M3RPWOO+N5JnMCAA= 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: rxrpc: Fix recv-recv race of completed call If a call receives an event (such as incoming data), the call gets placed on the socket's queue and a thread in recvmsg can be awakened to go and process it. Once the thread has picked up the call off of the queue, further events will cause it to be requeued, and once the socket lock is dropped (recvmsg uses call->user_mutex to allow the socket to be used in parallel), a second thread can come in and its recvmsg can pop the call off the socket queue again. In such a case, the first thread will be receiving stuff from the call and the second thread will be blocked on call->user_mutex. The first thread can, at this point, process both the event that it picked call for and the event that the second thread picked the call for and may see the call terminate - in which case the call will be "released", decoupling the call from the user call ID assigned to it (RXRPC_USER_CALL_ID in the control message). The first thread will return okay, but then the second thread will wake up holding the user_mutex and, if it sees that the call has been released by the first thread, it will BUG thusly: kernel BUG at net/rxrpc/recvmsg.c:474! Fix this by just dequeuing the call and ignoring it if it is seen to be already released. We can't tell userspace about it anyway as the user call ID has become stale. The Linux kernel CVE team has assigned CVE-2025-38524 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit 248f219cb8bcbfbd7f132752d44afa2df7c241d1 and fixed in 6.6.100 with commit 7692bde890061797f3dece0148d7859e85c55778 Issue introduced in 4.9 with commit 248f219cb8bcbfbd7f132752d44afa2df7c241d1 and fixed in 6.12.40 with commit 839fe96c15209dc2255c064bb44b636efe04f032 Issue introduced in 4.9 with commit 248f219cb8bcbfbd7f132752d44afa2df7c241d1 and fixed in 6.15.8 with commit 6c75a97a32a5fa2060c3dd30207e63b6914b606d Issue introduced in 4.9 with commit 248f219cb8bcbfbd7f132752d44afa2df7c241d1 and fixed in 6.16 with commit 962fb1f651c2cf2083e0c3ef53ba69e3b96d3fbc 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-38524 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: include/trace/events/rxrpc.h net/rxrpc/call_accept.c net/rxrpc/recvmsg.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/7692bde890061797f3dece0148d7859e85c55778 https://git.kernel.org/stable/c/839fe96c15209dc2255c064bb44b636efe04f032 https://git.kernel.org/stable/c/6c75a97a32a5fa2060c3dd30207e63b6914b606d https://git.kernel.org/stable/c/962fb1f651c2cf2083e0c3ef53ba69e3b96d3fbc