syzbot
unread,Dec 3, 2025, 2:31:05 AM (yesterday) Dec 3Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lanb...@hotmail.com, lanb...@hotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
> #syz test:
This bug is already marked as fixed. No point in testing.
> git://
git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.1.y
>
> drivers/hid/hid-core.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index ed65523d77c2..c8cca0c7ec67 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1354,7 +1354,12 @@ EXPORT_SYMBOL_GPL(hid_snto32);
>
> static u32 s32ton(__s32 value, unsigned n)
> {
> - s32 a = value >> (n - 1);
> + s32 a;
> + if (!value || !n)
> + return 0;
> +
> + a = value >> (n - 1);
> +
> if (a && a != -1)
> return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1;
> return value & ((1 << n) - 1);
> --
> 2.43.0
>
>