Vulnerability · Published May 21, 2024 · Assigned by Linux
CVE-2023-52813crypto: pcrypt - Fix hungtask for PADATA_RESET
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 21% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: crypto: pcrypt - Fix hungtask for PADATA_RESET We found a hungtask bug in test_aead_vec_cfg as follows: INFO: task cryptomgr_test:391009 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Call trace: __switch_to+0x98/0xe0 __schedule+0x6c4/0xf40 schedule+0xd8/0x1b4 schedule_timeout+0x474/0x560 wait_for_common+0x368/0x4e0 wait_for_completion+0x20/0x30 wait_for_completion+0x20/0x30 test_aead_vec_cfg+0xab4/0xd50 test_aead+0x144/0x1f0 alg_test_aead+0xd8/0x1e0 alg_test+0x634/0x890 cryptomgr_test+0x40/0x70 kthread+0x1e0/0x220 ret_from_fork+0x10/0x18 Kernel panic - not syncing: hung_task: blocked tasks For padata_do_parallel, when the return err is 0 or -EBUSY, it will call wait_for_completion(&wait->completion) in test_aead_vec_cfg. In normal case, aead_request_complete() will be called in pcrypt_aead_serial and the return err is 0 for padata_do_parallel. But, when pinst->flags is PADATA_RESET, the return err is -EBUSY for padata_do_parallel, and it won't call aead_request_complete(). Therefore, test_aead_vec_cfg will hung at wait_for_completion(&wait->completion), which will cause hungtask. The problem comes as following: (padata_do_parallel) | rcu_read_lock_bh(); | err = -EINVAL; | (padata_replace) | pinst->flags |= PADATA_RESET; err = -EBUSY | if (pinst->flags & PADATA_RESET) | rcu_read_unlock_bh() | return err In order to resolve the problem, we replace the return err -EBUSY with -EAGAIN, which means parallel_data is changing, and the caller should call it again. v3: remove retry and just change the return err. v2: introduce padata_try_do_parallel() in pcrypt_aead_encrypt and pcrypt_aead_decrypt to solve the hungtask.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-abi-stablelists | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-core | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-cross-headers | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug-core | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug-devel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug-modules | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug-modules-extra | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-devel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-doc | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-headers | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-modules | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-modules-extra | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-rt | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-core | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-core | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-devel | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-kvm | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-modules | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-devel | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-kvm | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-modules | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-modules-extra | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-tools | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-tools-libs | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-tools-libs-devel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump-core | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | perf | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | python3-perf | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| Debian:12 | linux | 6.1.64-1 | DEBIAN-CVE-2023-52813 |
| Debian:13 | linux | 6.6.8-1 | DEBIAN-CVE-2023-52813 |
| Debian:14 | linux | 6.6.8-1 | DEBIAN-CVE-2023-52813 |
| Rocky Linux:8 | kernel | 0:4.18.0-553.8.1.el8_10 | RLSA-2024:4211 |
| Rocky Linux:8 | kernel-rt | 0:4.18.0-553.8.1.rt7.349.el8_10 | RLSA-2024:4352 |
| Ubuntu:22.04:LTS | linux | 5.15.0-100.110 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1056.61 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1058.66 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1058.66.1 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1053.61 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1052.57 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1038.44 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1048.51 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1050.56 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1052.57 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-100.110 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1046.46 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 6.5.0-1014.14 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1025.25 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1012.12 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1053.59 | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1048.51 | UBUNTU-CVE-2023-52813 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2023-52813 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1030.34 | UBUNTU-CVE-2023-52813 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 16295bec6398a3eedc9377e1af6ff4c71b98c300 – before fb2d3a50a8f29a3c66682bb426144f40e32ab81816295bec6398a3eedc9377e1af6ff4c71b98c300 – before 039fec48e062504f14845124a1a25eb199b2ddc016295bec6398a3eedc9377e1af6ff4c71b98c300 – before c9c1334697301c10e6918d747ed38abfbc0c96e716295bec6398a3eedc9377e1af6ff4c71b98c300 – before e97bf4ada7dddacd184c3e196bd063b0dc71b41d16295bec6398a3eedc9377e1af6ff4c71b98c300 – before 546c1796ad1ed0d87dab3c4b5156d75819be231616295bec6398a3eedc9377e1af6ff4c71b98c300 – before c55fc098fd9d2dca475b82d00ffbcaf97879d77e16295bec6398a3eedc9377e1af6ff4c71b98c300 – before e134f3aba98e6c801a693f540912c2d493718ddf16295bec6398a3eedc9377e1af6ff4c71b98c300 – before 372636debe852913529b1716f44addd94fff2d28 |
| Linux | Linux | 2.6.34 |
References
- https://git.kernel.org/stable/c/fb2d3a50a8f29a3c66682bb426144f40e32ab818
- https://git.kernel.org/stable/c/039fec48e062504f14845124a1a25eb199b2ddc0
- https://git.kernel.org/stable/c/c9c1334697301c10e6918d747ed38abfbc0c96e7
- https://git.kernel.org/stable/c/e97bf4ada7dddacd184c3e196bd063b0dc71b41d
- https://git.kernel.org/stable/c/546c1796ad1ed0d87dab3c4b5156d75819be2316
- https://git.kernel.org/stable/c/c55fc098fd9d2dca475b82d00ffbcaf97879d77e
- https://git.kernel.org/stable/c/e134f3aba98e6c801a693f540912c2d493718ddf
- https://git.kernel.org/stable/c/372636debe852913529b1716f44addd94fff2d28
- https://git.kernel.org/stable/c/8f4f68e788c3a7a696546291258bfa5fdb215523