CVE-2025-21919
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
01/04/2025
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
sched/fair: Fix potential memory corruption in child_cfs_rq_on_list<br />
<br />
child_cfs_rq_on_list attempts to convert a &#39;prev&#39; pointer to a cfs_rq.<br />
This &#39;prev&#39; pointer can originate from struct rq&#39;s leaf_cfs_rq_list,<br />
making the conversion invalid and potentially leading to memory<br />
corruption. Depending on the relative positions of leaf_cfs_rq_list and<br />
the task group (tg) pointer within the struct, this can cause a memory<br />
fault or access garbage data.<br />
<br />
The issue arises in list_add_leaf_cfs_rq, where both<br />
cfs_rq->leaf_cfs_rq_list and rq->leaf_cfs_rq_list are added to the same<br />
leaf list. Also, rq->tmp_alone_branch can be set to rq->leaf_cfs_rq_list.<br />
<br />
This adds a check `if (prev == &rq->leaf_cfs_rq_list)` after the main<br />
conditional in child_cfs_rq_on_list. This ensures that the container_of<br />
operation will convert a correct cfs_rq struct.<br />
<br />
This check is sufficient because only cfs_rqs on the same CPU are added<br />
to the list, so verifying the &#39;prev&#39; pointer against the current rq&#39;s list<br />
head is enough.<br />
<br />
Fixes a potential memory corruption issue that due to current struct<br />
layout might not be manifesting as a crash but could lead to unpredictable<br />
behavior when the layout changes.
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.13 (including) | 5.15.179 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.131 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.83 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.19 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.13.7 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.14:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.14:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.14:rc5:*:*:*:*:*:* |
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/000c9ee43928f2ce68a156dd40bab7616256f4dd
- https://git.kernel.org/stable/c/3b4035ddbfc8e4521f85569998a7569668cccf51
- https://git.kernel.org/stable/c/5cb300dcdd27e6a351ac02541e0231261c775852
- https://git.kernel.org/stable/c/9cc7f0018609f75a349e42e3aebc3b0e905ba775
- https://git.kernel.org/stable/c/b5741e4b9ef3567613b2351384f91d3f16e59986
- https://git.kernel.org/stable/c/e1dd09df30ba86716cb2ffab97dc35195c01eb8f
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html



