pstore: ram_core: fix incorrect success return when vmap() fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 831b624df1b420c8f9281ed1307a8db23afb72df · < 2c99326dc1c79b7ce3c8dd92929b5ce724ff70eb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pstore: ram_core: fix incorrect success return when vmap() fails
In persistent_ram_vmap(), vmap() may return NULL on failure.
If offset is non-zero, adding offset_in_page(start) causes the function to return a non-NULL pointer even though the mapping failed. persistent_ram_buffer_map() therefore incorrectly returns success.
Subsequent access to prz->buffer may dereference an invalid address and cause crashes.
Add proper NULL checking for vmap() failures.
From the CVE record · Linux
In the Linux kernel’s pstore ram_core, a failed vmap() call can be reported as successful when the offset is non-zero. Later access to the invalid mapping can cause a crash. The input does not establish an attacker path, authentication requirement, or user interaction.
Anyone running a Linux kernel with the affected pstore ram_core code should check their version; affected versions were not provided.