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 B3C363793C3 for ; Thu, 24 Sep 2026 16:17:53 +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=1790266675; cv=none; b=VB9+wKQJSVaen1aMOUplnFGzS9wPWEZPNV4qLzDr6gTWl5uWfUrDEu3n1zy9CcaXRXz13LNoZS8u4puZSr5gsLl5TkG43F0oVGW0zLrAShpKWBq3IHl9T3yUzDfeFAX2xtQRyY9e728Y6SJceqDaeBkQld6rxSErPi4vidhmgno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790266675; c=relaxed/simple; bh=cBdNLFUmg/8Mof5qCptAzxQXfXYNqUU+zZ0Whw9K7m0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Cb3M6Hcubm7OZgoOs8FG8aDeFA2aJMzPxstRdjFZ2r+3uCk4iBxqWT4snIvUW+TT4lvXRLS0IlN0eW1lF2j4HwLImf4xcrO1Q9utxvWoVxoFQ/6QKsAyNqGn1yzJIZpfMz9RgBUr+5TsyiWOOu7Z43c0bBUcgtln3Ia+jO132tI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0So6z/uI; 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="0So6z/uI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A15851F00893; Thu, 24 Sep 2026 16:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790266673; bh=3awK0yHV43efWmrVZi5x93HwUd3P48fQkRmy9642mxE=; h=From:To:Cc:Subject:Date:Reply-To; b=0So6z/uIY7oGQWuvrLjHKyr0sCHGfE3TAGhZq+NSiG9ucusnvoqwj51OjBPPrO9hx 7sPEfSFEwIuAT7Cc/L5FJ1OPy0zd5QqnB3RuLGcr6q0MuXvP8mxU1NJeuR6SbowBp/ E4b1BynWUlI8DwXAqOol3hIKVDB+eK1CQhTVPMPM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-97476: rds: filter RDS_INFO_* getsockopt by caller's netns Date: Thu, 24 Sep 2026 18:04:01 +0200 Message-ID: <2026092436-CVE-2026-97476-8913@gregkh> X-Mailer: git-send-email 2.55.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=4199; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=c9HqDcQXHIPft3WuNud3jwkBxxWX/q1wUssLvPlmPn4=; b=kA0DAAIRMUfUDdst+ykByyZiAGq1SZyj0kHBpOIIzofjlZ3FT8TPFBcyJZgniXk7zKMBovDe0 ohdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmq1SZwACgkQMUfUDdst+yk2wACfS69i 7AP9VyYNxQLdQ+3r4scYlf8An2b+aGYCF0uRs6eHDPHw3N9OT/BZ 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: rds: filter RDS_INFO_* getsockopt by caller's netns The RDS_INFO_* family of getsockopt(2) options reads several file-scope global lists that are not per-netns: rds_sock_info / rds6_sock_info, rds_sock_inc_info / rds6_sock_inc_info -> rds_sock_list rds_tcp_tc_info / rds6_tcp_tc_info -> rds_tcp_tc_list rds_conn_info / rds6_conn_info, rds_conn_message_info_cmn (for the *_SEND_MESSAGES and *_RETRANS_MESSAGES variants), rds_for_each_conn_info (for RDS_INFO_IB_CONNECTIONS) -> rds_conn_hash[] The handlers do not filter by the caller's network namespace. rds_info_getsockopt() has no netns or capable() check, and rds_create() has no capable() check, so AF_RDS is reachable from an unprivileged user namespace. As a result, an unprivileged caller in a fresh user_ns plus netns can read the bound address and sock inode of every RDS socket on the host, the peer address of incoming messages on every RDS socket on the host, the peer address and TCP sequence numbers of every rds-tcp connection on the host, and the peer address and RDS sequence numbers of every RDS connection on the host. The rds-tcp transport is reachable from a non-initial netns (see rds_set_transport()), so a one-shot init_net gate at rds_info_getsockopt() would deny legitimate per-netns visibility to rds-tcp callers. Instead, filter at each handler by comparing the netns of the caller's socket to the netns of the list entry, or to rds_conn_net(conn) for connection paths. Only copy entries whose netns matches the caller. Counters (RDS_INFO_COUNTERS) are aggregate statistics and remain global. Reproducer (KASAN VM, rds and rds_tcp loaded): an AF_RDS socket binds 127.0.0.1:4242 in init_net as root. A child process enters a fresh user_ns plus netns and opens AF_RDS there, then calls getsockopt(SOL_RDS, RDS_INFO_SOCKETS). Before this change, the child sees the init_net socket. After this change, the child sees zero entries. Drop the rds_sock_count, rds_tcp_tc_count, and rds6_tcp_tc_count globals. v2 used them for the size precheck and lens->nr; v3 replaced the precheck with a per-ns count from a first pass over the list, so the globals have no remaining readers. The matching increments and decrements in rds_create()/rds_destroy_sock() and rds_tcp_set_callbacks()/rds_tcp_restore_callbacks() go away with them. Reported by the kernel test robot under clang W=1. The Linux kernel CVE team has assigned CVE-2026-97476 to this issue. Affected and fixed versions =========================== Fixed in 6.12.111 with commit 093f172296d32499ffac7809629b206178776eb6 Fixed in 6.18.53 with commit c4081e49ebe0e3160c4b70ec7639494792dee206 Fixed in 7.2 with commit c96a5209dda666004b8ee1ed7f0d493d09a4f200 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-97476 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/rds/af_rds.c net/rds/connection.c net/rds/tcp.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/093f172296d32499ffac7809629b206178776eb6 https://git.kernel.org/stable/c/c4081e49ebe0e3160c4b70ec7639494792dee206 https://git.kernel.org/stable/c/c96a5209dda666004b8ee1ed7f0d493d09a4f200