syzbot


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

Status: upstream: reported C repro on 2019/12/03 02:00
Reported-by: syzbot+4a3deed68e604c42d3a7@syzkaller.appspotmail.com
First crash: 1660d, last: 1364d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: slab-out-of-bounds Read in fbcon_get_font C done 97 1352d 1660d 1/1 fixed on 2020/11/05 11:24
upstream KASAN: slab-out-of-bounds Read in fbcon_get_font fbdev C done inconclusive 137 1353d 1659d 0/27 auto-obsoleted due to no activity on 2022/09/25 10:38
Last patch testing requests (8)
Created Duration User Patch Repo Result
2023/02/03 16:32 11m retest repro linux-4.14.y report log
2023/02/03 13:32 15m retest repro linux-4.14.y report log
2023/02/03 12:32 0m retest repro linux-4.14.y error OK
2023/02/03 11:32 0m retest repro linux-4.14.y error OK
2022/09/13 04:27 9m retest repro linux-4.14.y report log
2022/09/13 03:27 9m retest repro linux-4.14.y report log
2022/09/13 02:27 8m retest repro linux-4.14.y report log
2022/09/13 01:27 8m retest repro linux-4.14.y report log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2020/06/24 00:34 0m bisect fix linux-4.14.y error job log (0)
2020/05/20 12:30 25m bisect fix linux-4.14.y job log (0) log
2020/03/03 09:44 25m bisect fix linux-4.14.y job log (0) log

Sample crash report:
IPv6: ADDRCONF(NETDEV_UP): team0: link is not ready
8021q: adding VLAN 0 to HW filter on device team0
IPv6: ADDRCONF(NETDEV_UP): veth0_to_bond: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_bond: link becomes ready
==================================================================
BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:347 [inline]
BUG: KASAN: slab-out-of-bounds in fbcon_get_font+0x288/0x550 drivers/video/fbdev/core/fbcon.c:2421
Read of size 5 at addr ffff8880a50a360c by task syz-executor128/7088

CPU: 0 PID: 7088 Comm: syz-executor128 Not tainted 4.14.158-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+0x142/0x197 lib/dump_stack.c:58
 print_address_description.cold+0x7c/0x1dc 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/0x2af mm/kasan/report.c:393
 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:347 [inline]
 fbcon_get_font+0x288/0x550 drivers/video/fbdev/core/fbcon.c:2421
 con_font_get drivers/tty/vt/vt.c:4078 [inline]
 con_font_op+0x1d5/0x1060 drivers/tty/vt/vt.c:4229
 vt_ioctl+0xb80/0x2170 drivers/tty/vt/vt_ioctl.c:927
 tty_ioctl+0x841/0x1320 drivers/tty/tty_io.c:2661
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x447f99
RSP: 002b:00007fc02c69fdb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006ddc48 RCX: 0000000000447f99
RDX: 0000000020000140 RSI: 0000000000004b60 RDI: 0000000000000003
RBP: 00000000006ddc40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006ddc4c
R13: 00007ffcb45d497f R14: 00007fc02c6a09c0 R15: 00000000006ddc4c

Allocated by task 7076:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
 save_stack+0x45/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc mm/kasan/kasan.c:551 [inline]
 kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529
 __do_kmalloc mm/slab.c:3720 [inline]
 __kmalloc+0x15d/0x7a0 mm/slab.c:3729
 kmalloc include/linux/slab.h:493 [inline]
 fbcon_set_font+0x2f8/0x7b0 drivers/video/fbdev/core/fbcon.c:2618
 con_font_set drivers/tty/vt/vt.c:4162 [inline]
 con_font_op+0xc0f/0x1060 drivers/tty/vt/vt.c:4227
 vt_ioctl+0xb80/0x2170 drivers/tty/vt/vt_ioctl.c:927
 tty_ioctl+0x841/0x1320 drivers/tty/tty_io.c:2661
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8880a50a3200
 which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 1036 bytes inside of
 2048-byte region [ffff8880a50a3200, ffff8880a50a3a00)
The buggy address belongs to the page:
page:ffffea0002942880 count:1 mapcount:0 mapping:ffff8880a50a2100 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffff8880a50a2100 0000000000000000 0000000100000003
raw: ffffea0002807620 ffffea0002838e20 ffff8880aa800c40 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a50a3500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880a50a3580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880a50a3600: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                         ^
 ffff8880a50a3680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a50a3700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (35):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/13 11:02 linux-4.14.y a844dc4c5442 2a752b7c .config console log report syz C ci2-linux-4-14
