[PATCH 5.10/5.15 0/1] tty: add the option to have a tty reject a new ldisc

From: Gavrilov Ilia
Date: Fri Sep 20 2024 - 03:14:17 EST


Syzkaller reports a sleeping function called from invalid context
in do_con_write() in the 5.10 and 5.15 stable releases.

The issue has been fixed by the following upstream patch that was
adapted to 5.10 and 5.15. All of the changes made to the patch in order
to adapt it are described at the end of the commit message.

This patch has already been backported to the following stable branches:
v6.9 - https://lore.kernel.org/all/20240625085551.368621044@xxxxxxxxxxxxxxxxxxx/
v6.6 - https://lore.kernel.org/all/20240625085539.398852153@xxxxxxxxxxxxxxxxxxx/
v6.1 - https://lore.kernel.org/all/20240625085527.625846117@xxxxxxxxxxxxxxxxxxx/

Found by InfoTeCS on behalf of Linux Verification Center
(linuxtesting.org) with Syzkaller.

Linus Torvalds (1):
tty: add the option to have a tty reject a new ldisc

drivers/tty/tty_ldisc.c | 6 ++++++
drivers/tty/vt/vt.c | 10 ++++++++++
include/linux/tty_driver.h | 8 ++++++++
3 files changed, 24 insertions(+)

--
2.39.2