From: Andrej Shadura <andrew.shadura@collabora.co.uk>
To: "Jiří Kosina" <jikos@kernel.org>
Cc: linux-input@vger.kernel.org, linux-usb@vger.kernel.org,
kernel@collabora.com,
Benjamin Tissoires <benjamin.tissoires@gmail.com>
Subject: Re: [PATCH] HID: u2fzero: ignore incomplete packets without data
Date: Thu, 16 Sep 2021 18:48:55 +0100 [thread overview]
Message-ID: <443b3e33-c9f3-09f7-b112-79559a5ff36f@collabora.co.uk> (raw)
In-Reply-To: <20210916163311.11968-1-andrew.shadura@collabora.co.uk>
Hi again,
On 16/09/2021 17:33, Andrej Shadura wrote:
> Since the actual_length calculation is performed unsigned, packets
> shorter than 7 bytes (e.g. packets without data or otherwise truncated)
> or non-received packets ("zero" bytes) can cause buffer overflow.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=214437
> Fixes: 42337b9d4d958("HID: add driver for U2F Zero built-in LED and RNG")
> Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
Having sent the email I realised I forgot to describe the actual
situation when I ran into this bug. It happened after I inserted and
removed the device multiple times very quickly. I know it’s not
extremely reliable way to reproduce it, and it rarely happened to me
before for some reason, but on the current kernel (5.11.0) I was able to
cause the crash every time I tried.
--
Cheers,
Andrej
next prev parent reply other threads:[~2021-09-16 18:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 16:33 [PATCH] HID: u2fzero: ignore incomplete packets without data Andrej Shadura
2021-09-16 17:48 ` Andrej Shadura [this message]
2021-09-22 7:31 ` Jiri Kosina
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=443b3e33-c9f3-09f7-b112-79559a5ff36f@collabora.co.uk \
--to=andrew.shadura@collabora.co.uk \
--cc=benjamin.tissoires@gmail.com \
--cc=jikos@kernel.org \
--cc=kernel@collabora.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.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;
as well as URLs for NNTP newsgroup(s).