CVE-2026-23044
Description
In the Linux kernel, the following vulnerability has been resolved:
PM: hibernate: Fix crash when freeing invalid crypto compressor
When crypto_alloc_acomp() fails, it returns an ERR_PTR value, not NULL.
The cleanup code in save_compressed_image() and load_compressed_image() unconditionally calls crypto_free_acomp() without checking for ERR_PTR, which causes crypto_acomp_tfm() to dereference an invalid pointer and crash the kernel.
This can be triggered when the compression algorithm is unavailable (e.g., CONFIG_CRYPTO_LZO not enabled).
Fix by adding IS_ERR_OR_NULL() checks before calling crypto_free_acomp() and acomp_request_free(), similar to the existing kthread_stop() check.
[ rjw: Added 2 empty code lines ]
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A NULL-pointer dereference in Linux kernel's hibernation code when an unavailable crypto compressor is used, fixed by adding ERR_PTR checks.
Root
Cause
The Linux kernel's hibernation (suspend-to-disk) code in save_compressed_image() and load_compressed_image() calls crypto_free_acomp() without first verifying that the compressor handle is valid. When crypto_alloc_acomp() fails, it returns an ERR_PTR value rather than NULL. The cleanup path unconditionally passes this invalid pointer to crypto_free_acomp(), which internally calls crypto_acomp_tfm() and dereferences the error value, causing a kernel crash [1][2].
Attack
Vector
An attacker with local access can trigger this bug by ensuring the requested compression algorithm (e.g., LZO) is not available in the kernel configuration (e.g., CONFIG_CRYPTO_LZO disabled). When the system attempts to hibernate or resume from hibernation, the missing algorithm causes crypto_alloc_acomp_alloc() to fail, and the subsequent cleanup dereferences the ERR_PTR, crashing the kernel. No special privileges beyond the ability to initiate hibernation are required.
Impact
The fix adds IS_ERR_OR_NULL() checks before calling crypto_free_acomp() and acomp_request_free(), mirroring the existing kthread_stop() check. This prevents the invalid pointer dereference and ensures graceful cleanup when a compressor allocation fails [1][2].
Mitigation
The patch has been applied to the Linux kernel stable tree. Users should update to a kernel version containing the commit `7966cf0ebe32 commit (or equivalent backport). No workaround is available other than ensuring the required crypto algorithm is built into the kernel or loaded as a module.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
2News mentions
0No linked articles in our index yet.