CVE-2026-98071: net/rds: clear cp_flags bits individually in rds_conn_path_reset()
In the Linux kernel, the following vulnerability has been resolved:
net/rds: clear cpflags bits individually in rdsconnpathreset()
rdsconnpathreset() wipes the whole flag word with a plain cp->cpflags = 0 store. Every other accessor of that word uses atomic bitops, and some of them can run concurrently with the reset: RDSLLSENDFULL is set from rdssendxmit() and cleared from the transport completion paths, neither of which holds anything that excludes the shutdown worker. A plain store racing an atomic read-modify-write on the same word is a data race, and whichever side loses has its update silently discarded.
Clear the two bits the reset is actually responsible for instead. RDSINXMIT and RDSRECVREFILL need no store at all here: they belong to the caller, rdsconnshutdown(), which waits for both to be clear before calling the transport shutdown and this reset.
This also gives every bit in cpflags a single well-defined writer discipline, which the following patches rely on when they turn RDSINXMIT and RDSRECVREFILL into bit locks held across the teardown: a blanket store mid-teardown would destroy lock ownership that an atomic clear preserves.
Oracle UEK carries the same conversion ("net/rds: Preserve essential connection state flags"), motivated by its asynchronous shutdown state machine, whose progress and destroy flags must survive the reset. UEK's variant also clears RDSINXMIT and RDSRECVREFILL because there the reset runs as the final step of a teardown that owns both bits, making those clears its unlock. Upstream that release belongs in rdsconnshutdown(): once a later patch in this series turns the two bits into locks held across the teardown, ending ownership needs release semantics and a wake-up that a plain clear inside the reset would not provide.
Based on Oracle UEK commit "net/rds: Preserve essential connection state flags" by Gerd Rausch.
Affected Software
Event History
Frequently Asked Questions
When can this race occur?
It requires connection shutdown/reset to overlap with RDS transmit or transport-completion activity. In that overlap, rds_send_xmit() may set RDS_LL_SEND_FULL or a completion path may clear it while the reset performs a non-atomic whole-word store.
How can I determine whether my kernel contains the problematic behavior?
Inspect rds_conn_path_reset() for a plain assignment that clears the entire cp_flags word, such as cp->cp_flags = 0. The corrected approach clears only the bits owned by the reset using atomic bit operations, rather than overwriting concurrent updates.