2019/12/08 18:55 linux-4.14.y a844dc4c5442 1508f453 .config console log report syz C ci2-linux-4-14
2019/12/03 00:59 linux-4.14.y fbc5fe7a54d0 ab342da3 .config console log report syz C ci2-linux-4-14
2020/01/03 15:19 linux-4.14.y 4c5bf01e16a7 9dcc1191 .config console log report syz ci2-linux-4-14
2020/09/23 08:47 linux-4.14.y cbfa1702aaf6 287cd75a .config console log report info ci2-linux-4-14
2020/09/05 10:20 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/08/30 01:22 linux-4.14.y d7e78d08fa77 d5a3ae1f .config console log report ci2-linux-4-14
2020/08/26 21:08 linux-4.14.y d7e78d08fa77 318430cb .config console log report ci2-linux-4-14
2020/08/26 20:19 linux-4.14.y d7e78d08fa77 318430cb .config console log report ci2-linux-4-14
2020/08/06 18:38 linux-4.14.y ca4f2c56d416 4ca1c0ea .config console log report ci2-linux-4-14
2020/07/27 01:43 linux-4.14.y 69b94dd6dcd1 51265195 .config console log report ci2-linux-4-14
2020/07/24 11:50 linux-4.14.y 69b94dd6dcd1 554af388 .config console log report ci2-linux-4-14
2020/07/12 05:03 linux-4.14.y b850307b279c 7ba05d2d .config console log report ci2-linux-4-14
2020/07/05 01:45 linux-4.14.y b850307b279c 24d7f505 .config console log report ci2-linux-4-14
2020/07/01 09:42 linux-4.14.y b850307b279c c0383ebe .config console log report ci2-linux-4-14
2020/05/24 23:26 linux-4.14.y a41ba30d9df2 ce7ca010 .config console log report ci2-linux-4-14
2020/04/20 12:30 linux-4.14.y c10b57a567e4 347a5dc3 .config console log report ci2-linux-4-14
2020/04/20 10:26 linux-4.14.y c10b57a567e4 347a5dc3 .config console log report ci2-linux-4-14
2020/03/25 05:46 linux-4.14.y 01364dad1d45 41f049cc .config console log report ci2-linux-4-14
2020/03/23 18:36 linux-4.14.y 01364dad1d45 84f999d6 .config console log report ci2-linux-4-14
2020/03/23 00:46 linux-4.14.y 01364dad1d45 78267cec .config console log report ci2-linux-4-14
2020/03/19 20:05 linux-4.14.y 12cd844a39ed 2c31c529 .config console log report ci2-linux-4-14
2020/03/17 15:21 linux-4.14.y 12cd844a39ed 749688d2 .config console log report ci2-linux-4-14
2020/03/17 06:57 linux-4.14.y 12cd844a39ed 749688d2 .config console log report ci2-linux-4-14
2020/03/16 20:49 linux-4.14.y 12cd844a39ed 749688d2 .config console log report ci2-linux-4-14
2020/03/16 06:56 linux-4.14.y 12cd844a39ed 749688d2 .config console log report ci2-linux-4-14
2020/03/16 04:29 linux-4.14.y 12cd844a39ed 749688d2 .config console log report ci2-linux-4-14
2020/03/10 16:47 linux-4.14.y 78d697fc93f9 35f53e45 .config console log report ci2-linux-4-14
2020/03/05 12:39 linux-4.14.y 78d697fc93f9 b655d91b .config console log report ci2-linux-4-14
2020/03/04 04:06 linux-4.14.y 78d697fc93f9 1f73b64b .config console log report ci2-linux-4-14
2020/03/03 09:57 linux-4.14.y 78d697fc93f9 350a7a26 .config console log report ci2-linux-4-14
2020/02/02 09:26 linux-4.14.y 9fa690a2a016 2274ad39 .config console log report ci2-linux-4-14
2020/01/13 12:37 linux-4.14.y 6d0c334a400d 99565c1a .config console log report ci2-linux-4-14
2020/01/10 23:44 linux-4.14.y b0cdffaa546e 532ec44e .config console log report ci2-linux-4-14
2019/12/14 09:41 linux-4.14.y a844dc4c5442 eef6e580 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.