{"id":"CVE-2022-48921","summary":"sched/fair: Fix fault in reweight_entity","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nsched/fair: Fix fault in reweight_entity\n\nSyzbot found a GPF in reweight_entity. This has been bisected to\ncommit 4ef0c5c6b5ba (\"kernel/sched: Fix sched_fork() access an invalid\nsched_task_group\")\n\nThere is a race between sched_post_fork() and setpriority(PRIO_PGRP)\nwithin a thread group that causes a null-ptr-deref in\nreweight_entity() in CFS. The scenario is that the main process spawns\nnumber of new threads, which then call setpriority(PRIO_PGRP, 0, -20),\nwait, and exit.  For each of the new threads the copy_process() gets\ninvoked, which adds the new task_struct and calls sched_post_fork()\nfor it.\n\nIn the above scenario there is a possibility that\nsetpriority(PRIO_PGRP) and set_one_prio() will be called for a thread\nin the group that is just being created by copy_process(), and for\nwhich the sched_post_fork() has not been executed yet. This will\ntrigger a null pointer dereference in reweight_entity(), as it will\ntry to access the run queue pointer, which hasn't been set.\n\nBefore the mentioned change the cfs_rq pointer for the task  has been\nset in sched_fork(), which is called much earlier in copy_process(),\nbefore the new task is added to the thread_group.  Now it is done in\nthe sched_post_fork(), which is called after that.  To fix the issue\nthe remove the update_load param from the update_load param() function\nand call reweight_task() only if the task flag doesn't have the\nTASK_NEW flag set.","modified":"2026-11-13T04:00:23.703313895Z","published":"2024-08-22T01:32:53.131Z","related":["SUSE-SU-2024:3190-1","SUSE-SU-2024:3209-1","SUSE-SU-2024:3227-1","SUSE-SU-2024:3408-1","SUSE-SU-2024:3483-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48921.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/13765de8148f71fa795e0a6607de37c49ea5915a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/589a954daab5e18399860b6c8ffaeaf79844eb20"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8f317cd888059c59e2fa924bf4b0957cfa53f78e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e0bcd6b5779352aed88f2e538a82a39f1a7715bb"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48921.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-48921"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"c85c6fadbef0a3eab41540ea628fa8fe8928c820"},{"fixed":"8f317cd888059c59e2fa924bf4b0957cfa53f78e"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3869eecf050416a1d19bac60926f6b5d64b0aa58"},{"fixed":"e0bcd6b5779352aed88f2e538a82a39f1a7715bb"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"4ef0c5c6b5ba1f38f0ea1cedad0cad722f00c14a"},{"fixed":"589a954daab5e18399860b6c8ffaeaf79844eb20"},{"fixed":"13765de8148f71fa795e0a6607de37c49ea5915a"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.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/osv-test-cve-osv-conversion/osv-output/CVE-2022-48921.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.10.80"},{"fixed":"5.10.137"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.14.19"},{"fixed":"5.15"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.15.3"},{"fixed":"5.15.27"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.16.13"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48921.json"}}],"schema_version":"1.9.2"}