Skip to content
Fencer Vulns
high 7.8

CVE-2023-52854 json

padata: Fix refcnt handling in padata_free_shell()

published 2024-05-21 2 y ago modified 2026-06-17 4 mo ago also EUVD-2023-59567

cvss
7.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 15%
public exploits
0
none known

Summary

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`.

Patch / fix

  • Linux Linux 3.17, 4.5, 4.10, 4.15, 4.20, 5.5, 5.6, 5.10.201, 5.15.139, 6.1.63, 6.5.12, 6.6.2, 6.7
  • linux Debian 12 6.1.64-1
  • linux Debian 14, Debian 13 6.6.8-1

debian advisories DEBIAN-CVE-2023-52854

  • linux Ubuntu 22.04 LTS 5.15.0-100.110
  • linux-aws Ubuntu 22.04 LTS 5.15.0-1056.61
  • linux-gcp Ubuntu 22.04 LTS 5.15.0-1053.61
  • linux-gke Ubuntu 22.04 LTS 5.15.0-1052.57
  • linux-ibm Ubuntu 22.04 LTS 5.15.0-1048.51
  • linux-kvm Ubuntu 22.04 LTS 5.15.0-1052.57
  • linux-azure Ubuntu 22.04 LTS 5.15.0-1058.66
  • linux-gkeop Ubuntu 22.04 LTS 5.15.0-1038.44

ubuntu advisories UBUNTU-CVE-2023-52854

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel-rt Linux Micro 6.0 6.4.0-9.1
  • kernel-source-rt Linux Micro 6.0 6.4.0-9.1
  • kernel-source Linux Micro 6.0 6.4.0-18.1
  • kernel-default Linux Micro 6.0 6.4.0-18.1
  • kernel-kvmsmall Linux Micro 6.0 6.4.0-18.1
  • kernel-default-base Linux Micro 6.0 6.4.0-17.1.1.51
  • kernel-default SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLE Live Patching 15 SP2 +2 more 5.3.18-150200.24.203.1
  • kernel-64kb SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS, Enterprise Storage 7.1 5.3.18-150300.59.174.1

suse advisories SUSE-SU-2025:20028-1SUSE-SU-2025:20008-1SUSE-SU-2024:3499-1SUSE-SU-2024:3249-1SUSE-SU-2024:3225-1SUSE-SU-2024:2973-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-52854 updated cvss 5.5

kernel: padata: Fix refcnt handling in padata_free_shell()

  • Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more
    affected: no fix available
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.24% chance of exploitation in the next 30 days, higher than 15% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

  • Linux Linux

Classification

Weakness
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.