<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/input/misc/ims-pcu.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-09-05T04:37:00+00:00</updated>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-09-05T04:37:00+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-09-02T22:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d'/>
<id>urn:sha1:3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d</id>
<content type='text'>
This is another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules in
scripts/coccinelle/api/kmalloc_objs.cocci

This catches both the set of kmalloc() uses added since the first
kmalloc_obj() conversions in v7.0 and adds a large group missed in the
first pass due to Coccinelle not interacting well with the cleanup.h
scoped_...() family of macros[1]. I worked around this with spatch's
"--macro-file" argument to a file with all the scoped_...() macros mapped
to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control
flow indicator I could find.

Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc,
riscv, and s390 with no new warnings.

Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1]
Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2]
Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - add missing MODULE_DEVICE_TABLE()</title>
<updated>2026-07-04T23:35:22+00:00</updated>
<author>
<name>Pengpeng Hou</name>
<email>pengpeng@iscas.ac.cn</email>
</author>
<published>2026-07-04T23:24:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=136be950466b3ccf6c2256789db787259190f059'/>
<id>urn:sha1:136be950466b3ccf6c2256789db787259190f059</id>
<content type='text'>
The driver has a match table for the usb bus wired into its driver
structure, but the table is not exported with MODULE_DEVICE_TABLE().

Add the missing MODULE_DEVICE_TABLE() entry so module alias information
is generated for automatic module loading.

Signed-off-by: Pengpeng Hou &lt;pengpeng@iscas.ac.cn&gt;
Link: https://patch.msgid.link/20260704151730.42772-1-pengpeng@iscas.ac.cn
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - fix potential infinite loop in CDC union descriptor parsing</title>
<updated>2026-06-07T04:05:17+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-05-23T04:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d4579af29e67ca8722db0a1194227f8015c8981d'/>
<id>urn:sha1:d4579af29e67ca8722db0a1194227f8015c8981d</id>
<content type='text'>
The driver parses CDC union descriptors in ims_pcu_get_cdc_union_desc()
by iterating through the extra descriptor data. However, it does not
verify that the bLength of each descriptor is at least 2. A malicious
device could provide a descriptor with bLength = 0, leading to an
infinite loop in the driver.

Add a check to ensure bLength is at least 2 before proceeding with
parsing.

Fixes: 628329d52474 (Input: add IMS Passenger Control Unit driver)
Cc: stable@vger.kernel.org
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - add response length checks</title>
<updated>2026-06-07T04:05:16+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-05-22T17:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=48c9d92fd4ee3a8f5d2cb46c802a0eff8e67c79c'/>
<id>urn:sha1:48c9d92fd4ee3a8f5d2cb46c802a0eff8e67c79c</id>
<content type='text'>
The driver processes response data from device buffers without verifying
that the device actually sent enough data. This can lead to
out-of-bounds reads or processing stale data.

Add checks for the expected response length before accessing the
buffers.

Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
Cc: stable@vger.kernel.org
Reported-by: Sashiko bot &lt;sashiko-bot@kernel.org&gt;
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - fix DMA mapping violation in line setup</title>
<updated>2026-06-07T04:05:16+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-05-22T17:30:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8adf4289d945e8990e4336436a97da71d21d2cae'/>
<id>urn:sha1:8adf4289d945e8990e4336436a97da71d21d2cae</id>
<content type='text'>
In ims_pcu_line_setup(), the driver uses pcu-&gt;cmd_buf as a transfer
buffer for usb_control_msg(). However, pcu-&gt;cmd_buf is embedded in the
struct ims_pcu allocation, which violates DMA mapping rules regarding
cacheline alignment.

Use a heap-allocated buffer for the line coding data instead.

Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
Cc: stable@vger.kernel.org
Reported-by: Sashiko bot &lt;sashiko-bot@kernel.org&gt;
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - fix out-of-bounds read in ims_pcu_irq() debug logging</title>
<updated>2026-06-07T04:05:15+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-05-22T17:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=403b0a6970b1084bb27907c0f8225801fdd0fe1d'/>
<id>urn:sha1:403b0a6970b1084bb27907c0f8225801fdd0fe1d</id>
<content type='text'>
The debug logging in ims_pcu_irq() unconditionally prints data from
pcu-&gt;urb_in_buf. However, if the interrupt fired for pcu-&gt;urb_ctrl, the
actual data resides in pcu-&gt;urb_ctrl_buf. If urb-&gt;actual_length for the
control URB exceeds pcu-&gt;max_in_size, this leads to an out-of-bounds
read.

Fix this by printing from the correct buffer associated with the URB.

Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
Cc: stable@vger.kernel.org
Reported-by: Sashiko bot &lt;sashiko-bot@kernel.org&gt;
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - validate control endpoint type</title>
<updated>2026-06-07T04:05:14+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-05-22T17:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=baf56975806534268e24acf9a8abb1c447ce11e9'/>
<id>urn:sha1:baf56975806534268e24acf9a8abb1c447ce11e9</id>
<content type='text'>
The driver currently assumes that the first endpoint of the control
interface is an interrupt IN endpoint without verifying it. A malicious
device could provide a different endpoint type, which would then be
passed to usb_fill_int_urb(), potentially leading to kernel warnings
or undefined behavior.

Verify that the control endpoint is an interrupt IN endpoint.

Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
Cc: stable@vger.kernel.org
Reported-by: Sashiko bot &lt;sashiko-bot@kernel.org&gt;
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - fix race condition in reset_device sysfs callback</title>
<updated>2026-06-07T04:05:13+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-05-22T17:29:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=411b8c4b274737c3bf08e1e025801161603cfffc'/>
<id>urn:sha1:411b8c4b274737c3bf08e1e025801161603cfffc</id>
<content type='text'>
The ims_pcu_reset_device() sysfs callback calls ims_pcu_execute_command()
without acquiring pcu-&gt;cmd_mutex. This can lead to data races and
corruption of the shared command buffer if triggered concurrently with
other commands.

Acquire pcu-&gt;cmd_mutex before calling ims_pcu_execute_command().

Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
Cc: stable@vger.kernel.org
Reported-by: Sashiko bot &lt;sashiko-bot@kernel.org&gt;
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - fix firmware leak in async update</title>
<updated>2026-06-07T04:05:13+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-05-22T17:25:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d48795b5cd6828d36b707e8d62fc9e5c90e004ab'/>
<id>urn:sha1:d48795b5cd6828d36b707e8d62fc9e5c90e004ab</id>
<content type='text'>
The firmware object was not being released if validation failed.
Use __free(firmware) to ensure the firmware is always released.

Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
Cc: stable@vger.kernel.org
Reported-by: Sashiko bot &lt;sashiko-bot@kernel.org&gt;
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ims-pcu - fix type confusion in CDC union descriptor parsing</title>
<updated>2026-06-07T04:03:34+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-05-22T17:25:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ca459e237bc49567649c56bc72e4c602fb92fd67'/>
<id>urn:sha1:ca459e237bc49567649c56bc72e4c602fb92fd67</id>
<content type='text'>
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 &lt;sashiko-bot@kernel.org&gt;
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
</feed>
