CVE-2023-52813
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/05/2024
Last modified:
26/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
crypto: pcrypt - Fix hungtask for PADATA_RESET<br />
<br />
We found a hungtask bug in test_aead_vec_cfg as follows:<br />
<br />
INFO: task cryptomgr_test:391009 blocked for more than 120 seconds.<br />
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.<br />
Call trace:<br />
__switch_to+0x98/0xe0<br />
__schedule+0x6c4/0xf40<br />
schedule+0xd8/0x1b4<br />
schedule_timeout+0x474/0x560<br />
wait_for_common+0x368/0x4e0<br />
wait_for_completion+0x20/0x30<br />
wait_for_completion+0x20/0x30<br />
test_aead_vec_cfg+0xab4/0xd50<br />
test_aead+0x144/0x1f0<br />
alg_test_aead+0xd8/0x1e0<br />
alg_test+0x634/0x890<br />
cryptomgr_test+0x40/0x70<br />
kthread+0x1e0/0x220<br />
ret_from_fork+0x10/0x18<br />
Kernel panic - not syncing: hung_task: blocked tasks<br />
<br />
For padata_do_parallel, when the return err is 0 or -EBUSY, it will call<br />
wait_for_completion(&wait->completion) in test_aead_vec_cfg. In normal<br />
case, aead_request_complete() will be called in pcrypt_aead_serial and the<br />
return err is 0 for padata_do_parallel. But, when pinst->flags is<br />
PADATA_RESET, the return err is -EBUSY for padata_do_parallel, and it<br />
won&#39;t call aead_request_complete(). Therefore, test_aead_vec_cfg will<br />
hung at wait_for_completion(&wait->completion), which will cause<br />
hungtask.<br />
<br />
The problem comes as following:<br />
(padata_do_parallel) |<br />
rcu_read_lock_bh(); |<br />
err = -EINVAL; | (padata_replace)<br />
| pinst->flags |= PADATA_RESET;<br />
err = -EBUSY |<br />
if (pinst->flags & PADATA_RESET) |<br />
rcu_read_unlock_bh() |<br />
return err<br />
<br />
In order to resolve the problem, we replace the return err -EBUSY with<br />
-EAGAIN, which means parallel_data is changing, and the caller should call<br />
it again.<br />
<br />
v3:<br />
remove retry and just change the return err.<br />
v2:<br />
introduce padata_try_do_parallel() in pcrypt_aead_encrypt and<br />
pcrypt_aead_decrypt to solve the hungtask.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 2.6.34 (including) | 4.14.331 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.15 (including) | 4.19.300 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.262 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.202 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.140 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.64 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.5.13 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6 (including) | 6.6.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/039fec48e062504f14845124a1a25eb199b2ddc0
- https://git.kernel.org/stable/c/372636debe852913529b1716f44addd94fff2d28
- https://git.kernel.org/stable/c/546c1796ad1ed0d87dab3c4b5156d75819be2316
- https://git.kernel.org/stable/c/8f4f68e788c3a7a696546291258bfa5fdb215523
- https://git.kernel.org/stable/c/c55fc098fd9d2dca475b82d00ffbcaf97879d77e
- https://git.kernel.org/stable/c/c9c1334697301c10e6918d747ed38abfbc0c96e7
- https://git.kernel.org/stable/c/e134f3aba98e6c801a693f540912c2d493718ddf
- https://git.kernel.org/stable/c/e97bf4ada7dddacd184c3e196bd063b0dc71b41d
- https://git.kernel.org/stable/c/fb2d3a50a8f29a3c66682bb426144f40e32ab818
- https://git.kernel.org/stable/c/039fec48e062504f14845124a1a25eb199b2ddc0
- https://git.kernel.org/stable/c/372636debe852913529b1716f44addd94fff2d28
- https://git.kernel.org/stable/c/546c1796ad1ed0d87dab3c4b5156d75819be2316
- https://git.kernel.org/stable/c/8f4f68e788c3a7a696546291258bfa5fdb215523
- https://git.kernel.org/stable/c/c55fc098fd9d2dca475b82d00ffbcaf97879d77e
- https://git.kernel.org/stable/c/c9c1334697301c10e6918d747ed38abfbc0c96e7
- https://git.kernel.org/stable/c/e134f3aba98e6c801a693f540912c2d493718ddf
- https://git.kernel.org/stable/c/e97bf4ada7dddacd184c3e196bd063b0dc71b41d
- https://git.kernel.org/stable/c/fb2d3a50a8f29a3c66682bb426144f40e32ab818



