# CVE-2026-98069: net/rds: acquire the fastpath locks in rds_conn_shutdown()

The Markdown version of <https://upatch.dev/cve/CVE-2026-98069>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-98069 is rated High 8.1 (CVSS 3.1, CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H). It affects the Linux kernel and was published on 25 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.6%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-98069-rds-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

CVE-2026-98069, "net/rds: acquire the fastpath locks in rds_conn_shutdown()", was published on 25 September 2026. In `rds_conn_shutdown()` (`net/rds/connection.c`), the teardown path waits with `wait_event()` for `RDS_IN_XMIT` and `RDS_RECV_REFILL` in `cp->cp_flags` to be sampled clear before calling `conn->c_trans->conn_path_shutdown(cp)` and `rds_conn_path_reset(cp)`, without acquiring those bit locks. Right after `wait_event()` returns, `rds_send_xmit()` (`net/rds/send.c`) can re-acquire `RDS_IN_XMIT` or `rds_ib_recv_refill()` (`net/rds/ib_recv.c`) can re-acquire `RDS_RECV_REFILL` and run concurrently with the transport shutdown and `rds_send_path_reset()`. On weakly ordered architectures, the store-buffering pattern between `rds_conn_shutdown()` writing the connection state and `rds_send_xmit()` taking `RDS_IN_XMIT` lets both sides miss each other's store, leading to use-after-free and memory corruption on the transport socket, rings and transmit state.

### Official description

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

net/rds: acquire the fastpath locks in rds_conn_shutdown()

rds_conn_shutdown() quiesces the transmit and receive-refill paths by waiting for RDS_IN_XMIT and RDS_RECV_REFILL to be sampled clear, and then runs the transport shutdown and rds_conn_path_reset(). Sampling the bits clear is not the same as owning them: the moment after the wait_event() returns, rds_send_xmit() can re-acquire RDS_IN_XMIT (or rds_ib_recv_refill() can re-acquire RDS_RECV_REFILL) and run concurrently with the teardown.

The sender does recheck the connection state after taking the lock, but that recheck is a classic store-buffering pattern: teardown writes the state and reads the bit while the sender writes the bit and reads the state. acquire_in_xmit() is only an acquire operation, so on weakly ordered architectures both sides can miss each other's write, and the transmit path then runs while the transport zeroes its rings (e.g. rds_ib_ring_init()) and rds_send_path_reset() rewrites the transmit state under it.

Oracle UEK fixed the same class of crashes - a 14-year tail of BUG_ON()s in rds_ib_sub_signaled(), unexpected op-codes and NULL dereferences in rds_ib_send_cqe_handler() during failover testing - by making the teardown path \*acquire\* the fastpath bit locks instead of testing them ("rds: Make sure transmit path and connection tear-down does not run concurrently"). Ownership of a single word is decided by RMW atomicity, so no cross-variable ordering is needed.

Do the same here: take both locks before calling the transport shutdown, hold them across rds_conn_path_reset(), and release them explicitly with a wake-up afterwards. Both are released with clear_bit_unlock(), so that the ring re-initialization done by the transport shutdown and the transmit state rewritten by rds_send_path_reset() are ordered before either bit is seen clear by the next acquire_in_xmit() or acquire_refill().

The fastpath users of these bits - rds_send_xmit() and rds_ib_recv_refill() - are trylock style and back off while teardown owns the locks, so no new lock dependency is introduced for them. rds_tcp_reset_callbacks() is different: since the previous patch it acquires RDS_IN_XMIT as well, and it blocks doing so, so its wait now spans the teardown instead of at most one send batch. That waiter runs from rds_tcp_accept_one() on the single-threaded krdsd workqueue and holds rds_tcp_accept_lock and t_conn_path_lock while it waits, so a duelling SYN accepted while its path is being torn down parks accept processing for the duration of the teardown - for TCP bounded by the (up to 5 s) drain loop in rds_tcp_conn_path_shutdown(). An IB path's drain in rds_ib_conn_path_shutdown() has no round cap, but no blocking waiter either: rds_tcp_reset_callbacks() is the only blocking acquirer of these bits and waits only on its own TCP path, and the fastpaths are trylock-and-back-off on both transports, so a long IB drain lengthens only that path's own quiesce. The window is narrow: the accept-side state check has to pass before the teardown moves the path to RDS_CONN_DISCONNECTING.

