On středa 15. dubna 2026 1:00:17, středoevropský letní čas Anj Duvnjak wrote: > Commit 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus > memset()") replaced the silent memset() with hid_warn_ratelimited(), which > causes dmesg flooding on devices that legitimately send short reports, > such as the APC UPS (051D:0002). > > Downgrade to hid_dbg_ratelimited() to restore the previous behaviour of > only reporting under HID_DEBUG, while preserving the security fix of > removing the bogus memset() and keeping rate limiting in place. > > Fixes: 0a3fe972a7cb14 ("HID: core: Mitigate potential OOB by removing bogus memset()") > Reported-by: Anj Duvnjak > Link: https://lore.kernel.org/linux-input/MW5PR84MB135613E7947113897DD9FDA4C7272@MW5PR84MB1356.NAMPRD84.PROD.OUTLOOK.COM/ > Reported-by: Oleksandr Natalenko > Link: https://lore.kernel.org/linux-input/6256259.lOV4Wx5bFT@natalenko.name/ > Signed-off-by: Anj Duvnjak > --- > drivers/hid/hid-core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c > index 833df14ef68f..f30091509517 100644 > --- a/drivers/hid/hid-core.c > +++ b/drivers/hid/hid-core.c > @@ -2057,8 +2057,8 @@ int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 * > rsize = max_buffer_size; > > if (csize < rsize) { > - hid_warn_ratelimited(hid, "Event data for report %d was too short (%d vs %d)\n", > - report->id, rsize, csize); > + hid_dbg_ratelimited(hid, "Event data for report %d was too short (%d vs %d)\n", > + report->id, rsize, csize); > ret = -EINVAL; > goto out; > } > LGTM, although I'm not sure what plans do maintainers have on this. Replacing hid_warn_ratelimited() with hid_dbg_ratelimited() works for me personally, so given that, Reviewed-by: Oleksandr Natalenko Thank you. -- Oleksandr Natalenko, MSE