CVE-2026-98068: net/rds: don't let rds_conn_shutdown() consume a concurrent drop

Published Sep 25, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

net/rds: don't let rdsconnshutdown() consume a concurrent drop

rdsconnshutdown() finishes by moving the path from RDSCONNDISCONNECTING to RDSCONNDOWN, and also accepts RDSCONNERROR 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 RDSCONNERROR also consumes the shutdown pass that came with it: rdsconnpathdrop() sets RDSCONNERROR and then queues cpdownw, and a pass that starts on a path already in RDSCONNDOWN 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.

rdstcpacceptone() is such a dropper. Its path claim in rdstcpacceptonepath() transitions RDSCONNDOWN -> RDSCONNCONNECTING, and a concurrent drop - a FIN on a previous socket in softirq context, an administrative reset - can put the path into RDSCONNERROR between that claim and the state check that follows, which accepts RDSCONNERROR. The accept then installs the freshly accepted socket with rdstcpsetcallbacks() while the queued teardown - which sampled tc->tsock before this socket existed - is still running. rdsconnectpathcomplete() fails its transition to RDSCONNUP 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 RDSCONNERROR, the queued pass finds the path in RDSCONNDOWN and does nothing. The installed socket is never torn down: it sits established with its callbacks armed and its rdstcpconnection on rdstcptclist, the peer sees a connection that nothing ever reads, and the path is wedged in RDSCONNDOWN 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 RDSCONNDOWN, with the peer's send path wedged behind it.

Make the final transition only DISCONNECTING -> DOWN. If it fails because the path is in RDSCONNERROR, a drop raced the teardown: cancel the reconnect timer and clear RDSRECONNECTPENDING - 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 RDSCONNDOWN, 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: rdsconnpathdrop() 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 rdsconnpathdestroy() flushes cpdownw. If the flushed pass is the one that takes this return, no later pass exists, and rdsconnpathdestroy() would find cpconnw still armed (WARNON) 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 rdsconnpatherror() handling; no current cpstate writer can leave a DISCONNECTING path in anything but RDSCONNERROR (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.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 25, 2026
CVE Published
via MITRE·10:24 AM
Data Sourced
via MITRE·10:24 AM
Description

Frequently Asked Questions

1

Which systems are most likely to encounter this issue?

The affected code is in the Linux kernel RDS networking subsystem, specifically the RDS TCP accept path. Systems using RDS connections and accepting TCP-backed RDS paths are the relevant exposure group.

2

What race condition is required to trigger the problem?

A path must be claimed by rds_tcp_accept_one_path(), transitioning it from RDS_CONN_DOWN to RDS_CONN_CONNECTING, while a concurrent drop changes the path to RDS_CONN_ERROR before the subsequent state check. The description identifies a FIN on a previous socket processed in softirq context and an administrative reset as examples of concurrent drops.

3

Is every FIN received during connection teardown problematic?

No. The description states that a FIN processed during teardown is harmless when it arrives on the socket that the teardown has just released. The harmful case involves a drop concurrent with another component having attached or claimed the path first.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203