Upstream information

CVE-2021-47209 at MITRE

Description

In the Linux kernel, the following vulnerability has been resolved: sched/fair: Prevent dead task groups from regaining cfs_rq's Kevin is reporting crashes which point to a use-after-free of a cfs_rq in update_blocked_averages(). Initial debugging revealed that we've live cfs_rq's (on_list=1) in an about to be kfree()'d task group in free_fair_sched_group(). However, it was unclear how that can happen. His kernel config happened to lead to a layout of struct sched_entity that put the 'my_q' member directly into the middle of the object which makes it incidentally overlap with SLUB's freelist pointer. That, in combination with SLAB_FREELIST_HARDENED's freelist pointer mangling, leads to a reliable access violation in form of a #GP which made the UAF fail fast. Michal seems to have run into the same issue[1]. He already correctly diagnosed that commit a7b359fc6a37 ("sched/fair: Correctly insert cfs_rq's to list on unthrottle") is causing the preconditions for the UAF to happen by re-adding cfs_rq's also to task groups that have no more running tasks, i.e. also to dead ones. His analysis, however, misses the real root cause and it cannot be seen from the crash backtrace only, as the real offender is tg_unthrottle_up() getting called via sched_cfs_period_timer() via the timer interrupt at an inconvenient time. When unregister_fair_sched_group() unlinks all cfs_rq's from the dying task group, it doesn't protect itself from getting interrupted. If the timer interrupt triggers while we iterate over all CPUs or after unregister_fair_sched_group() has finished but prior to unlinking the task group, sched_cfs_period_timer() will execute and walk the list of task groups, trying to unthrottle cfs_rq's, i.e. re-add them to the dying task group. These will later -- in free_fair_sched_group() -- be kfree()'ed while still being linked, leading to the fireworks Kevin and Michal are seeing. To fix this race, ensure the dying task group gets unlinked first. However, simply switching the order of unregistering and unlinking the task group isn't sufficient, as concurrent RCU walkers might still see it, as can be seen below: CPU1: CPU2: : timer IRQ: : do_sched_cfs_period_timer(): : : : distribute_cfs_runtime(): : rcu_read_lock(); : : : unthrottle_cfs_rq(): sched_offline_group(): : : walk_tg_tree_from(…,tg_unthrottle_up,…): list_del_rcu(&tg->list); : (1) : list_for_each_entry_rcu(child, &parent->children, siblings) : : (2) list_del_rcu(&tg->siblings); : : tg_unthrottle_up(): unregister_fair_sched_group(): struct cfs_rq *cfs_rq = tg->cfs_rq[cpu_of(rq)]; : : list_del_leaf_cfs_rq(tg->cfs_rq[cpu]); : : : : if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running) (3) : list_add_leaf_cfs_rq(cfs_rq); : : : : : : : : : ---truncated---

SUSE information

Overall state of this security issue: Resolved

This issue is currently rated as having moderate severity.

CVSS v3 Scores
  SUSE
Base Score 5.5
Vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Attack Vector Local
Attack Complexity Low
Privileges Required Low
User Interaction None
Scope Unchanged
Confidentiality Impact None
Integrity Impact None
Availability Impact High
CVSSv3 Version 3.1
SUSE Bugzilla entry: 1222796 [NEW]

No SUSE Security Announcements cross referenced.


Status of this issue by product and package

Please note that this evaluation state might be work in progress, incomplete or outdated. Also information for service packs in the LTSS phase is only included for issues meeting the LTSS criteria. If in doubt, feel free to contact us for clarification. The updates are grouped by state of their lifecycle. SUSE product lifecycles are documented on the lifecycle page.

