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 2A5014963CF for ; Fri, 25 Sep 2026 10:35:29 +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=1790332531; cv=none; b=PGH9dBJNoSScsW5EaBO9QF08NO5anm2kBbecpqoaRPq2+7uShOZezqrDCWb6ar67yg6BQaje8qsEBPNv+K/iEHotkl57a0BZHPjETTqhiIktEhwduPEznGUApzNj29nKciLv89FEi8n2a5a/nhoRdcV+p/hZMcwkXVwp+9s29xk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332531; c=relaxed/simple; bh=qUYEmn6r0gtUy8Q9+RiU02wBDwxI030kUrc9cMjqsas=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eHBQfYycIr5aIeRd60zFTW/67fXaDwr9oC2WPS1KXBv493tYsT0YsOhFfmRLfratnyOs1IILDfzeUv2plmFC8ZIAMVQm43nLSEH5ugVt563rneXcyi5H5PhkHAYD4VSvqY4n5DNKMdhYOk8QfVveFfA2RCy2soiO7ySNw5/l8Lk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eYB3sMTp; 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="eYB3sMTp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 379351F000FF; Fri, 25 Sep 2026 10:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790332529; bh=Y5WRLHhwI/Kh5fcrY9WeoI5SMZgyFnDRH4yFW3p53Nc=; h=From:To:Cc:Subject:Date:Reply-To; b=eYB3sMTpOD1zZVfh0Ca0xpYqIQRnf/PP+gH0bBb23M1ATvkL6cdOWZMpRGnZ+GOBJ PUp58swgIX1hZjmDLJPiTWfXY09BazYPpl1EQskb/0jIBpQHFT5y/9U9k2zrd1kSW1 4ln+Tv0V2F8UmcwBPOJsFZ2KTPCKA7/RdLACPnmE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98068: net/rds: don't let rds_conn_shutdown() consume a concurrent drop Date: Fri, 25 Sep 2026 12:26:10 +0200 Message-ID: <2026092535-CVE-2026-98068-3e4c@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=5884; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CQyNyMdIWpb8xgD7wVsYVr7iLL3oWck3Uo312nAntto=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnbvLNzj/Q8dKnvm/2oKmPdofpzlTln5wXeNKxo2PT/a blmzPLijlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI9ocMC7Z5b7E7kbjTP8D9 an2GY+YNqS2xVQwLTs9lc01lXHaW4fzE7pYtTXfv8ancBAA= 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/rds: don't let rds_conn_shutdown() consume a concurrent drop rds_conn_shutdown() finishes by moving the path from RDS_CONN_DISCONNECTING to RDS_CONN_DOWN, and also accepts RDS_CONN_ERROR as the starting state of that final transition, so that a FIN processed in softirq context during the teardown does not derail the shutdown into a noisy error path. But consuming that RDS_CONN_ERROR also consumes the shutdown pass that came with it: rds_conn_path_drop() sets RDS_CONN_ERROR and then queues cp_down_w, and a pass that starts on a path already in RDS_CONN_DOWN is a no-op. For the FIN case that is harmless - the socket the FIN arrived on is the very socket the teardown just released. It is not harmless for a dropper that attached something to the path first. rds_tcp_accept_one() is such a dropper. Its path claim in rds_tcp_accept_one_path() transitions RDS_CONN_DOWN -> RDS_CONN_CONNECTING, and a concurrent drop - a FIN on a previous socket in softirq context, an administrative reset - can put the path into RDS_CONN_ERROR between that claim and the state check that follows, which accepts RDS_CONN_ERROR. The accept then installs the freshly accepted socket with rds_tcp_set_callbacks() while the queued teardown - which sampled tc->t_sock before this socket existed - is still running. rds_connect_path_complete() fails its transition to RDS_CONN_UP and drops the path again, queueing the pass that should reap the socket it just installed. If the in-flight shutdown's final transition consumes that drop's RDS_CONN_ERROR, the queued pass finds the path in RDS_CONN_DOWN and does nothing. The installed socket is never torn down: it sits established with its callbacks armed and its rds_tcp_connection on rds_tcp_tc_list, the peer sees a connection that nothing ever reads, and the path is wedged in RDS_CONN_DOWN until some later event drops it again. Reproduced with widened race windows as an ever-growing receive queue on a socket owned by a path stuck in RDS_CONN_DOWN, with the peer's send path wedged behind it. Make the final transition only DISCONNECTING -> DOWN. If it fails because the path is in RDS_CONN_ERROR, a drop raced the teardown: cancel the reconnect timer and clear RDS_RECONNECT_PENDING - the one piece of the skipped tail that must not be left behind - and return, letting the pass the drop queued finish the job: it tears down whatever attached to the path in the meantime, completes the transition to RDS_CONN_DOWN, and re-arms the reconnect from its own tail. The timer quiesce in that branch matters because the racing drop does not always queue that pass: rds_conn_path_drop() returns without queueing when a destroy is pending - exactly the situation during a netns teardown or module unload, when a FIN on the dying socket is processed while rds_conn_path_destroy() flushes cp_down_w. If the flushed pass is the one that takes this return, no later pass exists, and rds_conn_path_destroy() would find cp_conn_w still armed (WARN_ON) and then free a path whose reconnect timer can still fire. With the cancel in the branch, every exit of a shutdown pass leaves the timer quiesced no matter which pass completes the transition. The FIN case keeps making progress, one pass later and still without noisy logging. Any other state keeps today's rds_conn_path_error() handling; no current cp_state writer can leave a DISCONNECTING path in anything but RDS_CONN_ERROR (every other writer is a cmpxchg from a non-DISCONNECTING state), so that branch is defensive. On kernels without the preceding patches the same hazard exists with the sample-based quiesce; the fix applies there equally. The Linux kernel CVE team has assigned CVE-2026-98068 to this issue. Affected and fixed versions =========================== Issue introduced in 4.12 with commit e97656d03ca0cea888a0b9d382abce8233771f31 and fixed in 6.12.111 with commit bd1cb197a07111ca8d4f4c21411c56a3c85a9797 Issue introduced in 4.12 with commit e97656d03ca0cea888a0b9d382abce8233771f31 and fixed in 6.18.53 with commit 4cb9b6d3d31a2dbaa5469981c2c4c03e9acc7aca Issue introduced in 4.12 with commit e97656d03ca0cea888a0b9d382abce8233771f31 and fixed in 7.2.7 with commit 2941561395066be856a53626d4ca973dd9c982b2 Issue introduced in 4.12 with commit e97656d03ca0cea888a0b9d382abce8233771f31 and fixed in 7.3-rc2 with commit 260c6308fe2e19ad519389d44d582e292aecc3af 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-98068 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/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/bd1cb197a07111ca8d4f4c21411c56a3c85a9797 https://git.kernel.org/stable/c/4cb9b6d3d31a2dbaa5469981c2c4c03e9acc7aca https://git.kernel.org/stable/c/2941561395066be856a53626d4ca973dd9c982b2 https://git.kernel.org/stable/c/260c6308fe2e19ad519389d44d582e292aecc3af