pstore/ram: Fix crash when setting number of cpus to an odd number
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ de83209249d64bad993f25d3ea4bba57683e2e2e · < 0593cfd321df9001142a9d2c58d4144917dff7ee| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pstore/ram: Fix crash when setting number of cpus to an odd number
When the number of cpu cores is adjusted to 7 or other odd numbers, the zone size will become an odd number. The address of the zone will become: addr of zone0 = BASE addr of zone1 = BASE + zone_size addr of zone2 = BASE + zone_size*2 ... The address of zone1/3/5/7 will be mapped to non-alignment va. Eventually crashes will occur when accessing these va.
So, use ALIGN_DOWN() to make sure the zone size is even to avoid this bug.
From the CVE record · Linux
The Linux kernel's pstore/ram code can map some zones to unaligned addresses when the CPU count is set to 7 or another odd number. Accessing those addresses can crash the kernel. The input does not specify whether an attacker can trigger this or what access would be required.
Engineers running Linux kernels with pstore/ram should check their versions; affected versions are not specified.