From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Benjamin Tissoires <bentiss@kernel.org>
Cc: "Jiri Kosina" <jikos@kernel.org>,
"Filipe Laíns" <lains@riseup.net>,
"Bastien Nocera" <hadess@hadess.net>,
"Ping Cheng" <ping.cheng@wacom.com>,
"Jason Gerecke" <jason.gerecke@wacom.com>,
"Viresh Kumar" <vireshk@kernel.org>,
"Johan Hovold" <johan@kernel.org>,
"Alex Elder" <elder@kernel.org>, "Lee Jones" <lee@kernel.org>,
"Icenowy Zheng" <uwu@icenowy.me>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 1/4] HID: pass the buffer size to hid_report_raw_event
Date: Mon, 4 May 2026 14:21:35 +0200 [thread overview]
Message-ID: <2026050426-roping-shrouded-af7e@gregkh> (raw)
In-Reply-To: <20260504-wip-fix-core-v3-1-ce1f11f4968f@kernel.org>
On Mon, May 04, 2026 at 10:47:22AM +0200, Benjamin Tissoires wrote:
> commit 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing
> bogus memset()") enforced the provided data to be at least the size of
> the declared buffer in the report descriptor to prevent a buffer
> overflow. However, we can try to be smarter by providing both the buffer
> size and the data size, meaning that hid_report_raw_event() can make
> better decision whether we should plaining reject the buffer (buffer
> overflow attempt) or if we can safely memset it to 0 and pass it to the
> rest of the stack.
>
> Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
> Cc: stable@vger.kernel.org
> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
next prev parent reply other threads:[~2026-05-04 12:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 8:47 [PATCH v3 0/4] HID: Proper fix for OOM in hid-core Benjamin Tissoires
2026-05-04 8:47 ` [PATCH v3 1/4] HID: pass the buffer size to hid_report_raw_event Benjamin Tissoires
2026-05-04 9:31 ` Johan Hovold
2026-05-04 12:21 ` Greg Kroah-Hartman [this message]
2026-05-04 8:47 ` [PATCH v3 2/4] HID: core: introduce hid_safe_input_report() Benjamin Tissoires
2026-05-04 8:47 ` [PATCH v3 3/4] HID: multitouch: use __free(kfree) to clean up temporary buffers Benjamin Tissoires
2026-05-04 8:47 ` [PATCH v3 4/4] HID: wacom: " Benjamin Tissoires
2026-05-04 23:15 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026050426-roping-shrouded-af7e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bentiss@kernel.org \
--cc=elder@kernel.org \
--cc=greybus-dev@lists.linaro.org \
--cc=hadess@hadess.net \
--cc=jason.gerecke@wacom.com \
--cc=jikos@kernel.org \
--cc=johan@kernel.org \
--cc=lains@riseup.net \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-usb@vger.kernel.org \
--cc=ping.cheng@wacom.com \
--cc=stable@vger.kernel.org \
--cc=uwu@icenowy.me \
--cc=vireshk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox