Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2023-52854— padata: Fix refcnt handling in padata_free_shell()

EPSS 0.01% · P2
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2023-52854

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
padata: Fix refcnt handling in padata_free_shell()
Source: NVD (National Vulnerability Database)
Vulnerability Description
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`.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux Kernel存在安全漏洞,该漏洞源于在高负载的arm64环境中,LTP中的pcrypt_aead01测试可能会导致系统出现释放后重用问题。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux 07928d9bfc81640bab36f5190e8725894d93b659 ~ 41aad9d6953984d134fc50f631f24ef476875d4d -
LinuxLinux 5.6 -

II. Public POCs for CVE-2023-52854

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2023-52854

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-05-21 · 361 CVEs total

CVE-2023-52747IB/hfi1: Restore allocated resources on failed copyout
CVE-2023-52757smb: client: fix potential deadlock when releasing mids
CVE-2023-52755ksmbd: fix slab out of bounds write in smb_inherit_dacl()
CVE-2023-52754media: imon: fix access to invalid resource for the second interface
CVE-2023-52753drm/amd/display: Avoid NULL dereference of timing generator
CVE-2023-52752smb: client: fix use-after-free bug in cifs_debug_data_proc_show()
CVE-2023-52751smb: client: fix use-after-free in smb2_query_info_compound()
CVE-2023-52750arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer
CVE-2023-52749spi: Fix null dereference on suspend
CVE-2023-52748f2fs: avoid format-overflow warning
CVE-2022-48710drm/radeon: fix a possible null pointer dereference
CVE-2021-47432lib/generic-radix-tree.c: Don't overflow in peek()
CVE-2023-52743ice: Do not use WQ_MEM_RECLAIM flag for workqueue
CVE-2023-52737btrfs: lock the inode in shared mode before starting fiemap
CVE-2023-52738drm/amdgpu/fence: Fix oops due to non-matching drm_sched init/fini
CVE-2023-52740powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch
CVE-2023-52739Fix page corruption caused by racy check in __free_pages
CVE-2023-52741cifs: Fix use-after-free in rdata->read_into_pages()
CVE-2023-52744RDMA/irdma: Fix potential NULL-ptr-dereference
CVE-2023-52745IB/IPoIB: Fix legacy IPoIB due to wrong number of queues

Showing top 20 of 361 CVEs. View all on vendor page → →

IV. Related Vulnerabilities

V. Comments for CVE-2023-52854

No comments yet


Leave a comment