# CVE-2026-98130: sctp: fix a TOCTOU race in SCTP_CMD_TIMER_START

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

## At a glance

CVE-2026-98130 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.5%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-98130-sctp-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-98130, "sctp: fix a TOCTOU race in SCTP_CMD_TIMER_START", was published on 25 September 2026. In `sctp_cmd_interpreter()` (`net/sctp/sm_sideeffect.c`), the `SCTP_CMD_TIMER_START` handler checks `timer_pending()` before calling `timer_reduce()`. If the timer expires and detaches between these two calls, `timer_reduce()` rearms the timer without calling `sctp_association_hold()` to take the association reference needed for the newly armed timer. When the timer callback later drops its association reference, the association reference count becomes unbalanced and can lead to a use-after-free during association teardown.

### Official description

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

sctp: fix a TOCTOU race in SCTP_CMD_TIMER_START

The SCTP_CMD_TIMER_START handler checks timer_pending() before calling timer_reduce(). The timer can expire and detach between these operations, causing timer_reduce() to rearm the timer without taking the association reference required for the newly armed timer.

The timer callback later unconditionally drops its association reference, which can leave the association reference count unbalanced and result in use-after-free during association teardown.

Use the return value of timer_reduce() to determine whether the timer was actually armed. Take the association reference only when timer_reduce() successfully starts a new timer, closing the race between checking the timer state and rearming it.

This issue was reported by Nico Yip (@\_cyeaa\_) working with TrendAI Zero Day Initiative.

## What the upatch does

It attaches to the `socket_create` LSM hook and returns `-EPERM` when the protocol is `IPPROTO_SCTP` (132). Every path that establishes an SCTP association or reaches `sctp_cmd_interpreter()` requires an SCTP socket, and the hook runs before the kernel allocates the socket or loads the `sctp` module. A refusal from an earlier BPF LSM program on the same hook is passed on unchanged.

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

## Side effects

- Creating an SCTP socket (`IPPROTO_SCTP`) fails with `EPERM`, from user space (`socket()`, `socketpair()`, io_uring) and from the kernel.
- SCTP sockets opened before the upatch was loaded keep working.
- Every other socket protocol 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 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            |
| -------- | ------------ | ------------------- |
| 4.19     | 4.19.126     | never (end of life) |
| 5.4      | 5.4.44       | never (end of life) |
| 5.6      | 5.6.16       | never (end of life) |
| 5.10     | 5.7          | 5.10.271            |
| 5.15     | 5.7          | 5.15.222            |
| 6.1      | 5.7          | 6.1.189             |
| 6.6      | 5.7          | 6.6.158             |
| 6.12     | 5.7          | 6.12.111            |
| 6.18     | 5.7          | 6.18.53             |
| 7.2      | 5.7          | 7.2.7               |
| mainline | 5.7          | 7.3                 |

## How it was tested

While loaded, creating an SCTP socket failed with EPERM and other socket protocols worked. The test kernel already has the fix and no SCTP 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 SCTP support
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Machine:** shirudo test VM

### Results

| State           | socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP) |
| --------------- | ------------------------------------------ |
| Before loading  | EPROTONOSUPPORT                            |
| Upatch loaded   | EPERM                                      |
| After unloading | EPROTONOSUPPORT                            |

## 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-98130
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-98130-1.0.0.bee oci://<registry>/<namespace>/cve-2026-98130 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-98130-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-98130 record (Linux kernel CNA)](https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-98130.json)
- [Announcement with affected and fixed versions](https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-98130.mbox)
- [Fix commit 2188569e7e1b](https://git.kernel.org/stable/c/2188569e7e1b0bc3f3b557dc97ab7a02befc11c8)
- [Fix commit e42ba56281ca](https://git.kernel.org/stable/c/e42ba56281ca3ae2dcb3558bebee9a1c9a4831d9)

### Links

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

### More references from NVD (8)

- [git.kernel.org](https://git.kernel.org/stable/c/00b841bac10230c557be6b38efc48508198fe23e) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/09e7f9290d63178f56095d5c18fb9f9470153db5) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/2188569e7e1b0bc3f3b557dc97ab7a02befc11c8) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/3205a20f837f5b1f009427ac3d9f706bf8a6fbec) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/3d698d1e6c8bc41e3e1707777a016f1bdd07842d) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/755d70ca845fd9b87c7b338ae6ae832b08cd0005) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/cbf2df9aac4202f9fb0b361a7fe8c79b29fad92c) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/e42ba56281ca3ae2dcb3558bebee9a1c9a4831d9) (Patch)
