# CVE-2026-90011: scsi: target: iscsi: Reserve a terminator byte for the login payload

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

## At a glance

CVE-2026-90011 is rated Critical 9.1 (CVSS 3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H). It affects the Linux kernel and was published on 16 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.8%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-90011-iscsi-login-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-90011, "scsi: target: iscsi: Reserve a terminator byte for the login payload", was published on 16 September 2026. In `drivers/target/iscsi/iscsi_target_login.c`, `iscsi_login_init_conn()` allocates `login->req_buf` with `MAX_KEY_VALUE_PAIRS` (8192) bytes, while `iscsi_target_check_login_request()` (`drivers/target/iscsi/iscsi_target_nego.c`) rejects a Login Request PDU only when its 24-bit `DataSegmentLength` (`login_req->dlength`) is strictly greater than `MAX_KEY_VALUE_PAIRS`. Because `iscsit_get_login_rx()` reads `payload_length + padding` bytes where `padding = ((-payload_length) & 3)`, any `DataSegmentLength` from 8189 to 8192 fills all 8192 bytes of `login->req_buf` and leaves no byte for a NUL terminator. When a portal is configured for CHAP, `convert_null_to_semi()` replaces embedded NUL bytes with `;` and `chap_check_algorithm()` and `extract_param()` pass `login->req_buf` to `kstrdup()`, `strstr()`, and `strlen_semi()`, reading past the end of `login->req_buf` into adjacent slab memory.

### Official description

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

scsi: target: iscsi: Reserve a terminator byte for the login payload

iscsi_target_check_login_request() rejects a login PDU whose DataSegmentLength exceeds MAX_KEY_VALUE_PAIRS, but the test is '>' and login->req_buf is allocated with exactly MAX_KEY_VALUE_PAIRS bytes. Since iscsit_get_login_rx() receives payload_length + padding bytes, where

padding = ((-payload_length) & 3);

any payload_length from 8189 to 8192 fills the whole 8192 byte buffer. The write stays in bounds, but no byte is left for a NUL terminator.

The buffer is subsequently consumed as a C string. In the CHAP path chap_check_algorithm() calls kstrdup(a_str), and extract_param() calls strstr(in_buf, pattern) followed by strlen_semi(), none of which take a length. convert_null_to_semi() additionally rewrites every embedded NUL to ';', so even a payload made of well formed NUL separated key=value records is left without a terminator. These walk past the end of the object into adjacent slab memory. It is reachable by an unauthenticated initiator against a portal configured for CHAP; when authentication is not required iscsi_login_zero_tsih_s2() rewrites AuthMethod to None and the CHAP path is never entered.

Allocate one extra byte. kzalloc() zeroes it and nothing ever writes to it, as every writer copies to offset 0 for at most MAX_KEY_VALUE_PAIRS bytes, so the buffer is always terminated.

## What the upatch does

It attaches to `cgroup_skb/ingress` at the root cgroup and inspects packets arriving for local port 3260 (`ISCSI_LISTEN_PORT`). When an IPv4 or IPv6 TCP packet to destination port 3260 carries at least the 48-byte iSCSI Basic Header Segment (`ISCSI_HDR_LEN`) and its opcode (`bhs[0] & 0x3f`) is `ISCSI_OP_LOGIN` (`0x03`) with a 24-bit `DataSegmentLength` (`bhs[5..7]`) of at least 8189 (`MAX_KEY_VALUE_PAIRS - 3`), the program returns `0` to drop the packet before the socket receives the Login Request header. Every other packet returns `1`.

The policy: [`cve-2026-90011-iscsi-login-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-90011), 77 lines of BPF C attached at `cgroup_skb/ingress`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- Any iSCSI Login Request PDU sent in a TCP segment to port 3260 with `DataSegmentLength >= 8189` is dropped. Values above 8192 are already rejected by `iscsi_target_check_login_request()`, and normal iSCSI login requests carry a few hundred bytes of key-value pairs.
- Normal iSCSI Login Request PDUs (`DataSegmentLength <= 8188`) and all other iSCSI opcodes on port 3260 pass unchanged.
- All traffic on ports other than 3260 is untouched.
- Not covered: an iSCSI target portal configured to listen on a non-default TCP port other than 3260, SCTP transports (`ISCSI_SCTP_TCP`, `ISCSI_SCTP_UDP`), or a Login Request BHS header split across multiple TCP segments so that the first segment holds fewer than 48 payload bytes.

## 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`. On every ingress packet whose socket is not bound to local port 3260, a run costs one comparison of `skb->local_port` against `3260`. Only packets to local port 3260 read the IP, TCP, and 8-byte iSCSI header prefix with `bpf_skb_load_bytes()`.

## Affected versions

| Branch   | Bug added in | Fixed in |
| -------- | ------------ | -------- |
| 5.10     | 3.1          | 5.10.270 |
| 5.15     | 3.1          | 5.15.221 |
| 6.1      | 3.1          | 6.1.188  |
| 6.6      | 3.1          | 6.6.157  |
| 6.12     | 3.1          | 6.12.110 |
| 6.18     | 3.1          | 6.18.51  |
| 7.2      | 3.1          | 7.2.5    |
| mainline | 3.1          | 7.3      |

## How it was tested

While loaded, an iSCSI Login Request header with DataSegmentLength 8189 to TCP port 3260 was dropped by cgroup_skb/ingress, while a normal Login Request header with DataSegmentLength 64 was received. The test kernel already has the fix and no iSCSI target module, so this shows the refusal on TCP port 3260.

- **Tested:** 25 Nov 2026
- **Target:** Linux 7.4 with the fix, loopback TCP listener on port 3260 (ISCSI_LISTEN_PORT)
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Machine:** shirudo test VM

### Results

| State           | iSCSI Login Request (DataSegmentLength = 8189) on TCP port 3260 | iSCSI Login Request (DataSegmentLength = 64) on TCP port 3260 |
| --------------- | --------------------------------------------------------------- | ------------------------------------------------------------- |
| Before loading  | received                                                        | received                                                      |
| Upatch loaded   | dropped                                                         | received                                                      |
| After unloading | received                                                        | received                                                      |

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

Publish and roll out:

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

### Links

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

### More references from NVD (8)

- [git.kernel.org](https://git.kernel.org/stable/c/1624bff4c5118ad494d50ad94d44f22064667a7f) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/3ddf3ea291a0ef2ea93b82e158960ac2cc42302b) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/5fac79f248c37774d1dd761406f83d25ca6ff8e4) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/6b589ef9d5f6cdc70d2b4f269ca6cf26b5ebb076) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/6ddddcad436d8e6e619204d3c848147ff2f5bf1e) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/b19dc17ed963ac36c0db4b52a1803fb11169f91f) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/eb9dadf4d552ebe10644871c5189286552aa48f5) (Patch)
- [git.kernel.org](https://git.kernel.org/stable/c/f4825922d2fb371e2b969697d792077f1b62b62c) (Patch)
