syzbot


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

Status: auto-closed as invalid on 2020/08/12 11:53
Reported-by: syzbot+5c33faac95cbacbed812@syzkaller.appspotmail.com
First crash: 1763d, last: 1685d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in fb_pad_aligned_buffer fbdev 7 1624d 1769d 0/28 auto-closed as invalid on 2020/10/12 11:59

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
==================================================================
BUG: KASAN: slab-out-of-bounds in __fb_pad_aligned_buffer include/linux/fb.h:674 [inline]
BUG: KASAN: slab-out-of-bounds in fb_pad_aligned_buffer+0x137/0x150 drivers/video/fbdev/core/fbmem.c:122
Read of size 1 at addr ffff8880a7da106e by task syz-executor.1/8044

CPU: 1 PID: 8044 Comm: syz-executor.1 Not tainted 4.19.115-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+0x188/0x20d lib/dump_stack.c:118
 print_address_description.cold+0x7c/0x212 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+0x88/0x2b9 mm/kasan/report.c:396
 __fb_pad_aligned_buffer include/linux/fb.h:674 [inline]
 fb_pad_aligned_buffer+0x137/0x150 drivers/video/fbdev/core/fbmem.c:122
 bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:99 [inline]
 bit_putcs+0xc21/0xe10 drivers/video/fbdev/core/bitblit.c:185
 fbcon_putcs+0x434/0x4f0 drivers/video/fbdev/core/fbcon.c:1323
 do_update_region+0x398/0x630 drivers/tty/vt/vt.c:677
 redraw_screen+0x5e1/0x870 drivers/tty/vt/vt.c:1025
 vc_do_resize+0x108e/0x1380 drivers/tty/vt/vt.c:1311
 vt_ioctl+0x1fa2/0x2500 drivers/tty/vt/vt_ioctl.c:901
 tty_ioctl+0x7a1/0x1420 drivers/tty/tty_io.c:2669
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcda/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c889
Code: ad 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fce5b304c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fce5b3056d4 RCX: 000000000045c889
RDX: 0000000020000040 RSI: 000000000000560a RDI: 0000000000000003
RBP: 000000000076bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 000000000000066c R14: 00000000004c944e R15: 000000000076bf0c

Allocated by task 3724:
 set_track mm/kasan/kasan.c:460 [inline]
 kasan_kmalloc mm/kasan/kasan.c:553 [inline]
 kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531
 __do_kmalloc mm/slab.c:3727 [inline]
 __kmalloc+0x15b/0x770 mm/slab.c:3736
 kmalloc include/linux/slab.h:520 [inline]
 fbcon_set_font+0x331/0x870 drivers/video/fbdev/core/fbcon.c:2644
 con_font_set drivers/tty/vt/vt.c:4523 [inline]
 con_font_op+0xd3e/0x1130 drivers/tty/vt/vt.c:4588
 vt_ioctl+0x16f1/0x2500 drivers/tty/vt/vt_ioctl.c:980
 tty_ioctl+0x7a1/0x1420 drivers/tty/tty_io.c:2669
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcda/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 2878:
 set_track mm/kasan/kasan.c:460 [inline]
 __kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xce/0x220 mm/slab.c:3822
 kobject_uevent_env+0x29e/0x1160 lib/kobject_uevent.c:623
 device_add+0xade/0x1660 drivers/base/core.c:2153
 netdev_register_kobject+0x180/0x3b0 net/core/net-sysfs.c:1765
 register_netdevice+0x7f7/0xf50 net/core/dev.c:8709
 bond_newlink drivers/net/bonding/bond_netlink.c:453 [inline]
 bond_newlink+0x47/0xa0 drivers/net/bonding/bond_netlink.c:443
 rtnl_newlink+0xf03/0x1440 net/core/rtnetlink.c:3141
 rtnetlink_rcv_msg+0x453/0xaf0 net/core/rtnetlink.c:4777
 netlink_rcv_skb+0x160/0x410 net/netlink/af_netlink.c:2455
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x4d7/0x6a0 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x80b/0xcd0 net/netlink/af_netlink.c:1909
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:632
 ___sys_sendmsg+0x803/0x920 net/socket.c:2115
 __sys_sendmsg+0xec/0x1b0 net/socket.c:2153
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880a7da05c0
 which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 2734 bytes inside of
 4096-byte region [ffff8880a7da05c0, ffff8880a7da15c0)
The buggy address belongs to the page:
page:ffffea00029f6800 count:1 mapcount:0 mapping:ffff88812c3dcdc0 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffffea000238af88 ffffea000160d288 ffff88812c3dcdc0
raw: 0000000000000000 ffff8880a7da05c0 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a7da0f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a7da0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a7da1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                          ^
 ffff8880a7da1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a7da1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/04/14 11:52 linux-4.19.y 6dd0e32665e5 3f3c5574 .config console log report ci2-linux-4-19
2020/03/01 16:50 linux-4.19.y a083db76118d c88c7b75 .config console log report ci2-linux-4-19
2020/01/28 04:24 linux-4.19.y 88d6de67e390 56cd6c9b .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.