padata: Fix refcnt handling in padata_free_shell()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 07928d9bfc81640bab36f5190e8725894d93b659 · < 7ddc21e317b360c3444de3023bcc83b85fabae2f| No fix yet |
| Linux Linux |
|
|
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(); } ```
From the CVE record · Linux
The Linux kernel’s padata code can access a freed reference count during shell cleanup. The issue was observed under high load on arm64 while running the pcrypt_aead01 test; the input does not identify an attacker path, authentication requirement, or user-interaction requirement.
Engineers running the Linux kernel should check their installations; affected versions are not specified.