Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A59403D9548 for ; Sun, 18 Oct 2026 16:18:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792340328; cv=none; b=jmXYJJcpjGQ3crHOVUIYmul3QdFIRYq2XafmVy6LUn9rH9Qv7VSfWVB6b3cPe8wjcuNN2Ncq2qm3XbDZHXzTEgf5K33CejDuGs4dm1bdBkeun7ApGX9AOShEXgVGkuRQynUQY9gfiH//ALbXYknU6O1mm/v8iY8XcX4j2uzZXbg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792340328; c=relaxed/simple; bh=FoJ82fM8vxMT95NHNz7/28kdFVPk2+UTjCiz6qNd/4g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JLZv7Xj3u6aOJsFyi2UuaKDZ+RA/gS5yKAGqgNJjMIUqJNSqDnsNfo2Eg5/NG4Rbw3DhfiPGmqICYmZrudkFLmfrK49RtpMkOSCIUMv1RwXayzFExqymQ5BzwVteaE1D9NfsTTcCvzYYiCL5GiiHvxd3gvO7S+oLo78KU+zug+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uD1M91B/; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uD1M91B/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 984001F000C4; Sun, 18 Oct 2026 16:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792340327; bh=C4fJXCPZc419Av41mkdOj+I+NCrOmPtPQ+JI/gryO38=; h=From:To:Cc:Subject:Date:Reply-To; b=uD1M91B/YgOGTvYn7ulhOBooFpVvtM3N+s7G5iFaSr8RXKscsW4skfDfdkftZnGh5 2F8VgIeGDGFL84q3D1zIv2EGFkR19jmR8ADvtCSA8nvHjoPY0PMhqXIR7rayc0S8i7 MIIkQG6G1DacJPrfxVI8IAXu1sVTsEyL/zzuq+nc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98801: net: restrict SO_RESERVE_MEM to TCP sockets and cap max value Date: Sun, 18 Oct 2026 17:46:16 +0200 Message-ID: <2026101825-CVE-2026-98801-776c@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3663; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=RwLN7uLaaGbsfqYyzjycEvUlmMXvERLouuOSs1xxc2M=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlXXkZuyvwpsjXs9oPDT84cN1v4fd6+U6bzPVXeaR9Su XTu+o3ZoR2xLAyCTAyyYoosX7bxHN1fcUjRy9D2NMwcViaQIQxcnAIwkcuvGGYxJcq8N+ZXcGLf VvvVep6z2ecFW+sY5pdfXL22eClz25lihwKja17r7dcLXAEA 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: restrict SO_RESERVE_MEM to TCP sockets and cap max value Commit 2bb2f5fb21b0 ("net: add new socket option SO_RESERVE_MEM") and commit d00c8ee31729 ("net: fix possible NULL deref in sock_reserve_memory") only checked sk_has_account(sk), which is true for both TCP and UDP sockets. However, SO_RESERVE_MEM and sk_unused_reserved_mem() are currently only supported by TCP: - On UDP sockets, sk->sk_forward_alloc is protected by sk->sk_receive_queue.lock, whereas sock_reserve_memory() and sock_release_reserved_memory() only acquire lock_sock(sk). Concurrent UDP packet reception/release and setsockopt(SO_RESERVE_MEM) corrupt sk_forward_alloc and memcg accounting. - udp_rmem_release() reclaims excess sk_forward_alloc without accounting for sk_unused_reserved_mem(sk). Restrict sock_reserve_memory() to TCP sockets (sk_is_tcp(sk)) for now. Supporting SO_RESERVE_MEM for UDP (acquiring sk_receive_queue.lock and honoring sk_unused_reserved_mem() in udp_rmem_release()) can be done in a future net-next series if needed. In addition, reject val > SZ_1G with -EINVAL in sk_setsockopt(SO_RESERVE_MEM). Without an upper bound, values near INT_MAX cause sk_mem_pages(delta) and (pages << PAGE_SHIFT) to overflow 32-bit signed int, corrupting sk->sk_forward_alloc and sk->sk_reserved_mem. Using a page-aligned cap (SZ_1G) ensures that the page-rounded sk->sk_reserved_mem reported by getsockopt(SO_RESERVE_MEM) can always be passed back to setsockopt(SO_RESERVE_MEM). The Linux kernel CVE team has assigned CVE-2026-98801 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133 and fixed in 6.12.113 with commit 492e04f9a00f3cc88a1f6899417b10f3019a624e Issue introduced in 5.16 with commit 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133 and fixed in 6.18.56 with commit 5069ce898148bd799395c5a464e006cbb840f188 Issue introduced in 5.16 with commit 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133 and fixed in 7.2.10 with commit a467b05b201b5c26be52ed3081992fa9c0387648 Issue introduced in 5.16 with commit 2bb2f5fb21b0486ff69b7b4a1fe03a760527d133 and fixed in 7.3-rc6 with commit 37e02c42a00be692c06343e11779aadc45f45971 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-2026-98801 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: net/core/sock.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/492e04f9a00f3cc88a1f6899417b10f3019a624e https://git.kernel.org/stable/c/5069ce898148bd799395c5a464e006cbb840f188 https://git.kernel.org/stable/c/a467b05b201b5c26be52ed3081992fa9c0387648 https://git.kernel.org/stable/c/37e02c42a00be692c06343e11779aadc45f45971