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 7D2D92D1911 for ; Thu, 3 Jul 2025 08:36:00 +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=1751531760; cv=none; b=PWTvQrG/c88S8stjh3T9vwgzaT7QvF788hRJdxbaZK2N9TRSZYoEb6RXIqqAYwIkWKo1W2OG9qG4vnj8DVu88zVLdZNGT2KGFZ355DY2C4Qqjv1RfsuqoWn1ZuTviDWOQ/kbCA5bJRFl0sx9S2iEBRatf27w+dKqQH5rAHvKqco= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751531760; c=relaxed/simple; bh=V2M7E6OFGl9a2Y0fUMa0nxOwRwzTlIehXcKmfb/tjT4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=k9lym///SwQYDeSr1o5huGrwzkMlPWIZJGpZpmyVv3RolrYBJtuxzfDQM0SyoLXUKg/Z7pxyjq7u/9OWHsDmoZOVT/GiPVMXumGYfuS/c2JW8OiGQoonewrQaEr5/ZiqE7HmMp/nW2Oot3bxJdwl4QTe4QiikUQjJUKn1SuyK0s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nYKo/hFG; 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="nYKo/hFG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0265C4CEEB; Thu, 3 Jul 2025 08:35:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751531760; bh=V2M7E6OFGl9a2Y0fUMa0nxOwRwzTlIehXcKmfb/tjT4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nYKo/hFGNGaoVk/6u2nazoDQofIXsMdg1t6eoGyir5x4igjOPr+OhJo69ZxNElDpc cfp4yAYzC3thK5HVhdmGE67CWIvIDF+Hz6q2JWYYytHQvhBw3L6I+hZ/sUxspoGbfm g5jUm4JQhrw7iuZ6er74ncmhOrKd3Wqa8dmMMalQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38112: net: Fix TOCTOU issue in sk_is_readable() Date: Thu, 3 Jul 2025 10:35:29 +0200 Message-ID: <2025070324-CVE-2025-38112-57a2@gregkh> X-Mailer: git-send-email 2.50.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=3373; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=34UPghShlxYGdzHqJ1jWzN3S8gnNZjf/DKt5QmPaRok=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlpDmfuPC77d+nNjHcP5JZdnLhQ8S7rwfS5p5O02qSer qzOnXruTkcsC4MgE4OsmCLLl208R/dXHFL0MrQ9DTOHlQlkCAMXpwBMZMlbhvk+YrdVZCW3v7U/ K8QgHL6xx8lbIJhhwe6pubEXDm79o1Ns37PrF4+y5zvu1QA= 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: Fix TOCTOU issue in sk_is_readable() sk->sk_prot->sock_is_readable is a valid function pointer when sk resides in a sockmap. After the last sk_psock_put() (which usually happens when socket is removed from sockmap), sk->sk_prot gets restored and sk->sk_prot->sock_is_readable becomes NULL. This makes sk_is_readable() racy, if the value of sk->sk_prot is reloaded after the initial check. Which in turn may lead to a null pointer dereference. Ensure the function pointer does not turn NULL after the check. The Linux kernel CVE team has assigned CVE-2025-38112 to this issue. Affected and fixed versions =========================== Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 5.10.239 with commit c2b26638476baee154920bb587fc94ff1bf04336 Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 5.15.186 with commit 6fa68d7eab34d448a61aa24ea31e68b3231ed20d Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.1.142 with commit 8926a7ef1977a832dd6bf702f1a99303dbf15b15 Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.6.94 with commit ff55c85a923e043d59d26b20a673a1b4a219c310 Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.12.34 with commit 1e0de7582ceccbdbb227d4e0ddf65732f92526da Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.15.3 with commit 1b367ba2f94251822577daed031d6b9a9e11ba91 Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.16-rc2 with commit 2660a544fdc0940bba15f70508a46cf9a6491230 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-38112 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/sock.h 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/c2b26638476baee154920bb587fc94ff1bf04336 https://git.kernel.org/stable/c/6fa68d7eab34d448a61aa24ea31e68b3231ed20d https://git.kernel.org/stable/c/8926a7ef1977a832dd6bf702f1a99303dbf15b15 https://git.kernel.org/stable/c/ff55c85a923e043d59d26b20a673a1b4a219c310 https://git.kernel.org/stable/c/1e0de7582ceccbdbb227d4e0ddf65732f92526da https://git.kernel.org/stable/c/1b367ba2f94251822577daed031d6b9a9e11ba91 https://git.kernel.org/stable/c/2660a544fdc0940bba15f70508a46cf9a6491230