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=137f877ae00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=d306897dc6e131b7
dashboard link:
https://syzkaller.appspot.com/bug?extid=efcd56750666f3cd2831
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=175b3edae00000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=136b9446e00000
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+efcd56...@syzkaller.appspotmail.com
audit: type=1400 audit(1575320817.081:36): avc: denied { map } for
pid=7633 comm="syz-executor404" path="/root/syz-executor404204206"
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
==================================================================
BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:348 [inline]
BUG: KASAN: slab-out-of-bounds in fbcon_get_font+0x2b2/0x5e0
drivers/video/fbdev/core/fbcon.c:2443
Read of size 16 at addr ffff88808ad25710 by task syz-executor404/7633
CPU: 0 PID: 7633 Comm: syz-executor404 Not tainted 4.19.87-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+0x197/0x210 lib/dump_stack.c:118
print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report mm/kasan/report.c:412 [inline]
kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
memcpy+0x24/0x50 mm/kasan/kasan.c:302
memcpy include/linux/string.h:348 [inline]
fbcon_get_font+0x2b2/0x5e0 drivers/video/fbdev/core/fbcon.c:2443
con_font_get drivers/tty/vt/vt.c:4400 [inline]
con_font_op+0x20b/0x1250 drivers/tty/vt/vt.c:4559
vt_ioctl+0x1784/0x2530 drivers/tty/vt/vt_ioctl.c:965
tty_ioctl+0x7f3/0x1510 drivers/tty/tty_io.c:2669
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4444d9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 7b d8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff165a01a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fff165a01b0 RCX: 00000000004444d9
RDX: 0000000020000440 RSI: 0000000000004b72 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000400da0
R10: 00007fff1659fcf0 R11: 0000000000000246 R12: 00000000004021e0
R13: 0000000000402270 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 7633:
save_stack+0x45/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc mm/kasan/kasan.c:553 [inline]
kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531
__do_kmalloc mm/slab.c:3727 [inline]
__kmalloc+0x15d/0x750 mm/slab.c:3736
kmalloc include/linux/slab.h:520 [inline]
fbcon_set_font+0x32d/0x860 drivers/video/fbdev/core/fbcon.c:2641
con_font_set drivers/tty/vt/vt.c:4492 [inline]
con_font_op+0xe18/0x1250 drivers/tty/vt/vt.c:4557
vt_ioctl+0xd2e/0x2530 drivers/tty/vt/vt_ioctl.c:913
tty_ioctl+0x7f3/0x1510 drivers/tty/tty_io.c:2669
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 0:
(stack is not available)
The buggy address belongs to the object at ffff88808ad24d00
which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 2576 bytes inside of
4096-byte region [ffff88808ad24d00, ffff88808ad25d00)
The buggy address belongs to the page:
page:ffffea00022b4900 count:1 mapcount:0 mapping:ffff88812c31cdc0 index:0x0
compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffffea000231a988 ffff88812c314a48 ffff88812c31cdc0
raw: 0000000000000000 ffff88808ad24d00 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88808ad25600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88808ad25680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff88808ad25700: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88808ad25780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88808ad25800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
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