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 9B4F221B918 for ; Thu, 4 Sep 2025 15:34:57 +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=1757000097; cv=none; b=OFNciAA2apvu8w1UXUbpjFEW3u+lnri7RNQihW3POMlSRTaU2obYSlNv3g+vDTlB5lz5cBuHalwaasA6SL80jUma1wFQfCLWHxIamOogr/NkocIlRvdvSLBAizpM4tGWTIbfv3WL6MfVUUDvww0L8tquzR0WK9r/67k6PuchzIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757000097; c=relaxed/simple; bh=RkRC3Ixa6oM6x6sUANO2PyHzxjjCpwyVaVrQrEpndy0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=I/pIGPKrwOouLyjVO2UY6K+jcT/OW6C0He7/vaMXpaC8R0xpIpdGkfIKn+fRp/NoKjs7Edxp2+4DQtuujsKRWrDrnCBG73TGUTdmBqRDKamz6OUwOebjIwjm/5UoR33HMLkubTYgd9hpKdbcJidgsaOlHk+xabspp+rMd+/2UWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KJEL1qAq; 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="KJEL1qAq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28A23C4CEF0; Thu, 4 Sep 2025 15:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757000097; bh=RkRC3Ixa6oM6x6sUANO2PyHzxjjCpwyVaVrQrEpndy0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KJEL1qAqc+/cu6COokBHD9Euy5QAM9OKIur/lOcFF5tZygzK6g3bx1prk1kJDs3Nq m6AZIOGSBXvkzt4OUIumW1QsLeClLi2u9oAaYAUSJht2BVH0+/WxWHvmyR8lOKfF5m TL2pdu2fS6tR3f4jNp7i7QndV6eYmddi9hxIUejw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38717: net: kcm: Fix race condition in kcm_unattach() Date: Thu, 4 Sep 2025 17:33:22 +0200 Message-ID: <2025090459-CVE-2025-38717-fbf6@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=2719; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VQQ1124XDQufbN4MHxp/30japjDfnU/dXe+0B9nf7Vw=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk7N2rPeyzzltn3z5uc2u/bxOwTuyZftV39b/LMIFa14 2nOApeed8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEpjUzzHdpmvXrHZ9y9oTs ehaBZ7vUUrY6f2OYH/P5M6+nh2XsE+eeZVKOexKuHHh9FQA= 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: net: kcm: Fix race condition in kcm_unattach() syzbot found a race condition when kcm_unattach(psock) and kcm_release(kcm) are executed at the same time. kcm_unattach() is missing a check of the flag kcm->tx_stopped before calling queue_work(). If the kcm has a reserved psock, kcm_unattach() might get executed between cancel_work_sync() and unreserve_psock() in kcm_release(), requeuing kcm->tx_work right before kcm gets freed in kcm_done(). Remove kcm->tx_stopped and replace it by the less error-prone disable_work_sync(). The Linux kernel CVE team has assigned CVE-2025-38717 to this issue. Affected and fixed versions =========================== Issue introduced in 4.6 with commit ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 and fixed in 6.12.43 with commit c0bffbc92a1ca3960fb9cdb8e9f75a68468eb308 Issue introduced in 4.6 with commit ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 and fixed in 6.15.11 with commit 7275dc3bb8f91b23125ff3f47b6529935cf46152 Issue introduced in 4.6 with commit ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 and fixed in 6.16.2 with commit 798733ee5d5788b12e8a52db1519abc17e826f69 Issue introduced in 4.6 with commit ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 and fixed in 6.17-rc2 with commit 52565a935213cd6a8662ddb8efe5b4219343a25d 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-38717 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/net/kcm.h net/kcm/kcmsock.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/c0bffbc92a1ca3960fb9cdb8e9f75a68468eb308 https://git.kernel.org/stable/c/7275dc3bb8f91b23125ff3f47b6529935cf46152 https://git.kernel.org/stable/c/798733ee5d5788b12e8a52db1519abc17e826f69 https://git.kernel.org/stable/c/52565a935213cd6a8662ddb8efe5b4219343a25d