Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alan Stern" <stern@rowland.harvard.edu>
Cc: dmitry.torokhov@gmail.com, linux-usb@vger.kernel.org,
	linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: core: Fix out-of-bounds left shift by 32 in s32ton()
Date: Sat, 10 Oct 2026 17:49:48 +0000	[thread overview]
Message-ID: <sashiko-outbox-166784@kernel.org> (raw)
In-Reply-To: <dfa0aa1c-e55e-4316-8307-f72a07383634@rowland.harvard.edu>

> Syzbot reported an out-of-bounds shift (32-bit integer shifted left by
> 32) in the s32ton() routine in the HID core.  This routine converts a
> signed 32-bit integer to a signed n-bit integer, and it caps the value
> of n at 32.  But when n == 32 there's no need to do anything; it can
> simply return the input value.  This will avoid calculating (1 << n)
> when n is 32, which was the cause of the invalid shift.
> 
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/dfa0aa1c-e55e-4316-8307-f72a07383634@rowland.harvard.edu?part=1


      reply	other threads:[~2026-10-10 17:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-10 17:44 [PATCH] HID: core: Fix out-of-bounds left shift by 32 in s32ton() Alan Stern
2026-10-10 17:49 ` sashiko-bot [this message]

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=sashiko-outbox-166784@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=stern@rowland.harvard.edu \
    /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