KVM: s390: Fix length check __import_wp_info()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 27291e2165b6de70c476b7b675308113edd69a60 · < beb9c55af609c4c7308259d7191688c75a4e3d4a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: s390: Fix length check __import_wp_info()
struct kvm_hw_breakpoint::len is a __u64 that is fully controlled by user space. This is then assigned to wp_info->len, which is an int. The bounds check is done on the truncated value while the allocation uses the untruncated one:
wp_info->len = bp_data->len; [...] if (wp_info->len < 0 || wp_info->len > MAX_WP_SIZE) return -EINVAL;
wp_info->old_data = kmalloc(bp_data->len, GFP_KERNEL_ACCOUNT);
Use the validated value for the allocation as intended. Without this fix userspace can trigger >4GB allocations which will fail and result in a WARN due to MAX_PAGE_ORDER.
From the CVE record · Linux
KVM on s390 checks a truncated watchpoint length but uses the original user-controlled length for allocation. Local userspace can request an allocation larger than 4 GB, causing it to fail and produce a kernel warning.
Engineers running the Linux kernel with KVM on s390 should check their systems; affected versions were not specified.