syzbot


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

Status: auto-closed as invalid on 2020/08/07 12:02
Reported-by: syzbot+9574c504cb9564f01884@syzkaller.appspotmail.com
First crash: 918d, last: 811d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in do_update_region 1 653d 653d 0/22 auto-closed as invalid on 2021/01/12 06:55
linux-4.19 KASAN: slab-out-of-bounds Read in do_update_region 2 711d 718d 0/1 auto-closed as invalid on 2020/11/15 02:32

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in do_update_region+0x567/0x5b0 drivers/tty/vt/vt.c:361
Read of size 2 at addr ffff8880a5bfd3c0 by task syz-executor.0/20583

CPU: 0 PID: 20583 Comm: syz-executor.0 Not tainted 4.14.175-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x13e/0x194 lib/dump_stack.c:58
 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393
 do_update_region+0x567/0x5b0 drivers/tty/vt/vt.c:361
 update_region drivers/tty/vt/vt.c:391 [inline]
 update_region+0xdd/0x130 drivers/tty/vt/vt.c:385
 vcs_write+0x30d/0xa80 drivers/tty/vt/vc_screen.c:549
 __vfs_write+0xe4/0x630 fs/read_write.c:480
 __kernel_write+0xf5/0x330 fs/read_write.c:501
 write_pipe_buf+0x143/0x1b0 fs/splice.c:797
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x332/0x740 fs/splice.c:626
 splice_from_pipe+0xc6/0x120 fs/splice.c:661
 default_file_splice_write+0x37/0x80 fs/splice.c:809
 do_splice_from fs/splice.c:851 [inline]
 do_splice fs/splice.c:1147 [inline]
 SYSC_splice fs/splice.c:1402 [inline]
 SyS_splice+0xca0/0x1230 fs/splice.c:1382
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45c889
RSP: 002b:00007f9ec2ec2c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f9ec2ec36d4 RCX: 000000000045c889
RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 000000000076bf00 R08: 000000000040003e R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000ba2 R14: 00000000004ce6ca R15: 000000000076bf0c

Allocated by task 1:
 save_stack+0x32/0xa0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc mm/kasan/kasan.c:551 [inline]
 kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529
 __do_kmalloc mm/slab.c:3720 [inline]
 __kmalloc+0x15b/0x7c0 mm/slab.c:3729
 kmalloc include/linux/slab.h:493 [inline]
 kzalloc include/linux/slab.h:661 [inline]
 vc_do_resize+0x1c1/0xde0 drivers/tty/vt/vt.c:885
 fbcon_init+0xf83/0x19a0 drivers/video/fbdev/core/fbcon.c:1157
 visual_init+0x332/0x5e0 drivers/tty/vt/vt.c:746
 do_bind_con_driver+0x4de/0x7f0 drivers/tty/vt/vt.c:3204
 do_take_over_console+0x3ef/0x4f0 drivers/tty/vt/vt.c:3765
 do_fbcon_takeover+0xe4/0x1c0 drivers/video/fbdev/core/fbcon.c:545
 fbcon_fb_registered drivers/video/fbdev/core/fbcon.c:3183 [inline]
 fbcon_event_notify+0x12e6/0x1746 drivers/video/fbdev/core/fbcon.c:3313
 notifier_call_chain+0x107/0x1a0 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+0x79/0x90 kernel/notifier.c:325
 do_register_framebuffer drivers/video/fbdev/core/fbmem.c:1719 [inline]
 register_framebuffer+0x512/0x8f0 drivers/video/fbdev/core/fbmem.c:1839
 vga16fb_probe+0x6a7/0x79c drivers/video/fbdev/vga16fb.c:1374
 platform_drv_probe+0x85/0x170 drivers/base/platform.c:583
 really_probe drivers/base/dd.c:408 [inline]
 driver_probe_device+0x4ab/0x670 drivers/base/dd.c:551
 __device_attach_driver+0x1fd/0x290 drivers/base/dd.c:647
 bus_for_each_drv+0x145/0x1b0 drivers/base/bus.c:466
 __device_attach+0x1dd/0x2c0 drivers/base/dd.c:704
 bus_probe_device+0x1db/0x290 drivers/base/bus.c:526
 device_add+0xa0a/0x1400 drivers/base/core.c:1917
 platform_device_add+0x2ec/0x660 drivers/base/platform.c:421
 vga16fb_init+0x11e/0x173 drivers/video/fbdev/vga16fb.c:1432
 do_one_initcall+0x88/0x202 init/main.c:824
 do_initcall_level init/main.c:890 [inline]
 do_initcalls init/main.c:898 [inline]
 do_basic_setup init/main.c:916 [inline]
 kernel_init_freeable+0x465/0x526 init/main.c:1073
 kernel_init+0xd/0x15b init/main.c:998
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8880a5bfc100
 which belongs to the cache kmalloc-8192 of size 8192
The buggy address is located 4800 bytes inside of
 8192-byte region [ffff8880a5bfc100, ffff8880a5bfe100)
The buggy address belongs to the page:
page:ffffea000296ff00 count:1 mapcount:0 mapping:ffff8880a5bfc100 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffff8880a5bfc100 0000000000000000 0000000100000001
raw: ffffea0002991220 ffffea00028d2d20 ffff88812fe55080 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a5bfd280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880a5bfd300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880a5bfd380: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
                                           ^
 ffff8880a5bfd400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a5bfd480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2020/04/09 12:01 linux-4.14.y 4520f06b03ae a8c6a3f8 .config log report
ci2-linux-4-14 2020/03/11 11:44 linux-4.14.y 78d697fc93f9 e103bc9e .config log report
ci2-linux-4-14 2019/12/24 16:39 linux-4.14.y e1f7d50ae3a3 be5c2c81 .config log report