CVE-2026-99851: nvmet: Free the old negotiation state when restarting authentication
In the Linux kernel, the following vulnerability has been resolved:
nvmet: Free the old negotiation state when restarting authentication
Restarting a DH-HMAC-CHAP negotiation with SEND(NEGOTIATE) resets sq->dhchapstep but does not release the previous c1/c2/skey, which are only freed in nvmetauthsqfree() at teardown. The next CHALLENGE/REPLY exchange then overwrites those pointers with fresh allocations.
An unauthenticated host can repeat the negotiate message endlessly, leaking a few dozen bytes per round and slowly exhausting target memory.
Clear the old negotiation state with nvmetauthsqfree() before setting up the new one. Also reset dhchapskeylen to zero: if a DH session key was already established, a following round with dhvlen=0 would otherwise pass a NULL skey with a stale non-zero length to the HMAC code and dereference it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux kernel nvmet, call nvmet_auth_sq_free() to clear the old negotiation state before setting up a restarted DH-HMAC-CHAP negotiation, and reset dhchap_skey_len to zero.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Linux kernel systems operating an NVMe target with DH-HMAC-CHAP authentication negotiation available are exposed. The issue is triggered through the target-side authentication negotiation path.
What does an attacker need to exploit it?
An unauthenticated host needs to be able to send repeated SEND(NEGOTIATE) messages to the NVMe target. Repeating negotiation can leak memory each round, and a later negotiation with dhvlen=0 after a session key was established can cause a NULL session-key dereference.
What can be done if the fix cannot be applied immediately?
Restrict unauthenticated hosts from reaching the NVMe target authentication interface and prevent untrusted initiators from repeatedly initiating authentication negotiation. Monitoring target memory consumption may help identify repeated negotiation attempts.