From: Jiri Kosina <jikos@kernel.org>
To: "Tomasz Pakuła" <tomasz.pakula.oficjalny@gmail.com>
Cc: bentiss@kernel.org, oleg@makarenk.ooo,
linux-input@vger.kernel.org, dan.carpenter@linaro.org
Subject: Re: [PATCH] HID: pidff: Fix possible null pointer dereference
Date: Fri, 12 Sep 2025 17:29:54 +0200 (CEST) [thread overview]
Message-ID: <nq76p676-0309-n4o4-nnq7-0q696549o251@xreary.bet> (raw)
In-Reply-To: <20250823194516.2425885-1-tomasz.pakula.oficjalny@gmail.com>
On Sat, 23 Aug 2025, Tomasz Pakuła wrote:
> As reported by Dan Carpenter, if the axes_enable field wasn't found,
> trying to find the axes themselves will result in a null pointer
> dereference. This could only occur with a broken PID descriptor, but
> it's worth protecting from.
>
> Exit early if the axes_enable wasn't found AND add a gate to the
> pidff_find_special_keys to exit early if the passed HID field is null.
> This will protect again null dereferencing in the future and properly
> return 0 found special keys.
>
> Fixes:
> Commit 1d72e7bd340b ("HID: pidff: Add support for AXES_ENABLE field")
> Made on top of for-6.18/pidff
>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Applied to hid.git#for-6.18/pidff, thanks.
--
Jiri Kosina
SUSE Labs
prev parent reply other threads:[~2025-09-12 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-23 19:45 [PATCH] HID: pidff: Fix possible null pointer dereference Tomasz Pakuła
2025-09-12 15:29 ` Jiri Kosina [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=nq76p676-0309-n4o4-nnq7-0q696549o251@xreary.bet \
--to=jikos@kernel.org \
--cc=bentiss@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=oleg@makarenk.ooo \
--cc=tomasz.pakula.oficjalny@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;
as well as URLs for NNTP newsgroup(s).