syzbot


KASAN: use-after-free Read in tasklet_action

Status: upstream: reported C repro on 2020/06/04 19:11
Reported-by: syzbot+6e383a6434b67479431f@syzkaller.appspotmail.com
First crash: 1666d, last: 677d
Fix bisection attempts (23)
Created Duration User Patch Repo Result
2023/02/19 00:09 28m bisect fix linux-4.14.y OK (0) job log log
2023/01/19 15:21 22m bisect fix linux-4.14.y OK (0) job log log
2022/10/26 11:10 28m bisect fix linux-4.14.y OK (0) job log log
2022/09/16 16:42 20m bisect fix linux-4.14.y OK (0) job log log
2022/08/17 16:19 23m bisect fix linux-4.14.y OK (0) job log log
2022/06/28 09:02 19m bisect fix linux-4.14.y OK (0) job log log
2022/05/29 00:39 23m bisect fix linux-4.14.y OK (0) job log log
2022/04/28 23:38 21m bisect fix linux-4.14.y OK (0) job log log
2022/03/29 23:11 26m bisect fix linux-4.14.y OK (0) job log log
2022/02/27 22:45 26m bisect fix linux-4.14.y OK (0) job log log
2021/11/15 10:04 30m bisect fix linux-4.14.y OK (0) job log log
2021/10/16 09:29 34m bisect fix linux-4.14.y OK (0) job log log
2021/09/16 06:22 34m bisect fix linux-4.14.y OK (0) job log log
2021/08/17 05:52 29m bisect fix linux-4.14.y OK (0) job log log
2021/07/17 23:49 31m bisect fix linux-4.14.y OK (0) job log log
2021/06/17 23:20 29m bisect fix linux-4.14.y OK (0) job log log
2021/05/18 22:43 36m bisect fix linux-4.14.y OK (0) job log log
2021/04/18 22:09 33m bisect fix linux-4.14.y OK (0) job log log
2021/02/04 13:14 0m bisect fix linux-4.14.y error job log
2021/01/01 05:32 31m bisect fix linux-4.14.y OK (0) job log log
2020/12/02 04:47 44m bisect fix linux-4.14.y OK (0) job log log
2020/11/02 04:12 35m bisect fix linux-4.14.y OK (0) job log log
2020/08/28 01:09 35m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in tasklet_action+0x29f/0x340 kernel/softirq.c:506
Read of size 8 at addr ffff8880a55dfc10 by task ksoftirqd/1/17

CPU: 1 PID: 17 Comm: ksoftirqd/1 Not tainted 4.14.258-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+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 tasklet_action+0x29f/0x340 kernel/softirq.c:506
 __do_softirq+0x24d/0x9ff kernel/softirq.c:288
 run_ksoftirqd+0x50/0x1a0 kernel/softirq.c:670
 smpboot_thread_fn+0x5c1/0x920 kernel/smpboot.c:164
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Allocated by task 8874:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618
 kmalloc include/linux/slab.h:488 [inline]
 kzalloc include/linux/slab.h:661 [inline]
 bcm_tx_setup net/can/bcm.c:960 [inline]
 bcm_sendmsg+0x20bb/0x3ae0 net/can/bcm.c:1396
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 8874:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 bcm_release+0x255/0x900 net/can/bcm.c:1571
 __sock_release+0xcd/0x2b0 net/socket.c:602
 sock_close+0x15/0x20 net/socket.c:1139
 __fput+0x25f/0x7a0 fs/file_table.c:210
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:191 [inline]
 exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff8880a55dfb40
 which belongs to the cache kmalloc-1024 of size 1024
The buggy address is located 208 bytes inside of
 1024-byte region [ffff8880a55dfb40, ffff8880a55dff40)
The buggy address belongs to the page:
page:ffffea0002957780 count:1 mapcount:0 mapping:ffff8880a55de040 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880a55de040 0000000000000000 0000000100000007
raw: ffffea00029466a0 ffff88813fe75848 ffff88813fe74ac0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a55dfb00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
 ffff8880a55dfb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880a55dfc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                         ^
 ffff8880a55dfc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880a55dfd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (41):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/15 17:01 linux-4.14.y 9dfbac0e6b86 f752fb53 .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2020/06/05 03:53 linux-4.14.y c6db52a88798 2420d1bc .config console log report syz C ci2-linux-4-14
