kernel_samsung_a53x/drivers/usb/class
Oliver Neukum a2fa99d5cc USB: class: CDC-ACM: fix race between get_serial and set_serial
commit b41c1fa155ba56d125885b0191aabaf3c508d0a3 upstream.

TIOCGSERIAL is an ioctl. Thus it must be atomic. It returns
two values. Racing with set_serial it can return an inconsistent
result. The mutex must be taken.

In terms of logic the bug is as old as the driver. In terms of
code it goes back to the conversion to the get_serial and
set_serial methods.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@kernel.org>
Fixes: 99f75a1fcd865 ("cdc-acm: switch to ->[sg]et_serial()")
Link: https://lore.kernel.org/r/20240912141916.1044393-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:21:30 +01:00
..
cdc-acm.c USB: class: CDC-ACM: fix race between get_serial and set_serial 2024-11-23 23:21:30 +01:00
cdc-acm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdc-wdm.c USB: class: cdc-wdm: Fix CPU lockup caused by excessive log messages 2024-11-19 14:19:02 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usblp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usbtmc.c USB: usbtmc: prevent kernel-usb-infoleak 2024-11-23 23:21:16 +01:00