syzbot


KASAN: use-after-free Read in soft_cursor (2)

Status: auto-closed as invalid on 2021/04/26 05:01
Reported-by: syzbot+f38afbdfe62001b1294c@syzkaller.appspotmail.com
First crash: 1466d, last: 1428d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in soft_cursor fbdev C done inconclusive 12 1538d 1814d 0/28 auto-obsoleted due to no activity on 2022/09/23 11:46
linux-4.19 KASAN: use-after-free Read in soft_cursor C done 16 1519d 1816d 1/1 fixed on 2020/10/26 21:28
linux-4.14 KASAN: use-after-free Read in soft_cursor C inconclusive 7 1306d 1816d 0/1 upstream: reported C repro on 2019/12/04 13:11

Sample crash report:
XFS (loop3): Invalid superblock magic number
XFS (loop3): Invalid superblock magic number
==================================================================
BUG: KASAN: use-after-free in soft_cursor+0x96b/0xa30 drivers/video/fbdev/core/softcursor.c:61
Read of size 1 at addr ffff8880a33d45f0 by task kworker/0:3/2362

CPU: 0 PID: 2362 Comm: kworker/0:3 Not tainted 4.19.163-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_power_efficient fb_flashcursor
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_load1_noabort+0x88/0x90 mm/kasan/report.c:430
 soft_cursor+0x96b/0xa30 drivers/video/fbdev/core/softcursor.c:61
 bit_cursor+0x1126/0x1740 drivers/video/fbdev/core/bitblit.c:377
 fb_flashcursor+0x38c/0x430 drivers/video/fbdev/core/fbcon.c:379
 process_one_work+0x864/0x1570 kernel/workqueue.c:2155
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Allocated by task 3973:
 __do_kmalloc_node mm/slab.c:3689 [inline]
 __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3703
 __kmalloc_reserve net/core/skbuff.c:137 [inline]
 __alloc_skb+0xae/0x560 net/core/skbuff.c:205
 alloc_skb include/linux/skbuff.h:995 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1190 [inline]
 netlink_sendmsg+0x9ee/0xc40 net/netlink/af_netlink.c:1884
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:632
 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2115
 __sys_sendmmsg+0x195/0x470 net/socket.c:2210
 __do_sys_sendmmsg net/socket.c:2239 [inline]
 __se_sys_sendmmsg net/socket.c:2236 [inline]
 __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2236
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 3973:
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 mm/slab.c:3822
 skb_free_head net/core/skbuff.c:554 [inline]
 skb_release_data+0x6de/0x920 net/core/skbuff.c:574
 skb_release_all net/core/skbuff.c:631 [inline]
 __kfree_skb net/core/skbuff.c:645 [inline]
 consume_skb+0x113/0x3d0 net/core/skbuff.c:705
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x4dd/0x690 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1909
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:632
 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2115
 __sys_sendmmsg+0x195/0x470 net/socket.c:2210
 __do_sys_sendmmsg net/socket.c:2239 [inline]
 __se_sys_sendmmsg net/socket.c:2236 [inline]
 __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2236
 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 ffff8880a33d4580
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 112 bytes inside of
 512-byte region [ffff8880a33d4580, ffff8880a33d4780)
The buggy address belongs to the page:
page:ffffea00028cf500 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff8880a33d4800
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea000272e588 ffffea0002a22408 ffff88813bff0940
raw: ffff8880a33d4800 ffff8880a33d4080 0000000100000002 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a33d4480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a33d4500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a33d4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                             ^
 ffff8880a33d4600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880a33d4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/27 05:00 linux-4.19.y 13d2ce42de8c 821e0b09 .config console log report info ci2-linux-4-19
2020/11/18 19:47 linux-4.19.y 2c746135a12e 0767f13f .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.