CVE-2026-98387: s390/crypto: Fix skcipher_walk return code handling in aes_s390
In the Linux kernel, the following vulnerability has been resolved:
s390/crypto: Fix skcipherwalk return code handling in aess390
The return codes from skcipherwalkvirt() were not properly checked before entering the processing loops in ecbaescrypt() and ctraescrypt(). If skcipherwalkvirt() fails, the walk structure may be in an undefined state, and attempting to process data could lead to incorrect behavior or accessing uninitialized memory.
Add proper return code checking to ensure correct handling of the walk initialization and walk advance and eventually return to the caller with that return code.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In s390/crypto aes_s390, properly check the return codes from skcipher_walk_virt() during walk initialization and advancement before entering the processing loops in ecb_aes_crypt() and ctr_aes_crypt(); return the error to the caller instead of processing an undefined walk state.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
The issue is in the Linux kernel's s390 AES crypto implementation, specifically the ECB and CTR processing paths in aes_s390. The provided data does not identify affected kernel versions or configuration requirements.
What condition is required to trigger the unsafe behavior?
A failure from skcipher_walk_virt() or from walk advancement must occur before the AES processing loops. Without proper return-code handling, processing may continue with an undefined walk structure, potentially accessing uninitialized memory or causing incorrect behavior.
What does the fix change?
The fix checks return codes from skcipher_walk_virt() before entering the ECB and CTR processing loops and handles errors from walk advancement. It returns those errors to the caller instead of continuing to process data.