]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Input: ims-pcu - fix type confusion in CDC union descriptor parsing
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 22 May 2026 17:25:11 +0000 (10:25 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 7 Jun 2026 04:03:34 +0000 (21:03 -0700)
commitca459e237bc49567649c56bc72e4c602fb92fd67
tree1edf9e28b547fa775c58cf7b6653b446329514ba
parent462a999917755a3bf77448dfd64307963cf0a9f0
Input: ims-pcu - fix type confusion in CDC union descriptor parsing

The driver currently trusts the bMasterInterface0 from the CDC union
descriptor without verifying that it matches the interface being
probed. This could lead to the driver overwriting the private data of
another interface.

Validate that the control interface found in the descriptor is indeed
the one we are probing.

Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
Cc: stable@vger.kernel.org
Reported-by: Sashiko bot <sashiko-bot@kernel.org>
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/ims-pcu.c