CVE-2022-48921
kernel: sched/fair: Fix fault in reweight_entity
Overview
Description
In the Linux kernel, the following vulnerability has been resolved:
sched/fair: Fix fault in reweight_entity
Syzbot found a GPF in reweight_entity. This has been bisected to
commit 4ef0c5c6b5ba ("kernel/sched: Fix sched_fork() access an invalid
sched_task_group")
There is a race between sched_post_fork() and setpriority(PRIO_PGRP)
within a thread group that causes a null-ptr-deref in
reweight_entity() in CFS. The scenario is that the main process spawns
number of new threads, which then call setpriority(PRIO_PGRP, 0, -20),
wait, and exit. For each of the new threads the copy_process() gets
invoked, which adds the new task_struct and calls sched_post_fork()
for it.
In the above scenario there is a possibility that
setpriority(PRIO_PGRP) and set_one_prio() will be called for a thread
in the group that is just being created by copy_process(), and for
which the sched_post_fork() has not been executed yet. This will
trigger a null pointer dereference in reweight_entity(), as it will
try to access the run queue pointer, which hasn't been set.
Before the mentioned change the cfs_rq pointer for the task has been
set in sched_fork(), which is called much earlier in copy_process(),
before the new task is added to the thread_group. Now it is done in
the sched_post_fork(), which is called after that. To fix the issue
the remove the update_load param from the update_load param() function
and call reweight_task() only if the task flag doesn't have the
TASK_NEW flag set.
Source: OX vulnerability database
Severity
4.7 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-362
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 36 fixes
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.46-2.ph4 |
Red Hat 2 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | bpftool +25 | eol | — |
| 9 | kernel-rt +20 | affected | — |
| 9 | bpftool +25 | 0:5.14.0-162.6.1.el9_1 | RHSA-2022:8267 |
SUSE Linux Enterprise 2 releases · 8 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | kernel-livepatch-5-14-21-150400-24-133-default | 1-150400.9.3.2 | SUSE-SU-2024:3408-1 |
| 15.4 | kernel-docs +1 | 5.14.21-150400.24.133.1 | SUSE-SU-2024:3408-1 |
| 15.4 | cluster-md-kmp-default +15 | 5.14.21-150400.24.133.2 | SUSE-SU-2024:3408-1 |
| 15.4 | kernel-default-base | 5.14.21-150400.24.133.2.150400.24.64.5 | SUSE-SU-2024:3408-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-13-67-rt | 1-150500.11.3.2 | SUSE-SU-2024:3209-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-55-80-default | 1-150500.11.3.2 | SUSE-SU-2024:3483-1 |
4 more rows
SUSE Linux Enterprise Micro 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.3 | kernel-rt +1 | 5.14.21-150400.15.91.3 | SUSE-SU-2024:3227-1 |
| 5.3 | kernel-default | 5.14.21-150400.24.133.2 | SUSE-SU-2024:3408-1 |
| 5.3 | kernel-default-base | 5.14.21-150400.24.133.2.150400.24.64.5 | SUSE-SU-2024:3408-1 |
| 5.4 | kernel-rt +1 | 5.14.21-150400.15.91.3 | SUSE-SU-2024:3227-1 |
| 5.4 | kernel-default | 5.14.21-150400.24.133.2 | SUSE-SU-2024:3408-1 |
| 5.4 | kernel-default-base | 5.14.21-150400.24.133.2.150400.24.64.5 | SUSE-SU-2024:3408-1 |
3 more rows
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.140-1 |
| 12 | linux | 5.16.14-1 |
| 13 | linux | 5.16.14-1 |
| 14 | linux | 5.16.14-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 5.16.14-1 |
openSUSE Leap Micro 1 release · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.5 | kernel-rt | 5.14.21-150500.13.67.3 | SUSE-SU-2024:3209-1 |
| 5.5 | kernel-default | 5.14.21-150500.55.80.2 | SUSE-SU-2024:3483-1 |
| 5.5 | kernel-default-base | 5.14.21-150500.55.80.2.150500.6.35.6 | SUSE-SU-2024:3483-1 |
root.io debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-linux | 5.10.140-1 |
| 12 | rootio-linux | 5.16.14-1 |
| 13 | rootio-linux | 5.16.14-1 |
ubuntu 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 20.04 | linux-intel-iotg-5-15 | 5.15.0-1008.11~20.04.1 |
| 20.04-ESM | linux-intel-iotg-5-15 | 5.15.0-1008.11~20.04.1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2022-48921
- git.kernel.org https://git.kernel.org/linus/13765de8148f71fa795e0a6607de37c49ea5915a (5.17-rc4)
- git.kernel.org https://git.kernel.org/stable/c/13765de8148f71fa795e0a6607de37c49ea5915a
- git.kernel.org https://git.kernel.org/stable/c/589a954daab5e18399860b6c8ffaeaf79844eb20
- git.kernel.org https://git.kernel.org/stable/c/8f317cd888059c59e2fa924bf4b0957cfa53f78e
- git.kernel.org https://git.kernel.org/stable/c/e0bcd6b5779352aed88f2e538a82a39f1a7715bb
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2024082218-CVE-2022-48921-5016@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2022-48921
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2022-48921
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.