CVE-2024-57951

Updated on 12 Feb 2025

Severity

7.8 High severity

Details

CVSS score
7.8
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Overview

About vulnerability

In the Linux kernel, the following vulnerability has been resolved:

hrtimers: Handle CPU state correctly on hotplug

Consider a scenario where a CPU transitions from CPUHP_ONLINE to halfway through a CPU hotunplug down to CPUHP_HRTIMERS_PREPARE, and then back to CPUHP_ONLINE:

Since hrtimers_prepare_cpu() does not run, cpu_base.hres_active remains set to 1 throughout. However, during a CPU unplug operation, the tick and the clockevents are shut down at CPUHP_AP_TICK_DYING. On return to the online state, for instance CFS incorrectly assumes that the hrtick is already active, and the chance of the clockevent device to transition to oneshot mode is also lost forever for the CPU, unless it goes back to a lower state than CPUHP_HRTIMERS_PREPARE once.

This round-trip reveals another issue; cpu_base.online is not set to 1 after the transition, which appears as a WARN_ON_ONCE in enqueue_hrtimer().

Aside of that, the bulk of the per CPU state is not reset either, which means there are dangling pointers in the worst case.

Address this by adding a corresponding startup() callback, which resets the stale per CPU state and sets the online flag.

[ tglx: Make the new callback unconditionally available, remove the online modification in the prepare() callback and clear the remaining state in the starting callback instead of the prepare callback ]

Details

Affected product:
Ubuntu 16.04 ELS , Ubuntu 18.04 ELS
Affected packages:
linux @ 4.4.0 (+1 more)

Fixes

KernelCare state

Live-patch status from KernelCare for each operating system.

Operating system Status Covered kernels
Amazon Linux 2023 Planned
Amazon Linux 2 5.4 Will Not Fix
Debian 11 Released
8 kernels
  • 5.10.205-2
  • 5.10.205-1
  • 5.10.209-2
  • 5.10.216-1
  • 5.10.218-1
  • 5.10.221-1
  • 5.10.223-1
  • 5.10.226-1
Debian 11 cloud Released
7 kernels
  • 5.10.205-2
  • 5.10.209-2
  • 5.10.216-1
  • 5.10.218-1
  • 5.10.221-1
  • 5.10.223-1
  • 5.10.226-1
Proxmox VE 7 5.15 Released
5 kernels
  • 5.15.143-1-pve-5.15.143-1
  • 5.15.149-1-pve-5.15.149-1
  • 5.15.152-1-pve-5.15.152-1
  • 5.15.158-1-pve_5.15.158-1
  • 5.15.158-2-pve_5.15.158-2
Ubuntu 18.04 AWS Focal Will Not Fix
Ubuntu 20.04 Released
20 kernels
  • 5.4.0-173.191
  • 5.4.0-174.193
  • 5.4.0-176.196
  • 5.4.0-177.197
  • 5.4.0-181.201
  • 5.4.0-182.202
  • 5.4.0-186.206
  • 5.4.0-187.207
  • 5.4.0-189.209
  • 5.4.0-190.210
  • 5.4.0-192.212
  • 5.4.0-193.213
  • 5.4.0-195.215
  • 5.4.0-196.216
  • 5.4.0-198.218
  • 5.4.0-200.220
  • 5.4.0-202.222
  • 5.4.0-204.224
  • 5.4.0-205.225
  • 5.4.0-208.228
Ubuntu 20.04 AWS Released
20 kernels
  • 5.4.0-1120.130
  • 5.4.0-1121.131
  • 5.4.0-1122.132
  • 5.4.0-1123.133
  • 5.4.0-1124.134
  • 5.4.0-1125.135
  • 5.4.0-1126.136
  • 5.4.0-1127.137
  • 5.4.0-1128.138
  • 5.4.0-1129.139
  • 5.4.0-1130.140
  • 5.4.0-1131.141
  • 5.4.0-1132.142
  • 5.4.0-1133.143
  • 5.4.0-1134.144
  • 5.4.0-1135.145
  • 5.4.0-1136.146
  • 5.4.0-1137.147
  • 5.4.0-1139.149
  • 5.4.0-1140.150
Ubuntu 20.04 Azure Released
18 kernels
  • 5.4.0-1126.133
  • 5.4.0-1127.134
  • 5.4.0-1128.135
  • 5.4.0-1129.136
  • 5.4.0-1130.137
  • 5.4.0-1131.138
  • 5.4.0-1132.139
  • 5.4.0-1133.140
  • 5.4.0-1134.141
  • 5.4.0-1135.142
  • 5.4.0-1136.143
  • 5.4.0-1137.144
  • 5.4.0-1138.145
  • 5.4.0-1139.146
  • 5.4.0-1140.147
  • 5.4.0-1142.149
  • 5.4.0-1143.150
  • 5.4.0-1145.152
Ubuntu 20.04 GCP Released
20 kernels
  • 5.4.0-1124.133
  • 5.4.0-1125.134
  • 5.4.0-1126.135
  • 5.4.0-1127.136
  • 5.4.0-1128.137
  • 5.4.0-1129.138
  • 5.4.0-1130.139
  • 5.4.0-1131.140
  • 5.4.0-1132.141
  • 5.4.0-1133.142
  • 5.4.0-1134.143
  • 5.4.0-1135.144
  • 5.4.0-1136.145
  • 5.4.0-1137.146
  • 5.4.0-1138.147
  • 5.4.0-1139.148
  • 5.4.0-1140.149
  • 5.4.0-1141.150
  • 5.4.0-1142.151
  • 5.4.0-1143.152