Because krdsd is a single global workqueue, everything else queued there - accept processing for other connections and network namespaces, and the flush_workqueue(rds_wq) in rds_tcp_listen_stop() during namespace teardown - waits behind the parked accept worker for that time. It cannot deadlock, although the waits do point at each other: the teardown blocks until the bit's holder releases it, and the holder may be that krdsd accept worker. The holder finishes without needing anything the teardown owns: the sync cancels rds_tcp_reset_callbacks() issues target cp_send_w and cp_recv_w on the path's ordered cp_wq, whose only execution slot is occupied by the blocked cp_down_w itself, so they are pending at most and cancel without flushing - a reliance on cp_wq being ordered that is now noted next to those cancels (on ---truncated---

## What the upatch does

It attaches to the `socket_create` LSM hook and returns `-EPERM` when the address family is `AF_RDS` (21). Creating an `AF_RDS` socket is required for user space to open RDS connections, send RDS traffic or trigger `sock_create()` to autoload the `rds` and `rds_tcp` modules, and the hook runs before the kernel allocates the socket or requests the module. A refusal from an earlier BPF LSM program on the same hook is passed on unchanged.

The policy: [`cve-2026-98069-rds-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-98069), 22 lines of BPF C attached at `lsm/socket_create`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- Creating an `AF_RDS` socket fails with `EPERM`, from user space (`socket()`, `socketpair()`, io_uring) and from the kernel.
- Applications using Reliable Datagram Sockets (`AF_RDS`) cannot open new RDS sockets while the upatch is loaded.
- `AF_RDS` sockets opened before the upatch was loaded, or an `rds_tcp` listener already active in the kernel before the upatch was loaded, keep running.
- Every other socket family works as before.

## Preemption model and cost

The program keeps no state: no maps, no shared or per-CPU data. It is correct under every preemption model, including `PREEMPT_LAZY`, preemptible RCU and `PREEMPT_RT`. Each run costs two integer comparisons, and it runs only when a socket is created, never on the data path.

## Affected versions

| Branch   | Bug added in | Fixed in |
| -------- | ------------ | -------- |
| 5.10     | 2.6.37       | 5.10.271 |
| 5.15     | 2.6.37       | 5.15.222 |
| 6.1      | 2.6.37       | 6.1.189  |
| 6.6      | 2.6.37       | 6.6.158  |
| 6.12     | 2.6.37       | 6.12.111 |
| 6.18     | 2.6.37       | 6.18.53  |
| 7.2      | 2.6.37       | 7.2.7    |
| mainline | 2.6.37       | 7.3      |

## How it was tested

While loaded, creating an AF_RDS socket failed with EPERM. The test kernel already has the fix and no RDS support, so this shows the refusal, not protection of a vulnerable kernel.

- **Tested:** 25 Nov 2026
- **Target:** Linux 7.4 with the fix and without RDS support
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Machine:** shirudo test VM

### Results

| State           | socket(AF_RDS, SOCK_SEQPACKET, 0) |
| --------------- | --------------------------------- |
| Before loading  | EAFNOSUPPORT                      |
| Upatch loaded   | EPERM                             |
| After unloading | EAFNOSUPPORT                      |

## How to apply

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-98069
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-98069-1.0.0.bee oci://<registry>/<namespace>/cve-2026-98069 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-98069-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-98069 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-98069)
- [CVE-2026-98069 record (Linux kernel CNA)](https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-98069.json)
- [Announcement with affected and fixed versions](https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-98069.mbox)
- [Fix commit 813f3582ac7a](https://git.kernel.org/stable/c/813f3582ac7ae9f60f917937d54660e0952d5f2d)

### Links

- [CVE-2026-98069 on upatch.dev](https://upatch.dev/cve/CVE-2026-98069) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-98069)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-98069)
- [CWE-476](https://cwe.mitre.org/data/definitions/476.html)
- Upatch source: [upatches/cve-2026-98069](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-98069)

### More references from NVD (8)

- [git.kernel.org](https://git.kernel.org/stable/c/1f900f585cbb0fbe6aa00c31c9f5bb63ee614456) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/1fe627e5db5c3f53a9f9f9c8a66671755d306955) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/2e46248e375a516301884719f08b6015c79a6456) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/32e21bcf4b5b11454bf57c4bb3bf019b71512ace) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/7f4f21e4439df30d9aca9fb3bac38191a2f34729) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/7febb113795d5de5b690b208f4b0e64a5fad1201) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/813f3582ac7ae9f60f917937d54660e0952d5f2d) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/900e96c9749a06833801f60c393aa1d405ea226c) (Patch)