2022/07/18 16:19 linux-4.14.y 424a46ea058e ff988920 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2022/01/28 22:45 linux-4.14.y bbb957e1bd4a 495e00c5 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2022/01/27 16:54 linux-4.14.y bbb957e1bd4a 64a8e201 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2022/01/27 16:37 linux-4.14.y bbb957e1bd4a 64a8e201 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2022/01/27 09:02 linux-4.14.y bbb957e1bd4a 2cbffd88 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2022/01/25 15:52 linux-4.14.y 4ba8e26127c3 2cbffd88 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2022/01/25 13:02 linux-4.14.y 4ba8e26127c3 2cbffd88 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2022/01/15 05:01 linux-4.14.y 4ba8e26127c3 723cfaf0 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2022/01/03 16:09 linux-4.14.y a6ca7c65b137 4a3f34f2 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/12/29 10:36 linux-4.14.y 8ee0807eedf3 76c8cf06 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/12/28 17:01 linux-4.14.y 8ee0807eedf3 76c8cf06 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/12/27 14:19 linux-4.14.y 8ee0807eedf3 5140bd58 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/12/25 07:01 linux-4.14.y 8ee0807eedf3 6caa12e4 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/12/13 13:25 linux-4.14.y c01d4d1b885d 0304899b .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/12/10 06:48 linux-4.14.y c01d4d1b885d 4d4ce9bc .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/12/07 19:12 linux-4.14.y 66722c42ec91 0230ba3e .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/03/19 21:57 linux-4.14.y cb83ddcd5332 3d01c4de .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/03/05 19:58 linux-4.14.y 397a88b2cc86 4a024a9b .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/02/24 04:21 linux-4.14.y 3242aa3a635c fcc6d71b .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/02/07 10:22 linux-4.14.y 2c8a3fceddf0 2ce644fc .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/02/07 00:22 linux-4.14.y 2c8a3fceddf0 0655e081 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/02/06 19:12 linux-4.14.y 2c8a3fceddf0 0655e081 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tasklet_action
2021/01/05 12:32 linux-4.14.y 1752938529c6 a0234d98 .config console log report info ci2-linux-4-14
2021/01/05 08:56 linux-4.14.y 1752938529c6 2a28ff1f .config console log report info ci2-linux-4-14
2020/10/03 04:11 linux-4.14.y cbfa1702aaf6 2653fa43 .config console log report info ci2-linux-4-14
2020/09/30 14:08 linux-4.14.y cbfa1702aaf6 8516f6d3 .config console log report info ci2-linux-4-14
2020/09/04 00:55 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/07/28 21:31 linux-4.14.y 69b94dd6dcd1 cb93dc6a .config console log report ci2-linux-4-14
2020/07/18 15:10 linux-4.14.y b850307b279c 9c812472 .config console log report ci2-linux-4-14
2020/07/18 14:45 linux-4.14.y b850307b279c 9c812472 .config console log report ci2-linux-4-14
2020/07/08 19:29 linux-4.14.y b850307b279c 9f9845eb .config console log report ci2-linux-4-14
2020/07/08 04:02 linux-4.14.y b850307b279c 08fc4ef1 .config console log report ci2-linux-4-14
2020/07/07 07:07 linux-4.14.y b850307b279c 42723355 .config console log report ci2-linux-4-14
2020/07/06 19:34 linux-4.14.y b850307b279c ef278c73 .config console log report ci2-linux-4-14
2020/07/05 23:42 linux-4.14.y b850307b279c 22f87567 .config console log report ci2-linux-4-14
2020/07/04 13:19 linux-4.14.y b850307b279c 4f739670 .config console log report ci2-linux-4-14
2020/07/03 12:01 linux-4.14.y b850307b279c 6e569755 .config console log report ci2-linux-4-14
2020/06/05 02:04 linux-4.14.y c6db52a88798 2420d1bc .config console log report ci2-linux-4-14
2020/06/04 19:10 linux-4.14.y c6db52a88798 6720fdef .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.