Ubuntu 20.04 HWE AWS Released
18 kernels
  • 5.15.0-1056.61~20.04.1
  • 5.15.0-1057.63~20.04.1
  • 5.15.0-1058.64~20.04.1
  • 5.15.0-1061.67~20.04.1
  • 5.15.0-1062.68~20.04.1
  • 5.15.0-1063.69~20.04.1
  • 5.15.0-1064.70~20.04.1
  • 5.15.0-1065.71~20.04.1
  • 5.15.0-1066.72~20.04.1
  • 5.15.0-1067.73~20.04.1
  • 5.15.0-1068.74~20.04.1
  • 5.15.0-1069.75~20.04.1
  • 5.15.0-1070.76~20.04.1
  • 5.15.0-1071.77~20.04.1
  • 5.15.0-1072.78~20.04.1
  • 5.15.0-1073.79~20.04.1
  • 5.15.0-1075.82~20.04.1
  • 5.15.0-1077.84~20.04.1
Ubuntu 20.04 HWE Azure Released
19 kernels
  • 5.15.0-1058.66~20.04.2
  • 5.15.0-1059.67~20.04.1
  • 5.15.0-1060.69~20.04.1
  • 5.15.0-1061.70~20.04.1
  • 5.15.0-1063.72~20.04.1
  • 5.15.0-1064.73~20.04.1
  • 5.15.0-1067.76~20.04.1
  • 5.15.0-1068.77~20.04.1
  • 5.15.0-1065.74~20.04.1
  • 5.15.0-1070.79~20.04.1
  • 5.15.0-1071.80~20.04.1
  • 5.15.0-1072.81~20.04.1
  • 5.15.0-1073.82~20.04.1
  • 5.15.0-1074.83~20.04.1
  • 5.15.0-1075.84~20.04.1
  • 5.15.0-1078.87~20.04.1
  • 5.15.0-1079.88~20.04.1
  • 5.15.0-1081.90~20.04.1
  • 5.15.0-1082.91~20.04.1
Ubuntu 22.04 Released
23 kernels
  • 5.15.0-100.110
  • 5.15.0-101.111
  • 5.15.0-102.112
  • 5.15.0-105.115
  • 5.15.0-106.116
  • 5.15.0-107.117
  • 5.15.0-112.122
  • 5.15.0-113.123
  • 5.15.0-116.126
  • 5.15.0-117.127
  • 5.15.0-118.128
  • 5.15.0-119.129
  • 5.15.0-121.131
  • 5.15.0-122.132
  • 5.15.0-124.134
  • 5.15.0-125.135
  • 5.15.0-127.137
  • 5.15.0-130.140
  • 5.15.0-126.136
  • 5.15.0-131.141
  • 5.15.0-128.138
  • 5.15.0-133.144
  • 5.15.0-134.145
Ubuntu 22.04 AWS Released
19 kernels
  • 5.15.0-1056.61
  • 5.15.0-1057.63
  • 5.15.0-1060.66
  • 5.15.0-1061.67
  • 5.15.0-1062.68
  • 5.15.0-1063.69
  • 5.15.0-1064.70
  • 5.15.0-1065.71
  • 5.15.0-1066.72
  • 5.15.0-1067.73
  • 5.15.0-1068.74
  • 5.15.0-1069.75
  • 5.15.0-1070.76
  • 5.15.0-1071.77
  • 5.15.0-1072.78
  • 5.15.0-1073.79
  • 5.15.0-1076.83
  • 5.15.0-1078.85
  • 5.15.0-1079.86
Ubuntu 22.04 Azure Released
19 kernels
  • 5.15.0-1058.66
  • 5.15.0-1059.67
  • 5.15.0-1060.69
  • 5.15.0-1061.70
  • 5.15.0-1063.72
  • 5.15.0-1064.73
  • 5.15.0-1066.75
  • 5.15.0-1067.76
  • 5.15.0-1068.77
  • 5.15.0-1070.79
  • 5.15.0-1071.80
  • 5.15.0-1072.81
  • 5.15.0-1073.82
  • 5.15.0-1074.83
  • 5.15.0-1075.84
  • 5.15.0-1078.87
  • 5.15.0-1079.88
  • 5.15.0-1081.90
  • 5.15.0-1082.91
Ubuntu 24.04 Released
23 kernels
  • 6.8.0-35.35
  • 6.8.0-38.38
  • 6.8.0-36.36
  • 6.8.0-39.39
  • 6.8.0-40.40
  • 6.8.0-41.41
  • 6.8.0-44.44
  • 6.8.0-45.45
  • 6.8.0-31.31
  • 6.8.0-47.47
  • 6.8.0-48.48
  • 6.8.0-49.49
  • 6.8.0-50.51
  • 6.8.0-51.52
  • 6.8.0-52.53
  • 6.8.0-54.56
  • 6.8.0-55.57
  • 6.8.0-53.55
  • 6.8.0-56.58
  • 6.8.0-57.59
  • 6.8.0-58.60
  • 6.8.0-59.61
  • 6.8.0-60.63
Ubuntu 24.04 AWS Planned