summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorMichael Bommarito <michael.bommarito@gmail.com>2026-06-22 08:47:50 -0400
committerJohannes Berg <johannes.berg@intel.com>2026-09-24 16:45:24 +0200
commite6d11b42861a469a66b1576f7dade053343cfd03 (patch)
tree29b1ce068758833397e4f3cb86af311fbd624275 /tools/perf/scripts/python/bin/stackcollapse-report
parentf52ce761b503c3284833a890be551cfaa6010b6f (diff)
um: virtio_uml: fix heap overflow in vhost_user_get_config()
vhost_user_get_config() sizes its reply buffer from header + payload: size_t payload_size = sizeof(msg->payload.config) + cfg_size; size_t msg_size = sizeof(msg->header) + payload_size; ... msg = kzalloc(msg_size, GFP_KERNEL); but then receives the response with msg_size as the payload cap: rc = vhost_user_recv_resp(vu_dev, msg, msg_size); vhost_user_recv() reads the header, then full_read()s header.size bytes into &msg->payload after checking only "size > max_payload_size". The payload area is msg_size - sizeof(msg->header) == payload_size bytes, so passing msg_size as the cap lets a peer set header.size up to msg_size and write sizeof(struct vhost_user_msg_header) (12) bytes past the end of the kzalloc(msg_size) buffer -- a slab out-of-bounds write of peer-controlled content. Pass payload_size, which is the size the payload area was allocated for. A malicious or compromised vhost-user backend triggers this during device probe (vu_get -> vhost_user_get_config) with no guest action, which matters in the confidential-computing model where the guest does not trust the device backend. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com> Reviewed-by: Richard Weinberger <richard@nod.at> Link: https://patch.msgid.link/20260622124750.1694957-1-michael.bommarito@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions