https://github.com/torvalds/linux
Revision 3d63b7e4ae0dc5e02d28ddd2fa1f945defc68d81 authored by Tetsuo Handa on 26 May 2018, 00:53:13 UTC, committed by Greg Kroah-Hartman on 28 June 2018, 12:30:16 UTC
syzbot is reporting stalls at n_tty_receive_char_special() [1]. This is
because comparison is not working as expected since ldata->read_head can
change at any moment. Mitigate this by explicitly masking with buffer size
when checking condition for "while" loops.

[1] https://syzkaller.appspot.com/bug?id=3d7481a346958d9469bebbeb0537d5f056bdd6e8

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot <syzbot+18df353d7540aa6b5467@syzkaller.appspotmail.com>
Fixes: bc5a5e3f45d04784 ("n_tty: Don't wrap input buffer indices at buffer size")
Cc: stable <stable@vger.kernel.org>
Cc: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7daf201
History
Tip revision: 3d63b7e4ae0dc5e02d28ddd2fa1f945defc68d81 authored by Tetsuo Handa on 26 May 2018, 00:53:13 UTC
n_tty: Fix stall at n_tty_receive_char_special().
Tip revision: 3d63b7e
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 12.8 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.5 KB
.mailmap -rw-r--r-- 9.3 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 96.3 KB
Kbuild -rw-r--r-- 2.2 KB
Kconfig -rw-r--r-- 321 bytes
MAINTAINERS -rw-r--r-- 449.0 KB
Makefile -rw-r--r-- 58.3 KB
README -rw-r--r-- 800 bytes

README

back to top