mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Kery Qi <qikeyu2017@gmail.com>, jikos@kernel.org, bentiss@kernel.org
Cc: lains@riseup.net, hansg@kernel.org, linux-input@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: logitech-hidpp: fix NULL pointer dereference in hidpp_get_report_length()
Date: Thu, 15 Jan 2026 15:42:26 +0100	[thread overview]
Message-ID: <c53d33769e6fa468c625a7c3a5dd3fceba2401eb.camel@hadess.net> (raw)
In-Reply-To: <20260115142417.243-1-qikeyu2017@gmail.com>



On Thu, 2026-01-15 at 22:24 +0800, Kery Qi wrote:
<snip>
> -	if (!report)
> +	if (!report || report->maxfield < 1 || !report->field[0])

A partial fix already exists in the for-next branch:
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-next&id=1547d41f9f19d691c2c9ce4c29f746297baef9e9

You'll probably want to rebase and adapt your fix. See also this review
by GregKH for v1:
https://patchwork.kernel.org/project/linux-input/patch/20260109105912.3141960-2-gnoack@google.com/

Cheers

>  		return 0;
>  
>  	return report->field[0]->report_count + 1;

  reply	other threads:[~2026-01-15 14:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 14:24 Kery Qi
2026-01-15 14:42 ` Bastien Nocera [this message]
2026-01-15 15:20 ` 齐柯宇
     [not found] <CALEuBa=E1YSo1oVxd67rBf+6bC28zQZi5HBghMmcPFHKQn2+UA@mail.gmail.com>
2026-01-14 17:54 ` 齐柯宇
2026-01-15 12:03 ` Bastien Nocera
2026-01-15 14:17   ` 齐柯宇

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=c53d33769e6fa468c625a7c3a5dd3fceba2401eb.camel@hadess.net \
    --to=hadess@hadess.net \
    --cc=bentiss@kernel.org \
    --cc=hansg@kernel.org \
    --cc=jikos@kernel.org \
    --cc=lains@riseup.net \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qikeyu2017@gmail.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®