Skip to main content

CVE-2022-48921: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-48921cvecve-2022-48921
Published: Thu Aug 22 2024 (08/22/2024, 01:32:53 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

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.

AI-Powered Analysis

AILast updated: 06/28/2025, 00:10:59 UTC

Technical Analysis

CVE-2022-48921 is a vulnerability in the Linux kernel's Completely Fair Scheduler (CFS) subsystem, specifically within the reweight_entity() function. The issue arises from a race condition between sched_post_fork() and setpriority(PRIO_PGRP) calls within a thread group. When a main process spawns multiple threads that subsequently call setpriority(PRIO_PGRP, 0, -20), wait, and exit, the Linux kernel's copy_process() function is invoked for each new thread. This function adds a new task_struct and calls sched_post_fork() for the thread. However, due to the race, setpriority(PRIO_PGRP) and set_one_prio() may be called on a thread whose sched_post_fork() has not yet executed, resulting in a null pointer dereference in reweight_entity(). This occurs because reweight_entity() attempts to access the run queue pointer (cfs_rq) which has not been set at that point in the thread's lifecycle. Previously, the cfs_rq pointer was set earlier in sched_fork(), but the fix moved this initialization to sched_post_fork(), which is called later. The patch removes the update_load parameter from update_load() and ensures reweight_task() is only called if the task does not have the TASK_NEW flag set, preventing the null pointer dereference. This vulnerability can lead to a kernel crash (denial of service) due to the null pointer dereference. There are no known exploits in the wild as of the publication date, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a risk primarily of denial-of-service (DoS) conditions on Linux-based systems, which are widely used in servers, cloud infrastructure, and embedded devices. A successful exploitation could cause kernel panics, leading to system crashes and service outages. This can disrupt critical business operations, especially for organizations relying on Linux for web hosting, cloud services, or internal infrastructure. While the vulnerability does not directly enable privilege escalation or data exfiltration, the resulting downtime could impact availability and operational continuity. Additionally, if exploited in multi-tenant environments such as cloud providers or shared hosting, it could affect multiple customers simultaneously. The absence of known exploits reduces immediate risk, but the vulnerability's presence in the Linux kernel means that many European organizations must prioritize patching to avoid potential future exploitation. The impact is heightened in sectors where uptime and service availability are critical, such as finance, healthcare, and telecommunications.

Mitigation Recommendations

European organizations should implement the following specific mitigation steps: 1) Apply the official Linux kernel patches that address CVE-2022-48921 as soon as they become available from their Linux distribution vendors. This is the only definitive fix. 2) For environments where immediate patching is not feasible, consider temporarily restricting or monitoring the use of setpriority(PRIO_PGRP) system calls, especially in automated scripts or applications that spawn multiple threads with priority changes. 3) Employ kernel crash monitoring and alerting to detect any null pointer dereference-induced panics promptly, enabling rapid incident response and system recovery. 4) In cloud or virtualized environments, isolate critical workloads to minimize the blast radius of potential DoS caused by this vulnerability. 5) Maintain up-to-date inventories of Linux kernel versions deployed across the organization to identify and prioritize vulnerable systems. 6) Engage with Linux distribution security advisories and subscribe to relevant threat intelligence feeds to stay informed about exploit developments and patch releases. 7) Conduct thorough testing of kernel updates in staging environments to ensure stability before production deployment, as kernel patches can sometimes introduce regressions.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-08-21T06:06:23.295Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdd56c

Added to database: 5/21/2025, 9:08:48 AM

Last enriched: 6/28/2025, 12:10:59 AM

Last updated: 8/1/2025, 3:06:31 AM

Views: 10

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats