summaryrefslogtreecommitdiff
path: root/scripts/checkstack.pl
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@linux.ibm.com>2026-08-05 13:04:55 +0200
committerClaudio Imbrenda <imbrenda@linux.ibm.com>2026-08-11 10:45:27 +0200
commit4c07680a467e2f7697245bcd11691bffb2a6f0ed (patch)
tree0cb4dacd363fdba97ca3860362a9aba2e235320f /scripts/checkstack.pl
parente7f698b09d4a7c36b299acf680fc50fe868e2bcd (diff)
downloadlinux-4c07680a467e2f7697245bcd11691bffb2a6f0ed.tar.gz
linux-4c07680a467e2f7697245bcd11691bffb2a6f0ed.zip
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. Fixes: 27291e2165b6 ("KVM: s390: hardware support for guest debugging") Cc: stable@vger.kernel.org Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260805110455.7200-9-borntraeger@linux.ibm.com>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions