summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorRichard Cheng <icheng@nvidia.com>2026-06-26 18:41:01 +0800
committerDave Jiang <dave.jiang@intel.com>2026-07-14 13:32:03 -0700
commitcde18d6c1d913a67ab0afd3d9475ece4be79da50 (patch)
tree05da8c2cb78bf374776e66faca1c3b8f90e9ac43 /tools/lib/python
parent4bf6bac375076ced2fa4b3fef8739bd985f93456 (diff)
downloadlinux-cde18d6c1d913a67ab0afd3d9475ece4be79da50.tar.gz
linux-cde18d6c1d913a67ab0afd3d9475ece4be79da50.zip
cxl/features: Reject Set Features output buffer smaller than the header
cxlctl_set_feature() sizes its output buffer from the user's fwctl_rpc.out_len but never checks it is large enough to hold even the fwctl_rpc_cxl_out header. With out_len == 0 , kvzalloc() returns ZERO_SIZE_PTR, which passes the !rpc_out check, the subsequent rpc_out->size = 0 then writes through the poison pointer. Reject requests whose output buffer can't hold the response header, before allocating. The Set Feature reply carries no payload, so the header is all that is required. Fixes: eb5dfcb9e36d ("cxl: Add support to handle user feature commands for set feature") Signed-off-by: Richard Cheng <icheng@nvidia.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20260626104102.53892-3-icheng@nvidia.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions