Skip to content

Commit d18f63e

Browse files
Benjamin Tissoiresgregkh
authored andcommitted
HID: core: do not bypass hid_hw_raw_request
commit c2ca42f upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 953af3c commit d18f63e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/hid/hid-core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,8 +1986,7 @@ int __hid_request(struct hid_device *hid, struct hid_report *report,
19861986
if (reqtype == HID_REQ_SET_REPORT)
19871987
hid_output_report(report, data_buf);
19881988

1989-
ret = hid->ll_driver->raw_request(hid, report->id, buf, len,
1990-
report->type, reqtype);
1989+
ret = hid_hw_raw_request(hid, report->id, buf, len, report->type, reqtype);
19911990
if (ret < 0) {
19921991
dbg_hid("unable to complete request: %d\n", ret);
19931992
goto out;

0 commit comments

Comments
 (0)