{"id":"CVE-2026-98068","revision":"5658909b80054cfaa0247cf893dd28d2","records":[{"revision":"5658909b80054cfaa0247cf893dd28d2","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-98068","aliases":[],"title":"net/rds: don't let rds_conn_shutdown() consume a concurrent drop","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/rds: don't let rds_conn_shutdown() consume a concurrent drop\n\nrds_conn_shutdown() finishes by moving the path from\nRDS_CONN_DISCONNECTING to RDS_CONN_DOWN, and also accepts\nRDS_CONN_ERROR as the starting state of that final transition, so that\na FIN processed in softirq context during the teardown does not derail\nthe shutdown into a noisy error path.\n\nBut consuming that RDS_CONN_ERROR also consumes the shutdown pass that\ncame with it: rds_conn_path_drop() sets RDS_CONN_ERROR and then queues\ncp_down_w, and a pass that starts on a path already in RDS_CONN_DOWN\nis a no-op.  For the FIN case that is harmless - the socket the FIN\narrived on is the very socket the teardown just released.  It is not\nharmless for a dropper that attached something to the path first.\n\nrds_tcp_accept_one() is such a dropper.  Its path claim in\nrds_tcp_accept_one_path() transitions RDS_CONN_DOWN ->\nRDS_CONN_CONNECTING, and a concurrent drop - a FIN on a previous\nsocket in softirq context, an administrative reset - can put the path\ninto RDS_CONN_ERROR between that claim and the state check that\nfollows, which accepts RDS_CONN_ERROR.  The accept then installs the\nfreshly accepted socket with rds_tcp_set_callbacks() while the queued\nteardown - which sampled tc->t_sock before this socket existed - is\nstill running.  rds_connect_path_complete() fails its transition to\nRDS_CONN_UP and drops the path again, queueing the pass that should\nreap the socket it just installed.  If the in-flight shutdown's final\ntransition consumes that drop's RDS_CONN_ERROR, the queued pass finds\nthe path in RDS_CONN_DOWN and does nothing.  The installed socket is\nnever torn down: it sits established with its callbacks armed and its\nrds_tcp_connection on rds_tcp_tc_list, the peer sees a connection that\nnothing ever reads, and the path is wedged in RDS_CONN_DOWN until some\nlater event drops it again.  Reproduced with widened race windows as\nan ever-growing receive queue on a socket owned by a path stuck in\nRDS_CONN_DOWN, with the peer's send path wedged behind it.\n\nMake the final transition only DISCONNECTING -> DOWN.  If it fails\nbecause the path is in RDS_CONN_ERROR, a drop raced the teardown:\ncancel the reconnect timer and clear RDS_RECONNECT_PENDING - the one\npiece of the skipped tail that must not be left behind - and return,\nletting the pass the drop queued finish the job: it tears down\nwhatever attached to the path in the meantime, completes the\ntransition to RDS_CONN_DOWN, and re-arms the reconnect from its own\ntail.\n\nThe timer quiesce in that branch matters because the racing drop does\nnot always queue that pass: rds_conn_path_drop() returns without\nqueueing when a destroy is pending - exactly the situation during a\nnetns teardown or module unload, when a FIN on the dying socket is\nprocessed while rds_conn_path_destroy() flushes cp_down_w.  If the\nflushed pass is the one that takes this return, no later pass exists,\nand rds_conn_path_destroy() would find cp_conn_w still armed\n(WARN_ON) and then free a path whose reconnect timer can still fire.\nWith the cancel in the branch, every exit of a shutdown pass leaves\nthe timer quiesced no matter which pass completes the transition.\n\nThe FIN case keeps making progress, one pass later and still without\nnoisy logging.  Any other state keeps today's rds_conn_path_error()\nhandling; no current cp_state writer can leave a DISCONNECTING path\nin anything but RDS_CONN_ERROR (every other writer is a cmpxchg from\na non-DISCONNECTING state), so that branch is defensive.\n\nOn kernels without the preceding patches the same hazard exists with\nthe sample-based quiesce; the fix applies there equally.","state":0,"publishedAt":"2026-09-25T10:24:10.234+00:00","modifiedAt":"2026-10-19T09:13:17.906+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"net/rds/connection.c\",\n                        \"net/rds/tcp.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"e97656d03ca0cea888a0b9d382abce8233771f31\",\n                            \"lessThan\": \"f777c602d3e15d3414b53f760147687bd56b03f2\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"e97656d03ca0cea888a0b9d382abce8233771f31\",\n                            \"lessThan\": \"7cb11257aa3e5ef0bedfd5d55ac60bb00347aa97\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"e97656d03ca0cea888a0b9d382abce8233771f31\",\n                            \"lessThan\": \"4980ce260205001d582a7b3cb5eab29877777fbc\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"e97656d03ca0cea888a0b9d382abce8233771f31\",\n                            \"lessThan\": \"0ec75c69918b7f6a1a5e3fb6442925246a9ec86b\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"e97656d03ca0cea888a0b9d382abce8233771f31\",\n                            \"lessThan\": \"bd1cb197a07111ca8d4f4c21411c56a3c85a9797\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"e97656d03ca0cea888a0b9d382abce8233771f31\",\n                            \"lessThan\": \"4cb9b6d3d31a2dbaa5469981c2c4c03e9acc7aca\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"e97656d03ca0cea888a0b9d382abce8233771f31\",\n                            \"lessThan\": \"2941561395066be856a53626d4ca973dd9c982b2\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"e97656d03ca0cea888a0b9d382abce8233771f31\",\n                            \"lessThan\": \"260c6308fe2e19ad519389d44d582e292aecc3af\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"net/rds/connection.c\",\n                        \"net/rds/tcp.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"4.12\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"4.12\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.10.271\",\n                            \"lessThanOrEqual\": \"5.10.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.15.222\",\n                            \"lessThanOrEqual\": \"5.15.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.1.189\",\n                            \"lessThanOrEqual\": \"6.1.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.6.158\",\n                            \"lessThanOrEqual\": \"6.6.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.12.111\",\n                            \"lessThanOrEqual\": \"6.12.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.18.53\",\n                            \"lessThanOrEqual\": \"6.18.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.2.7\",\n                            \"lessThanOrEqual\": \"7.2.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.3\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[],"references":["https://git.kernel.org/stable/c/f777c602d3e15d3414b53f760147687bd56b03f2","https://git.kernel.org/stable/c/7cb11257aa3e5ef0bedfd5d55ac60bb00347aa97","https://git.kernel.org/stable/c/4980ce260205001d582a7b3cb5eab29877777fbc","https://git.kernel.org/stable/c/0ec75c69918b7f6a1a5e3fb6442925246a9ec86b","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"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-98068","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-98068","identifiers":["CVE-2026-98068"]},"retained":false,"historicalAffected":[]}],"coverage":[]}