Executive brief
A vulnerability exists in the Linux kernel's padata framework, which is used for parallelizing CPU-intensive work like encryption. A race condition in how the system handles reordering tasks can lead to a system crash or potential unauthorized access. This could allow a local user to disrupt system operations or compromise data integrity. The issue has been resolved in recent kernel updates.
Technical details
A use-after-free (UAF) vulnerability exists in the padata infrastructure of the Linux kernel, specifically within the reorder_work mechanism. The flaw is rooted in a race condition where a parallel_data (pd) object can be freed by one process (e.g., crypto_del_alg) while a worker thread (invoke_padata_reorder) is still attempting to access it. This occurs because the reorder_work was queued without properly incrementing the reference count of the pd object. An attacker with local access could exploit this race condition to trigger a kernel crash or potentially execute arbitrary code. The fix involves ensuring the pd reference count is incremented before queuing reorder_work and decremented only after the work is completed.
Affected products
- Linux Linux Kernel 5.4.19 to 5.5, 5.5.3 to 5.10.235, 5.11 to 5.15.79, 5.16 to 6.1.129, 6.2 to 6.6.76, 6.7 to 6.12.13, 6.13 to 6.13.2
Timeline
- 2025-01-10: patched: Initial patch authored by Chen Ridong
- 2025-02-27: advisory: CVE-2025-21726 published
References
- https://git.kernel.org/stable/c/4c6209efea2208597dbd3e52dc87a0d1a8f2dbe1
- https://git.kernel.org/stable/c/6f45ef616775b0ce7889b0f6077fc8d681ab30bc
- https://git.kernel.org/stable/c/7000507bb0d2ceb545c0a690e0c707c897d102c2
- https://git.kernel.org/stable/c/8ca38d0ca8c3d30dd18d311f1a7ec5cb56972cac
- https://git.kernel.org/stable/c/a54091c24220a4cd847d5b4f36d678edacddbaf0
- https://git.kernel.org/stable/c/dd7d37ccf6b11f3d95e797ebe4e9e886d0332600
- https://git.kernel.org/stable/c/f4f1b1169fc3694f9bc3e28c6c68dbbf4cc744c0