hrtimers: Handle CPU state correctly on hotplug
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 ]
CVE-2024-57951
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2024-57951
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "54d0d83a53508d687fd4a225f8aa1f18559562d0",
"lessThan": "95e4f62df23f4df1ce6ef897d44b8e23c260921a",
"versionType": "git"
},
{
"status": "affected",
"version": "7f4c89400d2997939f6971c7981cc780a219e36b",
"lessThan": "14984139f1f2768883332965db566ef26db609e7",
"versionType": "git"
},
{
"status": "affected",
"version": "6fcbcc6c8e52650749692c7613cbe71bf601670d",
"lessThan": "15b453db41d36184cf0ccc21e7df624014ab6a1a",
"versionType": "git"
},
{
"status": "affected",
"version": "75b5016ce325f1ef9c63e5398a1064cf8a7a7354",
"lessThan": "3d41dbf82e10c44e53ea602398ab002baec27e75",
"versionType": "git"
},
{
"status": "affected",
"version": "53f408cad05bb987af860af22f4151e5a18e6ee8",
"lessThan": "a5cbbea145b400e40540c34816d16d36e0374fbc",
"versionType": "git"
},
{
"status": "affected",
"version": "5c0930ccaad5a74d74e8b18b648c5eb21ed2fe94",
"lessThan": "38492f6ee883c7b1d33338bf531a62cff69b4b28",
"versionType": "git"
},
{
"status": "affected",
"version": "5c0930ccaad5a74d74e8b18b648c5eb21ed2fe94",
"lessThan": "2f8dea1692eef2b7ba6a256246ed82c365fdc686",
"versionType": "git"
},
{
"status": "affected",
"version": "9a2fc41acb69dd4e2a58d0c04346c3333c2341fc",
"versionType": "git"
},
{
"status": "affected",
"version": "5.4.264",
"lessThan": "5.4.290",
"versionType": "semver"
},
{
"status": "affected",
"version": "5.10.204",
"lessThan": "5.10.234",
"versionType": "semver"
},
{
"status": "affected",
"version": "5.15.143",
"lessThan": "5.15.177",
"versionType": "semver"
},
{
"status": "affected",
"version": "6.1.68",
"lessThan": "6.1.127",
"versionType": "semver"
},
{
"status": "affected",
"version": "6.6.7",
"lessThan": "6.6.74",
"versionType": "semver"
},
{
"status": "affected",
"version": "4.19.302",
"lessThan": "4.20",
"versionType": "semver"
}
],
"programFiles": [
"include/linux/hrtimer.h",
"kernel/cpu.c",
"kernel/time/hrtimer.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "6.7"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "6.7",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "5.4.290",
"versionType": "semver",
"lessThanOrEqual": "5.4.*"
},
{
"status": "unaffected",
"version": "5.10.234",
"versionType": "semver",
"lessThanOrEqual": "5.10.*"
},
{
"status": "unaffected",
"version": "5.15.177",
"versionType": "semver",
"lessThanOrEqual": "5.15.*"
},
{
"status": "unaffected",
"version": "6.1.127",
"versionType": "semver",
"lessThanOrEqual": "6.1.*"
},
{
"status": "unaffected",
"version": "6.6.74",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.11",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.13",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"include/linux/hrtimer.h",
"kernel/cpu.c",
"kernel/time/hrtimer.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2024-57951
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #26853 · Revision 1
- Added to Heist Feed
- Publisher date