syzbot


KASAN: slab-out-of-bounds Read in do_update_region

Status: auto-closed as invalid on 2020/11/15 02:32
Reported-by: syzbot+140b8da1d97d42994963@syzkaller.appspotmail.com
First crash: 1381d, last: 1375d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: slab-out-of-bounds Read in do_update_region 3 1475d 1581d 0/1 auto-closed as invalid on 2020/08/07 12:02
upstream KASAN: slab-out-of-bounds Read in do_update_region serial 1 1317d 1317d 0/26 auto-closed as invalid on 2021/01/12 06:55

Sample crash report:
overlayfs: failed to resolve './fil': -2
overlayfs: failed to resolve './file': -2
==================================================================
BUG: KASAN: slab-out-of-bounds in do_update_region+0x5aa/0x630 drivers/tty/vt/vt.c:671
Read of size 2 at addr ffff8882196f9400 by task syz-executor.1/20639

CPU: 1 PID: 20639 Comm: syz-executor.1 Not tainted 4.19.133-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2fe lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load2_noabort+0x88/0x90 mm/kasan/report.c:431
 do_update_region+0x5aa/0x630 drivers/tty/vt/vt.c:671
 update_region+0x144/0x190 drivers/tty/vt/vt.c:701
 vcs_write+0x403/0xc30 drivers/tty/vt/vc_screen.c:604
 __vfs_write+0xf7/0x770 fs/read_write.c:485
 vfs_write+0x1f3/0x540 fs/read_write.c:549
 ksys_write+0x12b/0x2a0 fs/read_write.c:599
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c1d9
Code: 8d b6 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 5b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fe9df2e2c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000036a00 RCX: 000000000045c1d9
RDX: 0000000000000d87 RSI: 0000000020000300 RDI: 0000000000000003
RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c
R13: 00007ffeaf4ae73f R14: 00007fe9df2e39c0 R15: 000000000078bf0c

Allocated by task 1:
 __do_kmalloc mm/slab.c:3727 [inline]
 __kmalloc+0x15a/0x3c0 mm/slab.c:3736
 kmalloc include/linux/slab.h:520 [inline]
 kzalloc include/linux/slab.h:709 [inline]
 vc_do_resize+0x2fc/0x1440 drivers/tty/vt/vt.c:1220
 fbcon_init+0x1320/0x1f20 drivers/video/fbdev/core/fbcon.c:1179
 visual_init+0x332/0x5f0 drivers/tty/vt/vt.c:1072
 do_bind_con_driver.isra.0+0x55b/0x910 drivers/tty/vt/vt.c:3544
 do_take_over_console+0x423/0x570 drivers/tty/vt/vt.c:4105
 do_fbcon_takeover+0x10b/0x210 drivers/video/fbdev/core/fbcon.c:556
 fbcon_fb_registered drivers/video/fbdev/core/fbcon.c:3231 [inline]
 fbcon_event_notify+0x17c1/0x1d80 drivers/video/fbdev/core/fbcon.c:3361
 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93
 __blocking_notifier_call_chain kernel/notifier.c:317 [inline]
 __blocking_notifier_call_chain kernel/notifier.c:304 [inline]
 blocking_notifier_call_chain kernel/notifier.c:328 [inline]
 blocking_notifier_call_chain+0x85/0xa0 kernel/notifier.c:325
 do_register_framebuffer drivers/video/fbdev/core/fbmem.c:1708 [inline]
 register_framebuffer+0x5df/0x9e0 drivers/video/fbdev/core/fbmem.c:1831
 vga16fb_probe+0x6b4/0x7b7 drivers/video/fbdev/vga16fb.c:1373
 platform_drv_probe+0x8d/0x160 drivers/base/platform.c:584
 really_probe+0x58c/0x7e0 drivers/base/dd.c:503
 driver_probe_device+0xf9/0x200 drivers/base/dd.c:664
 __device_attach_driver+0x28b/0x310 drivers/base/dd.c:751
 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:464
 __device_attach+0x298/0x3d0 drivers/base/dd.c:817
 bus_probe_device+0x1ea/0x2a0 drivers/base/bus.c:524
 device_add+0xac3/0x1610 drivers/base/core.c:2154
 platform_device_add+0x355/0x6e0 drivers/base/platform.c:420
 vga16fb_init+0x152/0x1c8 drivers/video/fbdev/vga16fb.c:1431
 do_one_initcall+0xf1/0x734 init/main.c:885
 do_initcall_level init/main.c:953 [inline]
 do_initcalls init/main.c:961 [inline]
 do_basic_setup init/main.c:979 [inline]
 kernel_init_freeable+0x9ab/0xa9d init/main.c:1146
 kernel_init+0xd/0x1b9 init/main.c:1063
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8882196f8140
 which belongs to the cache kmalloc-8192 of size 8192
The buggy address is located 4800 bytes inside of
 8192-byte region [ffff8882196f8140, ffff8882196fa140)
The buggy address belongs to the page:
page:ffffea000865be00 count:1 mapcount:0 mapping:ffff88812c395080 index:0x0 compound_mapcount: 0
flags: 0x57ffe0000008100(slab|head)
raw: 057ffe0000008100 ffffea000865bb08 ffffea0008627708 ffff88812c395080
raw: 0000000000000000 ffff8882196f8140 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8882196f9300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8882196f9380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8882196f9400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff8882196f9480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8882196f9500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/18 02:31 linux-4.19.y 17a87580a885 9c812472 .config console log report ci2-linux-4-19
2020/07/11 21:05 linux-4.19.y dce0f88600e4 7ba05d2d .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.