Skip to content
Heist/ feed
Back to feed
UnratedFix available

sched/fair: Fix fault in reweight_entity

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.137, 5.15.27, 5.16.13
CVEs
CVE-2022-48921
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 03:11 UTC · Revision 1

Source evidence

sched/fair: Fix fault in reweight_entity

core-osv · Original source

Published 22 Aug 2024, 01:32 UTC

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.

osv:CVE-2022-48921

Kernel

Fixed versions: 5.10.137, 5.15.27, 5.16.13

Complete source record
{
  "id": "4ce054053e5684f624dcbd061fba2741e536f803d21c197fabe4f484fda31bcd",
  "url": "https://osv.dev/vulnerability/CVE-2022-48921",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "sched/fair: Fix fault in reweight_entity",
    "summary": "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.",
    "evidence": "osv:CVE-2022-48921",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.137",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.27",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.16.13",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-48921",
      "aliases": [
        "CVE-2022-48921"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c85c6fadbef0a3eab41540ea628fa8fe8928c820"
                },
                {
                  "fixed": "8f317cd888059c59e2fa924bf4b0957cfa53f78e"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3869eecf050416a1d19bac60926f6b5d64b0aa58"
                },
                {
                  "fixed": "e0bcd6b5779352aed88f2e538a82a39f1a7715bb"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "4ef0c5c6b5ba1f38f0ea1cedad0cad722f00c14a"
                },
                {
                  "fixed": "589a954daab5e18399860b6c8ffaeaf79844eb20"
                },
                {
                  "fixed": "13765de8148f71fa795e0a6607de37c49ea5915a"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.10.80"
                },
                {
                  "fixed": "5.10.137"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.15.3"
                },
                {
                  "fixed": "5.15.27"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.14.19"
                },
                {
                  "fixed": "5.15"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "25d40b828fb855ee62e1039c65a666c9afd60786"
                }
              ]
            }
          ],
          "versions": [
            "v5.10.136",
            "v5.10.135",
            "v5.10.134",
            "v5.10.133",
            "v5.10.132",
            "v5.10.131",
            "v5.10.130",
            "v5.10.129",
            "v5.10.128",
            "v5.10.127",
            "v5.10.126",
            "v5.10.125",
            "v5.10.124",
            "v5.10.123",
            "v5.10.122",
            "v5.10.121",
            "v5.10.120",
            "v5.10.119",
            "v5.10.118",
            "v5.10.117",
            "v5.10.116",
            "v5.10.115",
            "v5.10.114",
            "v5.10.113",
            "v5.10.112",
            "v5.10.111",
            "v5.10.110",
            "v5.10.109",
            "v5.10.108",
            "v5.10.107",
            "v5.10.106",
            "v5.10.105",
            "v5.10.104",
            "v5.10.103",
            "v5.10.102",
            "v5.10.101",
            "v5.10.100",
            "v5.10.99",
            "v5.10.98",
            "v5.10.97",
            "v5.10.96",
            "v5.10.95",
            "v5.10.94",
            "v5.10.93",
            "v5.10.92",
            "v5.10.91",
            "v5.10.90",
            "v5.10.89",
            "v5.10.88",
            "v5.10.87",
            "v5.10.86",
            "v5.10.85",
            "v5.10.84",
            "v5.10.83",
            "v5.10.82",
            "v5.10.81",
            "v5.10.80",
            "v5.15.26",
            "v5.15.25",
            "v5.15.24",
            "v5.15.23",
            "v5.15.22",
            "v5.15.21",
            "v5.15.20",
            "v5.15.19",
            "v5.15.18",
            "v5.15.17",
            "v5.15.16",
            "v5.15.15",
            "v5.15.14",
            "v5.15.13",
            "v5.15.12",
            "v5.15.11",
            "v5.15.10",
            "v5.15.9",
            "v5.15.8",
            "v5.15.7",
            "v5.15.6",
            "v5.15.5",
            "v5.15.4",
            "v5.15.3",
            "v5.14.21",
            "v5.14.20",
            "v5.14.19"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48921.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.10.137"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.27"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.16.13"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48921.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.533864971Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/13765de8148f71fa795e0a6607de37c49ea5915a",
        "https://git.kernel.org/stable/c/589a954daab5e18399860b6c8ffaeaf79844eb20",
        "https://git.kernel.org/stable/c/8f317cd888059c59e2fa924bf4b0957cfa53f78e",
        "https://git.kernel.org/stable/c/e0bcd6b5779352aed88f2e538a82a39f1a7715bb",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48921.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-48921",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48921.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-48921",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 514476,
  "published_at": "2024-08-22T01:32:53.131+00:00"
}