Product(s) Source package State
Products under general support and receiving all security fixes.
SUSE Enterprise Storage 7.1 kernel-default Not affected
SUSE Enterprise Storage 7.1 kernel-source Not affected
SUSE Enterprise Storage 7.1 kernel-source-azure Not affected
SUSE Linux Enterprise Desktop 15 SP5 kernel-default Already fixed
SUSE Linux Enterprise Desktop 15 SP5 kernel-source Already fixed
SUSE Linux Enterprise Desktop 15 SP6 kernel-default Already fixed
SUSE Linux Enterprise Desktop 15 SP6 kernel-source Already fixed
SUSE Linux Enterprise High Performance Computing 12 SP5 kernel-default Not affected
SUSE Linux Enterprise High Performance Computing 12 SP5 kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 12 SP5 kernel-source-azure Not affected
SUSE Linux Enterprise High Performance Computing 15 SP5 kernel-default Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP5 kernel-source Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP5 kernel-source-azure Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP6 kernel-default Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP6 kernel-source Already fixed
SUSE Linux Enterprise Micro 5.1 kernel-default Not affected
SUSE Linux Enterprise Micro 5.1 kernel-rt Not affected
SUSE Linux Enterprise Micro 5.1 kernel-source-rt Not affected
SUSE Linux Enterprise Micro 5.2 kernel-default Not affected
SUSE Linux Enterprise Micro 5.2 kernel-rt Not affected
SUSE Linux Enterprise Micro 5.2 kernel-source-rt Not affected
SUSE Linux Enterprise Micro 5.3 kernel-default Already fixed
SUSE Linux Enterprise Micro 5.3 kernel-rt Already fixed
SUSE Linux Enterprise Micro 5.3 kernel-source-rt Already fixed
SUSE Linux Enterprise Micro 5.4 kernel-default Already fixed
SUSE Linux Enterprise Micro 5.4 kernel-rt Already fixed
SUSE Linux Enterprise Micro 5.4 kernel-source-rt Already fixed
SUSE Linux Enterprise Micro 5.5 kernel-source-rt Already fixed
SUSE Linux Enterprise Module for Basesystem 15 SP5 kernel-default Already fixed
SUSE Linux Enterprise Module for Basesystem 15 SP5 kernel-source Already fixed
SUSE Linux Enterprise Module for Basesystem 15 SP6 kernel-default Already fixed
SUSE Linux Enterprise Module for Basesystem 15 SP6 kernel-source Already fixed
SUSE Linux Enterprise Module for Development Tools 15 SP5 kernel-default Already fixed
SUSE Linux Enterprise Module for Development Tools 15 SP5 kernel-source Already fixed
SUSE Linux Enterprise Module for Development Tools 15 SP6 kernel-default Already fixed
SUSE Linux Enterprise Module for Development Tools 15 SP6 kernel-source Already fixed
SUSE Linux Enterprise Module for Public Cloud 15 SP5 kernel-source-azure Already fixed
SUSE Linux Enterprise Real Time 12 SP5 kernel-source-rt Not affected
SUSE Linux Enterprise Real Time 15 SP5 kernel-source-rt Already fixed
SUSE Linux Enterprise Server 12 SP5 kernel-default Not affected
SUSE Linux Enterprise Server 12 SP5 kernel-source Not affected
SUSE Linux Enterprise Server 12 SP5 kernel-source-azure Not affected
SUSE Linux Enterprise Server 15 SP5 kernel-default Already fixed
SUSE Linux Enterprise Server 15 SP5 kernel-source Already fixed
SUSE Linux Enterprise Server 15 SP5 kernel-source-azure Already fixed
SUSE Linux Enterprise Server 15 SP6 kernel-default Already fixed
SUSE Linux Enterprise Server 15 SP6 kernel-source Already fixed
SUSE Linux Enterprise Server for SAP Applications 12 SP5 kernel-default Not affected
SUSE Linux Enterprise Server for SAP Applications 12 SP5 kernel-source Not affected
SUSE Linux Enterprise Server for SAP Applications 12 SP5 kernel-source-azure Not affected
SUSE Linux Enterprise Server for SAP Applications 15 SP5 kernel-default Already fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP5 kernel-source Already fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP5 kernel-source-azure Already fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP6 kernel-default Already fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP6 kernel-source Already fixed
SUSE Manager Proxy 4.3 kernel-default Already fixed
SUSE Manager Proxy 4.3 kernel-source Already fixed
SUSE Manager Proxy 4.3 kernel-source-azure Already fixed
SUSE Manager Retail Branch Server 4.3 kernel-default Already fixed
SUSE Manager Retail Branch Server 4.3 kernel-source Already fixed
SUSE Manager Retail Branch Server 4.3 kernel-source-azure Already fixed
SUSE Manager Server 4.3 kernel-default Already fixed
SUSE Manager Server 4.3 kernel-source Already fixed
SUSE Manager Server 4.3 kernel-source-azure Already fixed
SUSE Real Time Module 15 SP5 kernel-source-rt Already fixed
Products under Long Term Service Pack support and receiving important and critical security fixes.
SUSE Linux Enterprise Desktop 15 SP4 kernel-source Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP2 kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP2 kernel-source-azure Not affected
SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-default Not affected
SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP3 kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP3 kernel-source-azure Not affected
SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-default Not affected
SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP4 kernel-source Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP4 kernel-source-azure Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-default Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-source Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-default Already fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-source Already fixed
SUSE Linux Enterprise Module for Basesystem 15 SP2 kernel-source Not affected
SUSE Linux Enterprise Module for Basesystem 15 SP3 kernel-source Not affected
SUSE Linux Enterprise Module for Basesystem 15 SP4 kernel-source Already fixed
SUSE Linux Enterprise Module for Development Tools 15 SP2 kernel-source Not affected
SUSE Linux Enterprise Module for Development Tools 15 SP3 kernel-source Not affected
SUSE Linux Enterprise Module for Development Tools 15 SP4 kernel-source Already fixed
SUSE Linux Enterprise Module for Public Cloud 15 SP4 kernel-source-azure Already fixed
SUSE Linux Enterprise Server 11 SP4 LTSS EXTREME CORE kernel-default Not affected
SUSE Linux Enterprise Server 11 SP4 LTSS EXTREME CORE kernel-source Not affected
SUSE Linux Enterprise Server 15 SP2 kernel-source Not affected
SUSE Linux Enterprise Server 15 SP2 kernel-source-azure Not affected
SUSE Linux Enterprise Server 15 SP2-LTSS kernel-default Not affected
SUSE Linux Enterprise Server 15 SP2-LTSS kernel-source Not affected
SUSE Linux Enterprise Server 15 SP3 kernel-source Not affected
SUSE Linux Enterprise Server 15 SP3 kernel-source-azure Not affected
SUSE Linux Enterprise Server 15 SP3-LTSS kernel-default Not affected
SUSE Linux Enterprise Server 15 SP3-LTSS kernel-source Not affected
SUSE Linux Enterprise Server 15 SP4 kernel-source Already fixed
SUSE Linux Enterprise Server 15 SP4 kernel-source-azure Already fixed
SUSE Linux Enterprise Server 15 SP4-LTSS kernel-default Already fixed
SUSE Linux Enterprise Server 15 SP4-LTSS kernel-source Already fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP2 kernel-default Not affected
SUSE Linux Enterprise Server for SAP Applications 15 SP2 kernel-source Not affected
SUSE Linux Enterprise Server for SAP Applications 15 SP2 kernel-source-azure Not affected
SUSE Linux Enterprise Server for SAP Applications 15 SP3 kernel-default Not affected
SUSE Linux Enterprise Server for SAP Applications 15 SP3 kernel-source Not affected
SUSE Linux Enterprise Server for SAP Applications 15 SP3 kernel-source-azure Not affected
SUSE Linux Enterprise Server for SAP Applications 15 SP4 kernel-default Already fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP4 kernel-source Already fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP4 kernel-source-azure Already fixed
SUSE OpenStack Cloud 8 kernel-source Not affected
SUSE OpenStack Cloud 9 kernel-default Not affected
SUSE OpenStack Cloud 9 kernel-source Not affected
Products past their end of life and not receiving proactive updates anymore.
HPE Helion OpenStack 8 kernel-source Not affected
SUSE CaaS Platform 4.0 kernel-source Not affected
SUSE Enterprise Storage 6 kernel-source Not affected
SUSE Enterprise Storage 7 kernel-source Not affected
SUSE Enterprise Storage 7 kernel-source-azure Not affected
SUSE Linux Enterprise Desktop 12 SP2 kernel-source Not affected
SUSE Linux Enterprise Desktop 12 SP3 kernel-source Not affected
SUSE Linux Enterprise Desktop 12 SP4 kernel-source Not affected
SUSE Linux Enterprise Desktop 15 kernel-source Not affected
SUSE Linux Enterprise Desktop 15 SP1 kernel-source Not affected
SUSE Linux Enterprise Desktop 15 SP2 kernel-source Not affected
SUSE Linux Enterprise Desktop 15 SP3 kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP1 kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15-ESPOS kernel-source Not affected
SUSE Linux Enterprise High Performance Computing 15-LTSS kernel-source Not affected
SUSE Linux Enterprise Micro 5.0 kernel-default Not affected
SUSE Linux Enterprise Module for Basesystem 15 kernel-source Not affected
SUSE Linux Enterprise Module for Basesystem 15 SP1 kernel-source Not affected
SUSE Linux Enterprise Module for Development Tools 15 kernel-source Not affected
SUSE Linux Enterprise Module for Development Tools 15 SP1 kernel-source Not affected
SUSE Linux Enterprise Module for Public Cloud 15 SP2 kernel-source-azure Not affected
SUSE Linux Enterprise Module for Public Cloud 15 SP3 kernel-source-azure Not affected
SUSE Linux Enterprise Real Time 15 SP2 kernel-source Not affected
SUSE Linux Enterprise Real Time 15 SP3 kernel-source Not affected
SUSE Linux Enterprise Real Time 15 SP3 kernel-source-rt Not affected
SUSE Linux Enterprise Real Time 15 SP4 kernel-source Already fixed
SUSE Linux Enterprise Real Time 15 SP4 kernel-source-rt Already fixed
SUSE Linux Enterprise Server 11 SP4 kernel-source Not affected
SUSE Linux Enterprise Server 11 SP4 LTSS kernel-default Not affected
SUSE Linux Enterprise Server 11 SP4 LTSS kernel-source Not affected
SUSE Linux Enterprise Server 11 SP4-LTSS kernel-source Not affected
SUSE Linux Enterprise Server 12 SP2 kernel-source Not affected
SUSE Linux Enterprise Server 12 SP2-BCL kernel-source Not affected
SUSE Linux Enterprise Server 12 SP2-ESPOS kernel-source Not affected
SUSE Linux Enterprise Server 12 SP2-LTSS kernel-source Not affected
SUSE Linux Enterprise Server 12 SP3 kernel-source Not affected
SUSE Linux Enterprise Server 12 SP3-BCL kernel-source Not affected
SUSE Linux Enterprise Server 12 SP3-ESPOS kernel-source Not affected
SUSE Linux Enterprise Server 12 SP3-LTSS kernel-source Not affected
SUSE Linux Enterprise Server 12 SP4 kernel-source Not affected
SUSE Linux Enterprise Server 12 SP4-ESPOS kernel-source Not affected
SUSE Linux Enterprise Server 12 SP4-LTSS kernel-default Not affected
SUSE Linux Enterprise Server 12 SP4-LTSS kernel-source Not affected
SUSE Linux Enterprise Server 15 kernel-source Not affected
SUSE Linux Enterprise Server 15 SP1 kernel-source Not affected
SUSE Linux Enterprise Server 15 SP1-BCL kernel-source Not affected
SUSE Linux Enterprise Server 15 SP1-LTSS kernel-default Not affected
SUSE Linux Enterprise Server 15 SP1-LTSS kernel-source Not affected
SUSE Linux Enterprise Server 15 SP2-BCL kernel-source Not affected
SUSE Linux Enterprise Server 15 SP3-BCL kernel-source Not affected
SUSE Linux Enterprise Server 15-LTSS kernel-default Not affected
SUSE Linux Enterprise Server 15-LTSS kernel-source Not affected
SUSE Linux Enterprise Server for Raspberry Pi 12 SP2 kernel-source Not affected
SUSE Linux Enterprise Server for SAP Applications 12 SP2 kernel-source Not affected
SUSE Linux Enterprise Server for SAP Applications 12 SP3 kernel-source Not affected
SUSE Linux Enterprise Server for SAP Applications 12 SP4 kernel-default Not affected
SUSE Linux Enterprise Server for SAP Applications 12 SP4 kernel-source Not affected
SUSE Linux Enterprise Server for SAP Applications 15 kernel-source Not affected
SUSE Linux Enterprise Server for SAP Applications 15 SP1 kernel-source Not affected
SUSE Manager Proxy 4.0 kernel-source Not affected
SUSE Manager Proxy 4.1 kernel-source Not affected
SUSE Manager Proxy 4.1 kernel-source-azure Not affected
SUSE Manager Proxy 4.2 kernel-source Not affected
SUSE Manager Proxy 4.2 kernel-source-azure Not affected
SUSE Manager Retail Branch Server 4.0 kernel-source Not affected
SUSE Manager Retail Branch Server 4.1 kernel-source Not affected
SUSE Manager Retail Branch Server 4.1 kernel-source-azure Not affected
SUSE Manager Retail Branch Server 4.2 kernel-source Not affected
SUSE Manager Retail Branch Server 4.2 kernel-source-azure Not affected
SUSE Manager Server 4.0 kernel-source Not affected
SUSE Manager Server 4.1 kernel-source Not affected
SUSE Manager Server 4.1 kernel-source-azure Not affected
SUSE Manager Server 4.2 kernel-source Not affected
SUSE Manager Server 4.2 kernel-source-azure Not affected
SUSE OpenStack Cloud 7 kernel-source Not affected
SUSE OpenStack Cloud Crowbar 8 kernel-source Not affected
SUSE OpenStack Cloud Crowbar 9 kernel-default Not affected
SUSE OpenStack Cloud Crowbar 9 kernel-source Not affected
SUSE Real Time Module 15 SP3 kernel-source-rt Not affected
SUSE Real Time Module 15 SP4 kernel-source-rt Already fixed


SUSE Timeline for this CVE

CVE page created: Wed Apr 10 22:00:26 2024
CVE page last modified: Mon Apr 29 19:03:44 2024