upatch.dev

CVE-2026-90011

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

Drops iSCSI Login Request PDUs with DataSegmentLength >= 8189 to mitigate CVE-2026-90011.

Critical 9.1Vetted

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

At a glance

CVE-2026-90011 is a critical (CVSS 9.1) vulnerability in the Linux kernel, published 16 September 2026. A vetted upatch, cve-2026-90011-iscsi-login-block, blocks it on running Linux machines with shirudo until the kernel is patched.

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

Overview

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.

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

Sources

More references from NVD (8)

Mitigation

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.

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().

The policy

77 lines of BPF C, attached at cgroup_skb/ingress.

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

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

#define ETH_P_IP		0x0800
#define ETH_P_IPV6		0x86dd
#define IPPROTO_TCP		6
#define ISCSI_LISTEN_PORT	3260
#define ISCSI_HDR_LEN		48
#define ISCSI_OPCODE_MASK	0x3f
#define ISCSI_OP_LOGIN		0x03
#define MAX_KEY_VALUE_PAIRS	8192
#define MIN_BAD_LOGIN_DLENGTH	(MAX_KEY_VALUE_PAIRS - 3)

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

SEC("cgroup_skb/ingress")
int cve_2026_90011_iscsi_login_block(struct __sk_buff *skb)
{
	struct tcphdr tcp;
	__u8 bhs[8];
	__u32 l4_off, doff, payload_off, dlength;
	__u16 proto;

	if (skb->local_port != ISCSI_LISTEN_PORT)
		return 1;

	proto = bpf_ntohs((__u16)skb->protocol);
	if (proto == ETH_P_IP) {
		struct iphdr ip4;

		if (bpf_skb_load_bytes(skb, 0, &ip4, sizeof(ip4)) < 0)
			return 1;
		if (ip4.protocol != IPPROTO_TCP)
			return 1;
		l4_off = (__u32)ip4.ihl * 4;
		if (l4_off < sizeof(ip4))
			return 1;
	} else if (proto == ETH_P_IPV6) {
		struct ipv6hdr ip6;

		if (bpf_skb_load_bytes(skb, 0, &ip6, sizeof(ip6)) < 0)
			return 1;
		if (ip6.nexthdr != IPPROTO_TCP)
			return 1;
		l4_off = sizeof(ip6);
	} else {
		return 1;
	}

	if (bpf_skb_load_bytes(skb, l4_off, &tcp, sizeof(tcp)) < 0)
		return 1;
	if (tcp.dest != bpf_htons(ISCSI_LISTEN_PORT))
		return 1;

	doff = (__u32)tcp.doff * 4;
	if (doff < sizeof(tcp))
		return 1;

	payload_off = l4_off + doff;
	if (skb->len < payload_off + ISCSI_HDR_LEN)
		return 1;

	if (bpf_skb_load_bytes(skb, payload_off, bhs, sizeof(bhs)) < 0)
		return 1;
	if ((bhs[0] & ISCSI_OPCODE_MASK) != ISCSI_OP_LOGIN)
		return 1;

	dlength = ((__u32)bhs[5] << 16) | ((__u32)bhs[6] << 8) | (__u32)bhs[7];
	if (dlength >= MIN_BAD_LOGIN_DLENGTH)
		return 0;

	return 1;
}

Process

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

  1. 16 Sept 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #17 openedAdd CVE-2026-90011: Drops iSCSI Login Request PDUs with DataSegmentLength >= 8189romanlab
  3. 25 Nov 2026MergeMerged #17romanlab
  4. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)

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

Evidence

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
StateiSCSI Login Request (DataSegmentLength = 8189) on TCP port 3260iSCSI Login Request (DataSegmentLength = 64) on TCP port 3260
Before loadingreceivedreceived
Upatch loadeddroppedreceived
After unloadingreceivedreceived
tools-test.log Output of tools/test --setup before, while and after the upatch was loaded.
tools/test --setup, 2026-11-25T10:39:49Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-90011
  before  reached      TCP 127.0.0.1:3260 received the 48-byte iSCSI Login Request header with DataSegmentLength 8189
  loaded  blocked      iSCSI Login Request header with DataSegmentLength 8189 was dropped on TCP 127.0.0.1:3260 while DataSegmentLength 64 passed
  after   reached      TCP 127.0.0.1:3260 received the 48-byte iSCSI Login Request header with DataSegmentLength 8189
  PASS: reached before, blocked while loaded, reached again after

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-90011
Publish and roll out
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>