syzbot


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

Status: upstream: reported C repro on 2021/08/20 03:44
Reported-by: syzbot+652023d5376450cc8516@syzkaller.appspotmail.com
First crash: 1191d, last: 627d
Fix bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[PATCH net] can: bcm: switch timer to HRTIMER_MODE_SOFT and remove hrtimer_tasklet 6 (6) 2022/01/13 10:49
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: use-after-free Read in bcm_can_tx C 2 1048d 1504d 1/1 fixed on 2022/01/29 10:00
linux-4.19 KASAN: use-after-free Read in bcm_can_tx 1 1582d 1582d 0/1 auto-closed as invalid on 2020/11/22 07:42
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2021/11/13 01:56 12m bisect fix linux-4.19.y error job log
2021/10/14 01:09 39m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in bcm_can_tx+0x726/0x800 net/can/bcm.c:295
Read of size 4 at addr ffff8880924eb7c4 by task ksoftirqd/0/9

CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432
 bcm_can_tx+0x726/0x800 net/can/bcm.c:295
 bcm_tx_timeout_tsklet+0x1f0/0x3a0 net/can/bcm.c:414
 tasklet_action_common.constprop.0+0x265/0x360 kernel/softirq.c:522
 __do_softirq+0x265/0x980 kernel/softirq.c:292
 run_ksoftirqd+0x57/0x110 kernel/softirq.c:653
 smpboot_thread_fn+0x655/0x9e0 kernel/smpboot.c:164
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Allocated by task 9966:
 kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625
 kmalloc include/linux/slab.h:515 [inline]
 kzalloc include/linux/slab.h:709 [inline]
 bcm_tx_setup net/can/bcm.c:947 [inline]
 bcm_sendmsg+0x25d7/0x4150 net/can/bcm.c:1386
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
 __sys_sendmsg net/socket.c:2265 [inline]
 __do_sys_sendmsg net/socket.c:2274 [inline]
 __se_sys_sendmsg net/socket.c:2272 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 9966:
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 mm/slab.c:3822
 bcm_release+0x260/0x950 net/can/bcm.c:1561
 __sock_release+0xcd/0x2a0 net/socket.c:599
 sock_close+0x15/0x20 net/socket.c:1214
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880924eb680
 which belongs to the cache kmalloc-1024 of size 1024
The buggy address is located 324 bytes inside of
 1024-byte region [ffff8880924eb680, ffff8880924eba80)
The buggy address belongs to the page:
page:ffffea0002493a80 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002a7d588 ffffea0002a48608 ffff88813bff0ac0
raw: 0000000000000000 ffff8880924ea000 0000000100000007 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880924eb680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880924eb700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880924eb780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                           ^
 ffff8880924eb800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880924eb880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (94):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/26 13:41 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/12 01:36 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/20 14:06 linux-4.19.y 3f8a27f9e27b b31320fc .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/09/28 08:43 linux-4.19.y 3f8a27f9e27b 75c78242 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/07/18 11:26 linux-4.19.y 3f8a27f9e27b 95cb00d1 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/05/02 03:26 linux-4.19.y 3f8a27f9e27b 2df221f6 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2021/12/30 16:08 linux-4.19.y 3f8a27f9e27b 2e49f10d .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2021/09/14 01:08 linux-4.19.y b172b44fcb17 58d09404 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/03/07 07:00 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/03/01 16:13 linux-4.19.y 3f8a27f9e27b ef65e6cb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/03/01 09:07 linux-4.19.y 3f8a27f9e27b ef65e6cb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/02/27 09:21 linux-4.19.y 3f8a27f9e27b 9189cb53 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/02/22 14:11 linux-4.19.y 3f8a27f9e27b 9f1e2cb3 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/02/19 20:45 linux-4.19.y 3f8a27f9e27b bcdf85f8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/02/10 13:16 linux-4.19.y 3f8a27f9e27b e29a17f5 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/02/09 03:54 linux-4.19.y 3f8a27f9e27b 14a312c8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/02/07 06:53 linux-4.19.y 3f8a27f9e27b 5bc3be51 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/02/05 20:03 linux-4.19.y 3f8a27f9e27b be607b78 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/01/30 13:05 linux-4.19.y 3f8a27f9e27b b68fb8d6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/01/17 17:54 linux-4.19.y 3f8a27f9e27b 42660d9e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/01/15 00:35 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/01/13 14:23 linux-4.19.y 3f8a27f9e27b 529798b0 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/01/06 13:58 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/01/06 12:10 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2023/01/04 08:09 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/25 11:17 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/18 20:19 linux-4.19.y 3f8a27f9e27b 05494336 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/12 12:28 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/11 11:26 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/08 16:19 linux-4.19.y 3f8a27f9e27b 1034e5fa .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/05 16:34 linux-4.19.y 3f8a27f9e27b 045cbb84 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/05 06:24 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/05 03:03 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/03 21:22 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/02 14:28 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/12/01 09:59 linux-4.19.y 3f8a27f9e27b 4c2a66e8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/11/25 06:17 linux-4.19.y 3f8a27f9e27b 74a66371 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/11/24 06:49 linux-4.19.y 3f8a27f9e27b ff68ff8f .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/11/23 11:18 linux-4.19.y 3f8a27f9e27b 52fdf57a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/11/21 20:34 linux-4.19.y 3f8a27f9e27b 1c576c23 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/11/13 18:23 linux-4.19.y 3f8a27f9e27b 7ba4d859 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/11/06 12:58 linux-4.19.y 3f8a27f9e27b 6d752409 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/30 19:53 linux-4.19.y 3f8a27f9e27b 2a71366b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/28 10:38 linux-4.19.y 3f8a27f9e27b 5c716ff6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/27 00:17 linux-4.19.y 3f8a27f9e27b 86777b7f .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/19 03:35 linux-4.19.y 3f8a27f9e27b b31320fc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/18 13:44 linux-4.19.y 3f8a27f9e27b b31320fc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/17 16:32 linux-4.19.y 3f8a27f9e27b 94744d21 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/12 14:25 linux-4.19.y 3f8a27f9e27b 16a9c9e0 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/09 21:55 linux-4.19.y 3f8a27f9e27b aea5da89 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/08 19:28 linux-4.19.y 3f8a27f9e27b aea5da89 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/10/05 13:35 linux-4.19.y 3f8a27f9e27b 267e3bb1 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2022/09/24 22:28 linux-4.19.y 3f8a27f9e27b 0042f2b4 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
2021/08/20 03:43 linux-4.19.y 59456c9cc40c b599f2fc .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in bcm_can_tx
* Struck through repros no longer work on HEAD.