Skip to contentSkip to conversation

CVE-2026-72130: nvmet-auth: reject short AUTH_RECEIVE buffers

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

nvmet-auth: reject short AUTH_RECEIVE buffers

nvmet_execute_auth_receive() trusts the AUTH_RECEIVE allocation length after checking only that it is nonzero and matches the transfer length. In the SUCCESS1 and FAILURE1/default states, that lets a remote NVMe-oF initiator reach the fixed-size DH-HMAC-CHAP response builders with a kmalloc() buffer shorter than the response, so nvmet_auth_success1() and nvmet_auth_failure1() write past the allocation; both only WARN_ON the short length and then format the message anyway.

Impact: A remote NVMe-oF initiator with access to an auth-enabled target can trigger a 16-byte heap out-of-bounds write via a one-byte AUTH_RECEIVE allocation length.

Compute the minimum response length for the current DH-HMAC-CHAP step in nvmet_auth_receive_data_len() and report a zero data length when the host-supplied allocation length is shorter, so the existing zero-length check in nvmet_execute_auth_receive() rejects the command before any builder runs. The SUCCESS1 minimum is sizeof(struct nvmf_auth_dhchap_success1_data) plus the HMAC hash length, because the response hash is written into the rval[] flexible-array tail, so the minimum is state dependent rather than a flat sizeof. CHALLENGE keeps its existing variable-length guard in nvmet_auth_challenge().

This is reachable only when in-band DH-HMAC-CHAP authentication is configured on the target.

The Linux kernel CVE team has assigned CVE-2026-72130 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.0 with commit db1312dd95488b5e6ff362ff66fcf953a46b1821 and fixed in 6.12.101 with commit 80bf7b7f676e3987bbe06af3c359bd56ac91a5a9
	Issue introduced in 6.0 with commit db1312dd95488b5e6ff362ff66fcf953a46b1821 and fixed in 6.18.40 with commit 2eaa3ad450141cfcf187bb43cb8335eb336b5f87
	Issue introduced in 6.0 with commit db1312dd95488b5e6ff362ff66fcf953a46b1821 and fixed in 7.1.5 with commit bc111698b46e43eddd8664cceaa621cd559e99a0
	Issue introduced in 6.0 with commit db1312dd95488b5e6ff362ff66fcf953a46b1821 and fixed in 7.2-rc1 with commit 779575bc35c687697ba69e904f2cd22e60112534

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-72130

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/nvme/target/fabrics-cmd-auth.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/80bf7b7f676e3987bbe06af3c359bd56ac91a5a9
	https://git.kernel.org/stable/c/2eaa3ad450141cfcf187bb43cb8335eb336b5f87
	https://git.kernel.org/stable/c/bc111698b46e43eddd8664cceaa621cd559e99a0
	https://git.kernel.org/stable/c/779575bc35c687697ba69e904f2cd22e60112534