From: Jiri Kosina <jikos@kernel.org>
To: Anirudh Rayabharam <mail@anirudhrb.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
gregkh@linuxfoundation.org,
linux-kernel-mentees@lists.linuxfoundation.org,
syzbot+7c2bb71996f95a82524c@syzkaller.appspotmail.com,
linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usbhid: fix info leak in hid_submit_ctrl
Date: Wed, 5 May 2021 14:42:40 +0200 (CEST) [thread overview]
Message-ID: <nycvar.YFH.7.76.2105051442120.28378@cbobk.fhfr.pm> (raw)
In-Reply-To: <20210425173353.10231-1-mail@anirudhrb.com>
On Sun, 25 Apr 2021, Anirudh Rayabharam wrote:
> In hid_submit_ctrl(), the way of calculating the report length doesn't
> take into account that report->size can be zero. When running the
> syzkaller reproducer, a report of size 0 causes hid_submit_ctrl) to
> calculate transfer_buffer_length as 16384. When this urb is passed to
> the usb core layer, KMSAN reports an info leak of 16384 bytes.
>
> To fix this, first modify hid_report_len() to account for the zero
> report size case by using DIV_ROUND_UP for the division. Then, call it
> from hid_submit_ctrl().
>
> Reported-by: syzbot+7c2bb71996f95a82524c@syzkaller.appspotmail.com
> Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Benjamin, could you please run this one through your regression testing
machinery before we send it upstream?
Thanks,
--
Jiri Kosina
SUSE Labs
next prev parent reply other threads:[~2021-05-05 12:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-25 17:33 Anirudh Rayabharam
2021-05-05 12:42 ` Jiri Kosina [this message]
2021-05-05 13:25 ` Benjamin Tissoires
2021-05-05 13:28 ` Jiri Kosina
2021-05-05 13:47 ` Benjamin Tissoires
2021-05-05 13:52 ` 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=nycvar.YFH.7.76.2105051442120.28378@cbobk.fhfr.pm \
--to=jikos@kernel.org \
--cc=benjamin.tissoires@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mail@anirudhrb.com \
--cc=syzbot+7c2bb71996f95a82524c@syzkaller.appspotmail.com \
/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
all inboxes | Powered by JetHome®