summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2026-09-03 18:31:46 +0200
committerJohan Hovold <johan@kernel.org>2026-09-08 11:00:48 +0200
commitae0e61d95677efa778379853e495d748e6efbf95 (patch)
tree1acf1fcc32250e3147eb6b6a57e0c56e0f926df6 /tools/lib/python
parent8fe535227455db566bcaf40fd83db50b16dce935 (diff)
downloadlinux-next-ae0e61d95677efa778379853e495d748e6efbf95.tar.gz
linux-next-ae0e61d95677efa778379853e495d748e6efbf95.zip
USB: serial: fix ioctl hangup race
The tty ioctls can race with hangup and end up calling into a tty driver for a device that is already gone or powered down. Serialise the callbacks using the tty port mutex and add the missing checks to make sure the port has not been hung up before accessing port driver data or hardware. This specifically avoids dereferencing a NULL-pointer if a device is disconnected during lengthy break signalling. Note that TIOCGICOUNT and TIOCMIWAIT do not access port driver data or hardware and are therefore not affected by the race. Fixes: f34d7a5b7010 ("tty: The big operations rework") Reported-by: Nick Bowler <nbowler@draconx.ca> Link: https://lore.kernel.org/all/CADyTPExB2kYOOwkO0JqGhKaYVDqO9uS9WCw0J=MCTdVhcGOogA@mail.gmail.com/ Reported-by: syzbot+473d7477c523b41d4046@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/6a9087a4.4d659fcc.734b4.0013.GAE@google.com Cc: stable@vger.kernel.org # 2.6.26 Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions