KernelScan.io

HIGH Introduced in 6.17

phmac EngineTransfer Race

CVE-2026-97591

CVSS 7.0 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: s390/crypto: Fix handling of EBUSY in PHMAC when req is pushed to crypto engine When a request is transferred to the engine via crypto_transfer_hash_request_to_engine() there are two return codes signaling a successful transfer: EINPROGRESS and EBUSY. However the correct handling of EBUSY was missing and has been added as a return code indicating a successful transfer to the crypto engine.

02

Engine v0.6.0

Risk summary

A local user on an s390 system with the PHMAC crypto module loaded can trigger a race condition by filling the crypto engine queue, causing the request cleanup path to corrupt memory while the engine is still processing the request. This can lead to kernel memory corruption, incorrect cryptographic results, or a kernel crash. The bug requires concurrent crypto operations to hit the race window and is limited to s390 architecture with protected key HMAC hardware support.

Affectedarch/s390/crypto/phmac_s390.c (s390 crypto PHMAC)

Vulnerability analysis

The s390 protected key HMAC driver fails to recognize that a -EBUSY return from the crypto engine transfer function means the request was successfully queued. Only -EINPROGRESS was treated as a success code, so when the engine queue is full and returns -EBUSY, the driver incorrectly runs its cleanup path — zeroing the request's cryptographic context and decrementing the engine usage counter — while the crypto engine is still actively processing that same request. This results in the engine operating on corrupted (zeroed) memory and an incorrect reference count, which can produce wrong hash results or crash the kernel. The fix treats -EBUSY as an additional success indicator, skipping cleanup when the request has been accepted by the engine. The vulnerable path is reachable from local userspace through the kernel crypto API (such as AF_ALG sockets) on s390 systems where the PHMAC module is loaded, and exploitation requires concurrent crypto operations to fill the engine queue and trigger the EBUSY return.

03

BranchIntroducedFixed inPatch commit
6.186.176.18.53203702f0013f
7.26.177.2.7bcd7f1f1e2f2
mainline6.177.3330148371401