]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
USB: serial: mct_u232: fix memory corruption with small endpoint
authorJohan Hovold <johan@kernel.org>
Wed, 20 May 2026 14:27:00 +0000 (16:27 +0200)
committerJohan Hovold <johan@kernel.org>
Wed, 20 May 2026 14:27:00 +0000 (16:27 +0200)
commit915b36d701950503c4ea0f6e314b10868e59fce3
tree5f4c9c4c1589337aa4d42d0d69da8ba25973abbb
parentab8336a7e414f018430aa1af3a46944032f7ff96
USB: serial: mct_u232: fix memory corruption with small endpoint

The driver overrides the maximum transfer size for a specific device
which only accepts 16 byte packets for its 32 byte bulk-out endpoint.

Make sure to never increase the maximum transfer size to prevent slab
corruption should a malicious device report a smaller endpoint max
packet size than expected.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mct_u232.c