CVE-2025-21726
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
27/02/2025
Last modified:
24/03/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
padata: avoid UAF for reorder_work<br />
<br />
Although the previous patch can avoid ps and ps UAF for _do_serial, it<br />
can not avoid potential UAF issue for reorder_work. This issue can<br />
happen just as below:<br />
<br />
crypto_request crypto_request crypto_del_alg<br />
padata_do_serial<br />
...<br />
padata_reorder<br />
// processes all remaining<br />
// requests then breaks<br />
while (1) {<br />
if (!padata)<br />
break;<br />
...<br />
}<br />
<br />
padata_do_serial<br />
// new request added<br />
list_add<br />
// sees the new request<br />
queue_work(reorder_work)<br />
padata_reorder<br />
queue_work_on(squeue->work)<br />
...<br />
<br />
<br />
padata_serial_worker<br />
// completes new request,<br />
// no more outstanding<br />
// requests<br />
<br />
crypto_del_alg<br />
// free pd<br />
<br />
<br />
invoke_padata_reorder<br />
// UAF of pd<br />
<br />
To avoid UAF for &#39;reorder_work&#39;, get &#39;pd&#39; ref before put &#39;reorder_work&#39;<br />
into the &#39;serial_wq&#39; and put &#39;pd&#39; ref until the &#39;serial_wq&#39; finish.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.4.19 (including) | 5.5 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5.3 (including) | 5.10.235 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.79 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.129 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.76 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.13 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.13.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/4c6209efea2208597dbd3e52dc87a0d1a8f2dbe1
- https://git.kernel.org/stable/c/6f45ef616775b0ce7889b0f6077fc8d681ab30bc
- https://git.kernel.org/stable/c/7000507bb0d2ceb545c0a690e0c707c897d102c2
- https://git.kernel.org/stable/c/8ca38d0ca8c3d30dd18d311f1a7ec5cb56972cac
- https://git.kernel.org/stable/c/a54091c24220a4cd847d5b4f36d678edacddbaf0
- https://git.kernel.org/stable/c/dd7d37ccf6b11f3d95e797ebe4e9e886d0332600
- https://git.kernel.org/stable/c/f4f1b1169fc3694f9bc3e28c6c68dbbf4cc744c0