upatch.dev

CVE-2026-98069

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

Refuses AF_RDS sockets to mitigate CVE-2026-98069.

High 8.1Vetted

EPSS 0.6%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.

At a glance

CVE-2026-98069 is a high (CVSS 8.1) vulnerability in the Linux kernel, published 25 September 2026. A vetted upatch, cve-2026-98069-rds-block, blocks it on running Linux machines with shirudo until the kernel is patched.

Severity
High 8.1 CVSS 3.1
Chance of exploitation
0.6% in the next 30 days (EPSS, 24 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-476
Affected software
Linux kernel
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

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---

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

Sources

More references from NVD (8)

Mitigation

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.

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.

The policy

22 lines of BPF C, attached at lsm/socket_create.

// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>

#define AF_RDS	21
#define EPERM	1

char _license[] SEC("license") = "Dual BSD/GPL";

SEC("lsm/socket_create")
int BPF_PROG(cve_2026_98069_rds_block, int family, int type, int protocol,
	     int kern, int ret)
{
	if (ret)
		return ret;
	if (family == AF_RDS)
		return -EPERM;
	return 0;
}

Process

How this upatch was written, checked and reviewed, from the registry’s history.

  1. 25 Sept 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #13 openedAdd CVE-2026-98069: Refuses AF_RDS socketsromanlab
  3. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)
  4. 25 Nov 2026MergeMerged #13romanlab

No human review is recorded on GitHub for this upatch yet.

Evidence

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
Statesocket(AF_RDS, SOCK_SEQPACKET, 0)
Before loadingEAFNOSUPPORT
Upatch loadedEPERM
After unloadingEAFNOSUPPORT
tools-test.log Output of tools/test --setup on the shirudo test VM.
tools/test --setup, 2026-11-25T10:32:11Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-98069
  before  unsupported  this kernel has no RDS, socket(AF_RDS) failed with EAFNOSUPPORT
  loaded  blocked      socket(AF_RDS) failed with EPERM
  after   unsupported  this kernel has no RDS, socket(AF_RDS) failed with EAFNOSUPPORT
  PASS: blocked while loaded; this machine lacks the vulnerable feature, so only the refusal was shown

Use it

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
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
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>