divide error in fbcon_switch

13 views
Skip to first unread message

syzbot

unread,
Dec 2, 2019, 4:32:09 PM12/2/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 174651bd Linux 4.19.87
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=104b4f12e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=d306897dc6e131b7
dashboard link: https://syzkaller.appspot.com/bug?extid=b8d8702856cf4c98144f
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=123b63f2e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12ef28a6e00000

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

audit: type=1400 audit(1575318511.742:36): avc: denied { map } for
pid=7721 comm="syz-executor178" path="/root/syz-executor178939741"
dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 2678 Comm: kworker/0:2 Not tainted 4.19.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: events console_callback
RIP: 0010:fbcon_update_softback drivers/video/fbdev/core/fbcon.c:360
[inline]
RIP: 0010:fbcon_switch+0x20d/0x1a40 drivers/video/fbdev/core/fbcon.c:2214
Code: 47 e9 07 4c 89 3d 53 47 e9 07 38 d0 7c 08 84 d2 0f 85 3b 16 00 00 41
8b 9d 3c 03 00 00 31 d2 bf 05 00 00 00 8b 05 73 c1 bc 05 <f7> f3 41 89 c4
89 c6 e8 a7 84 e9 fd 41 83 fc 05 0f 8e a6 0d 00 00
RSP: 0018:ffff88809fa879d8 EFLAGS: 00010246
RAX: 0000000000008000 RBX: 0000000000000000 RCX: ffffffff83819094
RDX: 0000000000000000 RSI: ffffffff838190a2 RDI: 0000000000000005
RBP: ffff88809fa87b68 R08: ffff88809fa902c0 R09: fffffbfff139874c
R10: fffffbfff139874b R11: ffffffff89cc3a5f R12: 0000000000000000
R13: ffff8880952ca900 R14: ffff88821976eec0 R15: ffff888219780040
FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f899bd5c000 CR3: 00000000a4205000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
redraw_screen+0x37d/0x8e0 drivers/tty/vt/vt.c:997
complete_change_console+0x105/0x3a0 drivers/tty/vt/vt_ioctl.c:1277
change_console+0x19b/0x2c0 drivers/tty/vt/vt_ioctl.c:1402
console_callback+0x3a1/0x400 drivers/tty/vt/vt.c:2800
process_one_work+0x989/0x1750 kernel/workqueue.c:2153
worker_thread+0x98/0xe40 kernel/workqueue.c:2296
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Modules linked in:
---[ end trace c2aa70597b96deec ]---
RIP: 0010:fbcon_update_softback drivers/video/fbdev/core/fbcon.c:360
[inline]
RIP: 0010:fbcon_switch+0x20d/0x1a40 drivers/video/fbdev/core/fbcon.c:2214
Code: 47 e9 07 4c 89 3d 53 47 e9 07 38 d0 7c 08 84 d2 0f 85 3b 16 00 00 41
8b 9d 3c 03 00 00 31 d2 bf 05 00 00 00 8b 05 73 c1 bc 05 <f7> f3 41 89 c4
89 c6 e8 a7 84 e9 fd 41 83 fc 05 0f 8e a6 0d 00 00
RSP: 0018:ffff88809fa879d8 EFLAGS: 00010246
RAX: 0000000000008000 RBX: 0000000000000000 RCX: ffffffff83819094
RDX: 0000000000000000 RSI: ffffffff838190a2 RDI: 0000000000000005
RBP: ffff88809fa87b68 R08: ffff88809fa902c0 R09: fffffbfff139874c
R10: fffffbfff139874b R11: ffffffff89cc3a5f R12: 0000000000000000
R13: ffff8880952ca900 R14: ffff88821976eec0 R15: ffff888219780040
FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f899bd5c000 CR3: 00000000a4205000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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,
Dec 2, 2019, 8:21:10 PM12/2/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: fbc5fe7a Linux 4.14.157
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1641fc32e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=d49d9f4045dcfa5d
dashboard link: https://syzkaller.appspot.com/bug?extid=383ba193d61507226c6f
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1338042ae00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=119fb81ee00000

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

audit: type=1400 audit(1575331730.163:36): avc: denied { map } for
pid=7132 comm="syz-executor493" path="/root/syz-executor493755317"
dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
divide error: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 23 Comm: kworker/1:1 Not tainted 4.14.157-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: events console_callback
task: ffff8880a9ec6600 task.stack: ffff8880a9ed0000
RIP: 0010:fbcon_update_softback drivers/video/fbdev/core/fbcon.c:354
[inline]
RIP: 0010:fbcon_switch+0x1e3/0x1820 drivers/video/fbdev/core/fbcon.c:2192
RSP: 0018:ffff8880a9ed7a38 EFLAGS: 00010246
RAX: 0000000000008000 RBX: 0000000000000000 RCX: 1ffffffff0e0fe85
RDX: 0000000000000000 RSI: ffffffff8a4650a0 RDI: ffff88809bc76ffc
RBP: ffff8880a9ed7ba8 R08: ffff8880a9ec6600 R09: ffff8880a9ec6ef0
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88809bc76cc0 R14: ffff8880a5f28e00 R15: ffff8880a5ff0040
FS: 0000000000000000(0000) GS:ffff8880aed00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f160139a000 CR3: 0000000092f02000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
redraw_screen+0x335/0x7c0 drivers/tty/vt/vt.c:688
complete_change_console+0xfe/0x360 drivers/tty/vt/vt_ioctl.c:1291
change_console+0x161/0x270 drivers/tty/vt/vt_ioctl.c:1416
console_callback+0x337/0x390 drivers/tty/vt/vt.c:2460
process_one_work+0x863/0x1600 kernel/workqueue.c:2114
worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248
kthread+0x319/0x430 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Code: c0 03 4c 89 3d df 68 1f 07 4c 89 3d 58 68 1f 07 38 d0 7c 08 84 d2 0f
85 51 14 00 00 45 8b a5 3c 03 00 00 31 d2 8b 05 dd 14 0f 05 <41> f7 f4 83
f8 05 89 85 c0 fe ff ff 0f 8e 51 0c 00 00 e8 26 42
RIP: fbcon_update_softback drivers/video/fbdev/core/fbcon.c:354 [inline]
RSP: ffff8880a9ed7a38
RIP: fbcon_switch+0x1e3/0x1820 drivers/video/fbdev/core/fbcon.c:2192 RSP:
ffff8880a9ed7a38
---[ end trace 8bb085bebb278621 ]---

syzbot

unread,
Aug 29, 2020, 4:01:09 AM8/29/20
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 74752b81eae8ae64e97de222320026367e92c4b5
Author: Tetsuo Handa <penguin...@I-love.SAKURA.ne.jp>
Date: Sun Jul 12 11:10:12 2020 +0000

vt: Reject zero-sized screen buffer size.

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12d1abb9900000
start commit: 17a87580 Linux 4.19.133
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=562879a87122f7ce
dashboard link: https://syzkaller.appspot.com/bug?extid=b8d8702856cf4c98144f
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14c2a437100000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=143eb793100000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: vt: Reject zero-sized screen buffer size.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages