fs/proc/task_mmu: prevent integer overflow in pagemap_scan_get_args()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fs/proc/task_mmu: prevent integer overflow in pagemap_scan_get_args()
The "arg->vec_len" variable is a u64 that comes from the user at the start of the function. The "arg->vec_len * sizeof(struct page_region))" multiplication can lead to integer wrapping. Use size_mul() to avoid that.
Also the size_add/mul() functions work on unsigned long so for 32bit systems we need to ensure that "arg->vec_len" fits in an unsigned long.
From the CVE record · Linux
The Linux kernel's pagemap_scan_get_args() can overflow when multiplying a user-supplied vector length by the size of a page region. A local user who supplies a sufficiently large value can trigger integer wrapping; the input does not specify authentication requirements or user interaction beyond supplying the value.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions are not specified.