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

scsi: target: iscsi: Validate CHAP_R length before base64 decode

chap_server_compute_hash() allocates client_digest as
kzalloc(chap->digest_size) and then, for BASE64-encoded responses,
passes chap_r directly to chap_base64_decode() without checking whether
the input length could produce more than digest_size bytes of output.

chap_base64_decode() writes to the destination unconditionally as long
as there is input to consume. With MAX_RESPONSE_LENGTH set to 128 and
the "0b" prefix stripped by extract_param(), up to 127 base64 characters
can reach the decoder. 127 characters decode to 95 bytes. For SHA-256
(digest_size=32) this overflows client_digest by 63 bytes; for MD5
(digest_size=16) the overflow is 79 bytes.

The length check at line 344 fires after the write has already happened.

The HEX branch in the same switch statement already validates the length
up front. Apply the same approach to the BASE64 branch: strip trailing
base64 padding characters, then reject any input whose data length
exceeds DIV_ROUND_UP(digest_size * 4, 3) before calling the decoder.

Stripping trailing '=' before the comparison handles both padded and
unpadded encodings. chap_base64_decode() already returns early on '=',
so the full original string is still passed to the decoder unchanged.

The mutual CHAP path decodes CHAP_C into initiatorchg_binhex, which is
kzalloc(CHAP_CHALLENGE_STR_LEN). extract_param() caps initiatorchg at
CHAP_CHALLENGE_STR_LEN characters, so at most CHAP_CHALLENGE_STR_LEN-1
base64 characters reach the decoder. The maximum decoded size,
DIV_ROUND_UP((CHAP_CHALLENGE_STR_LEN-1) * 3, 4), is less than
CHAP_CHALLENGE_STR_LEN, so no overflow is possible there. A comment is
added at the call site to document this.
Published: 2026-07-19
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

The Linux kernel contains a buffer overflow in the iSCSI target’s CHAP authentication path. When processing a CHAP_R response, the kernel allocates a digest buffer sized for the expected SHA‑256 or MD5 hash but then decodes the Base64‑encoded value without first confirming that the decoded data will fit. Because a malformed Base64 string can produce up to 95 bytes of output, the write overruns the buffer by 63 or 79 bytes, corrupting kernel memory. An attacker who can supply a crafted CHAP_R string can trigger this overflow and gain control of kernel execution, allowing arbitrary code execution with elevated privileges.

Affected Systems

All Linux kernel builds that include the iSCSI target module are susceptible unless they contain the patch that adds a length check before Base64 decoding. This includes standard distributions that ship the default kernel with an enabled iSCSI target; any kernel version lacking the commit that introduces the validation logic is at risk.

Risk and Exploitability

The vulnerability carries a CVSS score of 9.8, indicating critical severity, while the EPSS score is below 1 %, suggesting limited current exploitation activity. It is not listed in the CISA KEV catalog. Exploitation requires a network connection to a host running the vulnerable iSCSI target and the ability to deliver a specially crafted CHAP_R value during authentication. If successful, the overflow can be leveraged to overwrite control data in the kernel, enabling remote code execution.

Generated by OpenCVE AI on October 23, 2026 at 00:45 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel patch from upstream that adds a length check before Base64 decoding, thereby preventing the buffer overflow identified as CWE-122, CWE-787, and CWE-805.
  • If an immediate kernel update is not feasible, disable CHAP authentication in the iSCSI target configuration or restrict its use to trusted networks; this mitigates the buffer overflow vectors associated with CWE-122 and CWE-787.
  • Implement network‑level controls such as firewall rules to block unauthorized iSCSI traffic and monitor authentication logs for anomalous CHAP_R values, reducing exposure to the abnormal input exploitation described by CWE-805.

Generated by OpenCVE AI on October 23, 2026 at 00:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8663-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8664-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8781-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8817-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-8842-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8817-3 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8906-1 Linux kernel (IBM) vulnerabilities
History

Thu, 22 Oct 2026 14:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-787
CPEs cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*

Mon, 19 Oct 2026 21:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-122

Sat, 17 Oct 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sun, 26 Jul 2026 09:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-119
CWE-787

Wed, 22 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-805
References
Metrics threat_severity

None

threat_severity

Important


Wed, 22 Jul 2026 00:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-119
CWE-787

Mon, 20 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Sun, 19 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: scsi: target: iscsi: Validate CHAP_R length before base64 decode chap_server_compute_hash() allocates client_digest as kzalloc(chap->digest_size) and then, for BASE64-encoded responses, passes chap_r directly to chap_base64_decode() without checking whether the input length could produce more than digest_size bytes of output. chap_base64_decode() writes to the destination unconditionally as long as there is input to consume. With MAX_RESPONSE_LENGTH set to 128 and the "0b" prefix stripped by extract_param(), up to 127 base64 characters can reach the decoder. 127 characters decode to 95 bytes. For SHA-256 (digest_size=32) this overflows client_digest by 63 bytes; for MD5 (digest_size=16) the overflow is 79 bytes. The length check at line 344 fires after the write has already happened. The HEX branch in the same switch statement already validates the length up front. Apply the same approach to the BASE64 branch: strip trailing base64 padding characters, then reject any input whose data length exceeds DIV_ROUND_UP(digest_size * 4, 3) before calling the decoder. Stripping trailing '=' before the comparison handles both padded and unpadded encodings. chap_base64_decode() already returns early on '=', so the full original string is still passed to the decoder unchanged. The mutual CHAP path decodes CHAP_C into initiatorchg_binhex, which is kzalloc(CHAP_CHALLENGE_STR_LEN). extract_param() caps initiatorchg at CHAP_CHALLENGE_STR_LEN characters, so at most CHAP_CHALLENGE_STR_LEN-1 base64 characters reach the decoder. The maximum decoded size, DIV_ROUND_UP((CHAP_CHALLENGE_STR_LEN-1) * 3, 4), is less than CHAP_CHALLENGE_STR_LEN, so no overflow is possible there. A comment is added at the call site to document this.
Title scsi: target: iscsi: Validate CHAP_R length before base64 decode
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-19T20:17:54.510Z

Reserved: 2026-07-19T07:54:57.018Z

Link: CVE-2026-63886

cve-icon Vulnrichment

Updated: 2026-10-16T15:32:55.287Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-19T16:17:05.723

Modified: 2026-10-22T14:29:02.840

Link: CVE-2026-63886

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-63886 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T00:45:13Z

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

  • CWE-787

    Out-of-bounds Write

  • CWE-805

    Buffer Access with Incorrect Length Value