CVE-2023-52854·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: padata: Fix refcnt handling in padata_free_shell() In a high-load arm64 environment, the pcrypt_aead01 test in LTP can lead to system UAF (Use-After-Free) issues. Due to the lengthy analysis of the pcrypt_aead01 function call, I'll describe the problem scenario using a simplified model: Suppose there's a user of padata named `user_function` that adheres to the padata requirement of calling `padata_free_shell` after `serial()` has been invoked, as demonstrated in the following code: ```c struct request { struct padata_priv padata; struct completion *done; }; void parallel(struct padata_priv *padata) { do_something(); } void serial(struct padata_priv *padata) { struct request *request = container_of(padata, struct request, padata); complete(request->done); } void user_function() { DECLARE_COMPLETION(done) padata->parallel = parallel; padata->serial = serial; padata_do_parallel(); wait_for_completion(&done); padata_free_shell(); } ``` In the corresponding padata.c file, there's the following code: ```c static void padata_serial_worker(struct work_struct *serial_work) { ... cnt = 0; while (!list_empty(&local_list)) { ... padata->serial(padata); cnt++; } local_bh_enable(); if (refcount_sub_and_test(cnt, &pd->refcnt)) padata_free_pd(pd); } ``` Because of the high system load and the accumulation of unexecuted softirq at this moment, `local_bh_enable()` in padata takes longer to execute than usual. Subsequently, when accessing `pd->refcnt`, `pd` has already been released by `padata_free_shell()`, resulting in a UAF issue with `pd->refcnt`. The fix is straightforward: add `refcount_dec_and_test` before calling `padata_free_pd` in `padata_free_shell`.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.6.2
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 2% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2023-52854 scores 7.8 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 6.6
Until: 6.6.2
Fixed in: 6.6.2
How to fix this CVE
Update your Linux kernel to version 6.6.2 or later to resolve a use-after-free (UAF) vulnerability in the padata subsystem. The vulnerability occurs when reference counting is mishandled during high system load, potentially allowing kernel memory corruption. Apply the patch immediately to systems running kernel versions 6.6.0 through 6.6.1.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare against vulnerable range 6.6.0-6.6.2
- Step 2: Verify padata is enabled in your kernel by checking `grep CONFIG_PADATA /boot/config-$(uname -r)` (should show y)
- Step 3: Search kernel logs for UAF-related errors with `dmesg | grep -i 'use.after.free\|UAF\|refcount'` or check `/var/log/kern.log`
- Step 4: After patching, reboot and confirm new kernel version with `uname -r`, then verify padata refcounting with `cat /proc/sys/kernel/padata_cpumask`
FAQ
What is CVE-2023-52854?
CVE-2023-52854 is a use-after-free vulnerability in the Linux kernel's padata (parallel data) subsystem where reference counting is incorrectly managed, allowing freed memory to be accessed during high system load conditions.
Is CVE-2023-52854 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and has no known public exploits, though it poses a significant risk for kernel stability and data integrity.
What versions of Kernel are affected by CVE-2023-52854?
Linux kernel versions 6.6.0, 6.6.1, and 6.6.2 are affected. The vulnerability has been fixed in kernel 6.6.2 and later stable releases.
How do I check if my server is vulnerable to CVE-2023-52854?
Run `uname -r` to check your kernel version. If it shows 6.6.0, 6.6.1, or 6.6.2, your system is vulnerable. Also verify padata is enabled with `grep CONFIG_PADATA /boot/config-$(uname -r)`.
Does Defensia detect CVE-2023-52854?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Linux kernel is installed on a monitored server, CVE-2023-52854 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/0dd34a7ad395dbcf6ae60e48e9786050e25b9bc5
- https://git.kernel.org/stable/c/1734a79e951914f1db2c65e635012a35db1c674b
- https://git.kernel.org/stable/c/1e901bcb8af19416b65f5063a4af7996e5a51d7f
- https://git.kernel.org/stable/c/41aad9d6953984d134fc50f631f24ef476875d4d
- https://git.kernel.org/stable/c/7ddc21e317b360c3444de3023bcc83b85fabae2f
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52854. Free for 1 server.
Get started free