Re: [PATCH] HID: pidff: Fix possible null pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@xxxxxxxxx>

Applied to hid.git#for-6.18/pidff, thanks.

-- 
Jiri Kosina
SUSE Labs






[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux