mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
HID: core: do not bypass hid_hw_raw_request
hid_hw_raw_request() is actually useful to ensure the provided buffer and length are valid. Directly calling in the low level transport driver function bypassed those checks and allowed invalid paramto be used. Reported-by: Alan Stern <stern@rowland.harvard.edu> Closes: https://lore.kernel.org/linux-input/c75433e0-9b47-4072-bbe8-b1d14ea97b13@rowland.harvard.edu/ Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250710-report-size-null-v2-3-ccf922b7c4e5@kernel.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
This commit is contained in:
parent
0d0777ccaa
commit
c2ca42f190
1 changed files with 1 additions and 2 deletions
|
|
@ -1996,8 +1996,7 @@ int __hid_request(struct hid_device *hid, struct hid_report *report,
|
|||
if (reqtype == HID_REQ_SET_REPORT)
|
||||
hid_output_report(report, data_buf);
|
||||
|
||||
ret = hid->ll_driver->raw_request(hid, report->id, buf, len,
|
||||
report->type, reqtype);
|
||||
ret = hid_hw_raw_request(hid, report->id, buf, len, report->type, reqtype);
|
||||
if (ret < 0) {
|
||||
dbg_hid("unable to complete request: %d\n", ret);
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue