syzbot


KASAN: use-after-free Read in io_sq_thread

Status: auto-obsoleted due to no activity on 2023/11/21 23:42
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+edf737ddc3001895469f@syzkaller.appspotmail.com
First crash: 1117d, last: 1102d
Cause bisection: introduced by (bisect log) [no-op commit]:
commit 7df222c35920569c7f31d177a7249c70139008f1
Author: Konrad Dybcio <konrad.dybcio@somainline.org>
Date: Wed Feb 3 23:15:36 2021 +0000

  drm/msm/disp/mdp5: mdp5_cfg: Fix msm8974v2 max_clk

Crash: SYZFAIL: wrong response packet (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
KASAN: use-after-free Read in io_sq_thread 0 (1) 2021/02/26 09:27
Last patch testing requests (11)
Created Duration User Patch Repo Result
2023/11/21 23:18 22m retest repro linux-next OK log
2023/09/12 21:31 13m retest repro linux-next report log
2023/07/04 15:15 3h16m retest repro linux-next report log
2023/04/25 07:28 21m retest repro linux-next report log
2023/04/25 07:18 13m retest repro linux-next report log
2023/04/25 05:42 21m retest repro linux-next OK log
2023/04/25 05:29 20m retest repro linux-next report log
2023/01/15 05:32 21m retest repro linux-next error OK
2023/01/15 01:32 22m retest repro linux-next error OK
2022/10/02 02:30 18m retest repro linux-next error OK
2021/03/25 21:37 18m alaaemadhossney.ae@gmail.com linux-next OK

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0x3e6f/0x54c0 kernel/locking/lockdep.c:4770
Read of size 8 at addr ffff888143480288 by task iou-sqp-6338/6349

CPU: 0 PID: 6349 Comm: iou-sqp-6338 Not tainted 5.11.0-next-20210225-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0xfa/0x151 lib/dump_stack.c:120
 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232
 __kasan_report mm/kasan/report.c:399 [inline]
 kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416
 __lock_acquire+0x3e6f/0x54c0 kernel/locking/lockdep.c:4770
 lock_acquire kernel/locking/lockdep.c:5510 [inline]
 lock_acquire+0x1ab/0x730 kernel/locking/lockdep.c:5475
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159
 complete+0x13/0x60 kernel/sched/completion.c:32
 io_sq_thread+0x1225/0x19a0 fs/io_uring.c:6808
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Allocated by task 6338:
 kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:427 [inline]
 ____kasan_kmalloc mm/kasan/common.c:506 [inline]
 ____kasan_kmalloc mm/kasan/common.c:465 [inline]
 __kasan_kmalloc+0x99/0xc0 mm/kasan/common.c:515
 kmalloc include/linux/slab.h:554 [inline]
 kzalloc include/linux/slab.h:684 [inline]
 io_get_sq_data fs/io_uring.c:7202 [inline]
 io_sq_offload_create fs/io_uring.c:7875 [inline]
 io_uring_create fs/io_uring.c:9465 [inline]
 io_uring_setup+0x173e/0x2c20 fs/io_uring.c:9550
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Freed by task 8970:
 kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38
 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46
 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357
 ____kasan_slab_free mm/kasan/common.c:360 [inline]
 ____kasan_slab_free mm/kasan/common.c:325 [inline]
 __kasan_slab_free+0xf5/0x130 mm/kasan/common.c:367
 kasan_slab_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:1562 [inline]
 slab_free_freelist_hook+0x72/0x1b0 mm/slub.c:1600
 slab_free mm/slub.c:3161 [inline]
 kfree+0xe5/0x7b0 mm/slub.c:4213
 io_put_sq_data fs/io_uring.c:7142 [inline]
 io_sq_thread_finish+0x474/0x580 fs/io_uring.c:7164
 io_ring_ctx_free fs/io_uring.c:8408 [inline]
 io_ring_exit_work+0x7e/0x4a0 fs/io_uring.c:8540
 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275
 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421
 kthread+0x3b1/0x4a0 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

The buggy address belongs to the object at ffff888143480000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 648 bytes inside of
 1024-byte region [ffff888143480000, ffff888143480400)
The buggy address belongs to the page:
page:00000000be468a73 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x143480
head:00000000be468a73 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x57ff00000010200(slab|head)
raw: 057ff00000010200 dead000000000100 dead000000000122 ffff888010841dc0
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888143480180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888143480200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888143480280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff888143480300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888143480380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (192):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/26 05:37 linux-next 7f206cf3ec2b 76f7fc95 .config console log report syz C ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/02/26 08:54 linux-next 7f206cf3ec2b 76f7fc95 .config console log report syz C ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/12 13:05 upstream 28806e4d9b97 429d8a6b .config console log report info ci-upstream-kasan-gce-smack-root KASAN: use-after-free Read in io_sq_thread
2021/03/12 08:44 upstream 28806e4d9b97 429d8a6b .config console log report info ci-upstream-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/11 01:34 upstream 05a59d79793d 764067f3 .config console log report info ci-upstream-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/10 10:08 upstream 144c79ef3353 26967e35 .config console log report info ci-upstream-kasan-gce-selinux-root KASAN: use-after-free Read in io_sq_thread
2021/03/10 05:43 upstream 144c79ef3353 26967e35 .config console log report info ci-upstream-kasan-gce-smack-root KASAN: use-after-free Read in io_sq_thread
2021/03/10 00:13 upstream 144c79ef3353 26967e35 .config console log report info ci-upstream-kasan-gce-selinux-root KASAN: use-after-free Read in io_sq_thread
2021/03/09 18:18 upstream 144c79ef3353 09fbf400 .config console log report info ci-upstream-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/08 18:16 upstream 144c79ef3353 09fbf400 .config console log report info ci-upstream-kasan-gce-smack-root KASAN: use-after-free Read in io_sq_thread
2021/03/08 10:08 upstream 144c79ef3353 09fbf400 .config console log report info ci-upstream-kasan-gce-selinux-root KASAN: use-after-free Read in io_sq_thread
2021/03/07 14:36 upstream a38fd8748464 75506d9c .config console log report info ci-upstream-kasan-gce-smack-root KASAN: use-after-free Read in io_sq_thread
2021/03/07 10:11 upstream a38fd8748464 e4b4d570 .config console log report info ci-upstream-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/07 05:45 upstream a38fd8748464 e4b4d570 .config console log report info ci-upstream-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/06 15:29 upstream a38fd8748464 e4b4d570 .config console log report info ci-upstream-kasan-gce-smack-root KASAN: use-after-free Read in io_sq_thread
2021/03/09 07:58 upstream 144c79ef3353 09fbf400 .config console log report info ci-qemu2-arm64-compat KASAN: use-after-free Read in io_sq_thread
2021/03/09 05:00 upstream 144c79ef3353 09fbf400 .config console log report info ci-qemu2-arm64-compat KASAN: use-after-free Read in io_sq_thread
2021/03/08 21:37 upstream 144c79ef3353 09fbf400 .config console log report info ci-qemu2-arm64 KASAN: use-after-free Read in io_sq_thread
2021/03/07 17:36 upstream a38fd8748464 c599ed12 .config console log report info ci-qemu2-arm64 KASAN: use-after-free Read in io_sq_thread
2021/03/11 19:41 linux-next b01d57bfdc41 c2ca1f2a .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/10 13:32 linux-next 3aa6f5082286 26967e35 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/10 11:40 linux-next 3aa6f5082286 26967e35 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/09 15:19 linux-next 3aa6f5082286 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/09 13:44 linux-next 3aa6f5082286 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/09 11:02 linux-next 3aa6f5082286 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/08 17:15 linux-next 4641b32307b3 09fbf400 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/05 09:56 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/05 08:24 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/05 07:08 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/05 05:56 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/05 04:39 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/05 02:31 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/05 00:27 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 22:36 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 20:49 linux-next f5427c2460eb 9d751681 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 19:31 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 18:01 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 17:29 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 16:27 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 15:20 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 14:05 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 12:55 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 12:31 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 11:06 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 10:02 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 07:35 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 06:15 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 05:03 linux-next f5427c2460eb d7e4e604 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 03:06 linux-next f6b975aabf15 06ed56cd .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
2021/03/04 02:42 linux-next f6b975aabf15 06ed56cd .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in io_sq_thread
* Struck through repros no longer work on HEAD.