Re: KASAN: vmalloc-out-of-bounds Write in bitfill_aligned

2020-03-17 Thread syzbot
syzbot has found a reproducer for the following crash on:

HEAD commit:fb33c651 Linux 5.6-rc6
git tree:   upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17dacd55e0
kernel config:  https://syzkaller.appspot.com/x/.config?x=9f894bd92023de02
dashboard link: https://syzkaller.appspot.com/bug?extid=e5fd3e65515b48c02a30
compiler:   gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:  https://syzkaller.appspot.com/x/repro.syz?x=11b8ca75e0
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=114800e5e0

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

==
BUG: KASAN: vmalloc-out-of-bounds in bitfill_aligned 
drivers/video/fbdev/core/sysfillrect.c:54 [inline]
BUG: KASAN: vmalloc-out-of-bounds in bitfill_aligned+0x34b/0x410 
drivers/video/fbdev/core/sysfillrect.c:25
Write of size 8 at addr c90009621000 by task syz-executor767/9337

CPU: 3 PID: 9337 Comm: syz-executor767 Not tainted 5.6.0-rc6-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 
rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x188/0x20d lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0x5/0x315 mm/kasan/report.c:374
 __kasan_report.cold+0x1a/0x32 mm/kasan/report.c:506
 kasan_report+0xe/0x20 mm/kasan/common.c:641
 bitfill_aligned drivers/video/fbdev/core/sysfillrect.c:54 [inline]
 bitfill_aligned+0x34b/0x410 drivers/video/fbdev/core/sysfillrect.c:25
 sys_fillrect+0x415/0x7a0 drivers/video/fbdev/core/sysfillrect.c:291
 drm_fb_helper_sys_fillrect+0x1c/0x190 drivers/gpu/drm/drm_fb_helper.c:719
 bit_clear_margins+0x2d5/0x4a0 drivers/video/fbdev/core/bitblit.c:232
 fbcon_clear_margins+0x1de/0x240 drivers/video/fbdev/core/fbcon.c:1379
 fbcon_switch+0xd1b/0x1740 drivers/video/fbdev/core/fbcon.c:2361
 redraw_screen+0x2a8/0x770 drivers/tty/vt/vt.c:1008
 fbcon_modechanged+0x5bd/0x780 drivers/video/fbdev/core/fbcon.c:2998
 fbcon_update_vcs+0x3a/0x50 drivers/video/fbdev/core/fbcon.c:3045
 fb_set_var+0xad0/0xd40 drivers/video/fbdev/core/fbmem.c:1056
 do_fb_ioctl+0x390/0x7d0 drivers/video/fbdev/core/fbmem.c:1109
 fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1185
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl+0x11a/0x180 fs/ioctl.c:763
 __do_sys_ioctl fs/ioctl.c:772 [inline]
 __se_sys_ioctl fs/ioctl.c:770 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:770
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x433d29
Code: c4 18 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 
89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 
eb da fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:7fff33d61508 EFLAGS: 0246 ORIG_RAX: 0010
RAX: ffda RBX: 004002e0 RCX: 00433d29
RDX: 21c0 RSI: 4601 RDI: 0003
RBP: 006b2018 R08:  R09: 004002e0
R10:  R11: 0246 R12: 00401bc0
R13: 00401c50 R14:  R15: 


Memory state around the buggy address:
 c90009620f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c90009620f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>c90009621000: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
   ^
 c90009621080: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
 c90009621100: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
==

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


KASAN: vmalloc-out-of-bounds Write in bitfill_aligned

2019-12-04 Thread syzbot

Hello,

syzbot found the following crash on:

HEAD commit:63de3747 Merge tag 'tag-chrome-platform-for-v5.5' of git:/..
git tree:   upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1040fc41e0
kernel config:  https://syzkaller.appspot.com/x/.config?x=1d189d07c6717979
dashboard link: https://syzkaller.appspot.com/bug?extid=e5fd3e65515b48c02a30
compiler:   gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

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

==
BUG: KASAN: vmalloc-out-of-bounds in bitfill_aligned  
drivers/video/fbdev/core/sysfillrect.c:54 [inline]
BUG: KASAN: vmalloc-out-of-bounds in bitfill_aligned+0x356/0x410  
drivers/video/fbdev/core/sysfillrect.c:25

Write of size 8 at addr c90008b11000 by task syz-executor.2/9476

CPU: 2 PID: 9476 Comm: syz-executor.2 Not tainted 5.4.0-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS  
rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014

Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x197/0x210 lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0x5/0x30b mm/kasan/report.c:374
 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
 kasan_report+0x12/0x20 mm/kasan/common.c:638
 __asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:140
 bitfill_aligned drivers/video/fbdev/core/sysfillrect.c:54 [inline]
 bitfill_aligned+0x356/0x410 drivers/video/fbdev/core/sysfillrect.c:25
 sys_fillrect+0x421/0x7c0 drivers/video/fbdev/core/sysfillrect.c:291
 drm_fb_helper_sys_fillrect+0x21/0x190 drivers/gpu/drm/drm_fb_helper.c:736
 bit_clear_margins+0x30b/0x530 drivers/video/fbdev/core/bitblit.c:232
 fbcon_clear_margins+0x1e9/0x250 drivers/video/fbdev/core/fbcon.c:1372
 fbcon_switch+0xd7f/0x17f0 drivers/video/fbdev/core/fbcon.c:2354
 redraw_screen+0x2b6/0x7d0 drivers/tty/vt/vt.c:997
 fbcon_modechanged+0x5c3/0x790 drivers/video/fbdev/core/fbcon.c:2991
 fbcon_update_vcs+0x42/0x50 drivers/video/fbdev/core/fbcon.c:3038
 fb_set_var+0xb32/0xdd0 drivers/video/fbdev/core/fbmem.c:1051
 do_fb_ioctl+0x390/0x7d0 drivers/video/fbdev/core/fbmem.c:1104
 fb_ioctl+0xe6/0x130 drivers/video/fbdev/core/fbmem.c:1180
 vfs_ioctl fs/ioctl.c:47 [inline]
 file_ioctl fs/ioctl.c:545 [inline]
 do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
 __do_sys_ioctl fs/ioctl.c:756 [inline]
 __se_sys_ioctl fs/ioctl.c:754 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45a759
Code: bd b1 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7  
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff  
ff 0f 83 8b b1 fb ff c3 66 2e 0f 1f 84 00 00 00 00

RSP: 002b:7f8280324c88 EFLAGS: 0246 ORIG_RAX: 0010
RAX: ffda RBX: 0072bf00 RCX: 0045a759
RDX: 2040 RSI: 4601 RDI: 0003
RBP: 0003 R08:  R09: 
R10:  R11: 0246 R12: 7f82803256d4
R13: 004a9e78 R14: 006ec2d8 R15: 


Memory state around the buggy address:
 c90008b10f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c90008b10f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

c90008b11000: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9

   ^
 c90008b11080: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
 c90008b11100: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
==


---
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 syzkal...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel