general protection fault in n_tty_set_termios

16 views
Skip to first unread message

syzbot

unread,
Apr 11, 2019, 8:01:08 PM4/11/19
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 0ff0788d Merge 4.14.77 into android-4.14
git tree: android-4.14
console output: https://syzkaller.appspot.com/x/log.txt?x=1251d629400000
kernel config: https://syzkaller.appspot.com/x/.config?x=8c047c057907482d
dashboard link: https://syzkaller.appspot.com/bug?extid=ddf1753706416ef2fb90
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15d3ac95400000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+ddf175...@syzkaller.appspotmail.com

random: cc1: uninitialized urandom read (8 bytes read)
audit: type=1400 audit(1540009072.389:9): avc: denied { map } for
pid=1795 comm="syz-execprog" path="/root/syzkaller-shm857765909" dev="sda1"
ino=16482 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:file_t:s0 tclass=file permissive=1
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN NOPTI
Modules linked in:
CPU: 1 PID: 2803 Comm: syz-executor0 Not tainted 4.14.77+ #21
task: ffff8801c5872f00 task.stack: ffff8801c5818000
RIP: 0010:n_tty_set_termios+0x291/0xcb0 drivers/tty/n_tty.c:1802
RSP: 0018:ffff8801c581f7f8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffffffff4e8b59e
RDX: 000000000000000b RSI: ffff8801c581f878 RDI: ffff8801c581f884
RBP: ffff8801c5947700 R08: 0000000000000001 R09: 0000000000000000
R10: ffff8801c5873780 R11: 0000000000000001 R12: ffff8801c5947ab4
R13: 0000000000000001 R14: 000000000000005d R15: ffff8801c581f878
FS: 00007fa2e8e18700(0000) GS:ffff8801db900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000008f4c30 CR3: 00000001c7682005 CR4: 00000000001606a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tty_set_termios+0x5fd/0x860 drivers/tty/tty_ioctl.c:340
set_termios+0x2bf/0x440 drivers/tty/tty_ioctl.c:413
tty_mode_ioctl+0x7f9/0x920 drivers/tty/tty_ioctl.c:778
n_tty_ioctl_helper+0x3f/0x350 drivers/tty/tty_ioctl.c:939
n_tty_ioctl+0x43/0x2e0 drivers/tty/n_tty.c:2452
tty_ioctl+0x551/0x13e0 drivers/tty/tty_io.c:2659
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x1a0/0x1030 fs/ioctl.c:684
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x7e/0xb0 fs/ioctl.c:692
do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x457569
RSP: 002b:00007fa2e8e17c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569
RDX: 0000000020000040 RSI: 0000000000005407 RDI: 0000000000000005
RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa2e8e186d4
R13: 00000000004c0d89 R14: 00000000004d17a0 R15: 00000000ffffffff
Code: d2 0f 85 14 09 00 00 44 8b ad b4 03 00 00 e8 67 8a 5e ff 4c 89 f2 41
d1 ed 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 41 83 e5 01 <0f> b6 04 02
4c 89 f2 83 e2 07 38 d0 7f 08 84 c0 0f 85 f1 07 00
RIP: n_tty_set_termios+0x291/0xcb0 drivers/tty/n_tty.c:1802 RSP:
ffff8801c581f7f8
---[ end trace 18e02e08a9806cd1 ]---


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Apr 13, 2019, 8:00:35 PM4/13/19
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 2bcbbd5b Merge 4.9.97 into android-4.9
git tree: android-4.9
console output: https://syzkaller.appspot.com/x/log.txt?x=11d3c8eb800000
kernel config: https://syzkaller.appspot.com/x/.config?x=1e52aa51291e98a6
dashboard link: https://syzkaller.appspot.com/bug?extid=07c9bb8aea61bc371292
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13cf47bb800000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12e56c07800000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+07c9bb...@syzkaller.appspotmail.com

kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 3805 Comm: syz-executor257 Not tainted 4.9.97-g2bcbbd5 #11
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff8801b7118000 task.stack: ffff8801c51a0000
RIP: 0010:[<ffffffff8211b7b3>] [<ffffffff8211b7b3>]
n_tty_set_termios+0x2a3/0xd30 drivers/tty/n_tty.c:1784
RSP: 0018:ffff8801c51a77b0 EFLAGS: 00010203
RAX: 000000000000009a RBX: 0000000000000000 RCX: 000000000000000b
RDX: dffffc0000000000 RSI: ffffffff8211b79f RDI: ffff8801c51a7854
RBP: ffff8801c51a77e8 R08: ffff8801b7118938 R09: 0000000000000001
R10: ffff8801b7118000 R11: 0000000000000001 R12: ffff8801b616cc80
R13: ffff8801b616d034 R14: 000000000000005d R15: ffff8801c51a7848
FS: 00007f7c6c885700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7c6c842e78 CR3: 00000001c23dc000 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
ffff8801b616cc80 ffff88010000009a ffff8801d02c8e80 ffffffff8211b510
dffffc0000000000 ffff8801b616d04c ffff8801b616cc80 ffff8801c51a78d0
ffffffff821252e6 0000000000000001 00ff8801000000bf 1ffff10038a34f05
Call Trace:
[<ffffffff821252e6>] tty_set_termios+0x626/0x8a0
drivers/tty/tty_ioctl.c:562
[<ffffffff8212634f>] set_termios+0x38f/0x620 drivers/tty/tty_ioctl.c:635
[<ffffffff82126ea2>] tty_mode_ioctl+0x8c2/0x980 drivers/tty/tty_ioctl.c:970
[<ffffffff82127004>] n_tty_ioctl_helper+0x44/0x370
drivers/tty/tty_ioctl.c:1161
[<ffffffff8211a146>] n_tty_ioctl+0x46/0x2c0 drivers/tty/n_tty.c:2443
[<ffffffff82113514>] tty_ioctl+0x5a4/0x2270 drivers/tty/tty_io.c:3009
[<ffffffff815b051c>] vfs_ioctl fs/ioctl.c:43 [inline]
[<ffffffff815b051c>] file_ioctl fs/ioctl.c:493 [inline]
[<ffffffff815b051c>] do_vfs_ioctl+0x1ac/0x11a0 fs/ioctl.c:677
[<ffffffff815b159f>] SYSC_ioctl fs/ioctl.c:694 [inline]
[<ffffffff815b159f>] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685
[<ffffffff81006316>] do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
[<ffffffff839f4653>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
Code: d2 0f 85 9b 09 00 00 41 8b 84 24 b4 03 00 00 89 45 d0 e8 61 12 24 ff
4c 89 f1 8b 45 d0 48 ba 00 00 00 00 00 fc ff df 48 c1 e9 03 <0f> b6 14 11
4c 89 f1 83 e1 07 d1 e8 83 e0 01 38 ca 7f 08 84 d2
RIP [<ffffffff8211b7b3>] n_tty_set_termios+0x2a3/0xd30
drivers/tty/n_tty.c:1784
RSP <ffff8801c51a77b0>
---[ end trace 3781f35b40af2b0d ]---
Reply all
Reply to author
Forward
0 new messages