mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.14 1/9] HID: uhid: Over-ride the default maximum data buffer value with our own
@ 2023-03-20  0:57 Sasha Levin
  2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 2/9] ca8210: fix mac_len negative array access Sasha Levin
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Sasha Levin @ 2023-03-20  0:57 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Lee Jones, Jiri Kosina, Sasha Levin, david.rheinsberg, jikos,
	benjamin.tissoires, linux-input

From: Lee Jones <lee@kernel.org>

[ Upstream commit 1c5d4221240a233df2440fe75c881465cdf8da07 ]

The default maximum data buffer size for this interface is UHID_DATA_MAX
(4k).  When data buffers are being processed, ensure this value is used
when ensuring the sanity, rather than a value between the user provided
value and HID_MAX_BUFFER_SIZE (16k).

Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hid/uhid.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index 333b6a769189c..b7efc5c055be1 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -399,6 +399,7 @@ struct hid_ll_driver uhid_hid_driver = {
 	.parse = uhid_hid_parse,
 	.raw_request = uhid_hid_raw_request,
 	.output_report = uhid_hid_output_report,
+	.max_buffer_size = UHID_DATA_MAX,
 };
 EXPORT_SYMBOL_GPL(uhid_hid_driver);
 
-- 
2.39.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-20  1:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20  0:57 [PATCH AUTOSEL 4.14 1/9] HID: uhid: Over-ride the default maximum data buffer value with our own Sasha Levin
2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 2/9] ca8210: fix mac_len negative array access Sasha Levin
2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 3/9] HID: intel-ish-hid: ipc: Fix potential use-after-free in work function Sasha Levin
2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 4/9] m68k: Only force 030 bus error if PC not in exception table Sasha Levin
2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 5/9] scsi: target: iscsi: Fix an error message in iscsi_check_key() Sasha Levin
2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 6/9] scsi: ufs: core: Add soft dependency on governor_simpleondemand Sasha Levin
2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 7/9] net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990 Sasha Levin
2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 8/9] net: usb: qmi_wwan: add Telit 0x1080 composition Sasha Levin
2023-03-20  0:57 ` [PATCH AUTOSEL 4.14 9/9] sh: sanitize the flags on sigreturn Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®