KASAN: slab-use-after-free Read in debug_mutex_unlock

Status: upstream: reported on 2026/10/04 01:06
Subsystems: rdma
Labels: prio:high actionable
[Documentation on labels]
Reported-by: syzbot+ae549381b4daac2895b1@syzkaller.appspotmail.com
First crash: 84d, last: 5d00h
▶ ▼ ✨ AI Jobs (14)
ID Workflow Result Correct Bug Created Started Finished Revision
5e2a1069 moderation Actionable: ✅ ❓ KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/10/04 00:00 2026/10/04 00:00 2026/10/04 01:05 57bbd979
ca1183a8 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/09/28 00:12 2026/09/28 00:12 2026/09/28 01:09 a3c7249d
5dec89d0 moderation 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/09/03 00:21 2026/09/03 00:21 2026/09/03 00:21 9941e97d
faced5bf assessment-security 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/08/29 00:00 2026/08/29 00:00 2026/08/29 00:00 bcbc8ceb
c65a76a6 moderation 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/08/18 00:00 2026/08/18 00:00 2026/08/18 00:00 1e72964b
ff547969 assessment-security 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/08/12 02:44 2026/08/12 02:44 2026/08/12 02:44 f8d35649
3f95506b moderation 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/08/09 07:36 2026/08/09 07:36 2026/08/09 07:36 5d63f80b
48b4c177 assessment-security 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/08/04 00:21 2026/08/04 00:21 2026/08/04 00:21 cb1adeae
183f0f94 moderation 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/08/03 00:00 2026/08/03 00:00 2026/08/03 00:00 e611ffe1
22e92586 moderation 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/08/01 00:00 2026/08/01 00:00 2026/08/01 00:00 7664cf44
876e9f87 assessment-security 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/07/30 00:00 2026/07/30 00:00 2026/07/30 00:00 2377cd3d
a8e3e6f5 moderation 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/07/30 00:00 2026/07/30 00:00 2026/07/30 00:00 2377cd3d
5ec27501 assessment-security 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/07/27 00:00 2026/07/27 00:00 2026/07/27 00:00 492bab15
45e2a90b assessment-security 💥 KASAN: slab-use-after-free Read in debug_mutex_unlock 2026/07/26 00:00 2026/07/26 00:00 2026/07/26 00:00 492bab15
▶ ▼ Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2] RDMA/cma: wait for addr_handler() to finish in rdma_destroy_id() 1 (1) 2026/10/11 17:48
[PATCH] RDMA/cma: wait for addr_handler() to finish in rdma_destroy_id() 2 (2) 2026/10/11 10:34
[syzbot] [rdma?] KASAN: slab-use-after-free Read in debug_mutex_unlock 0 (1) 2026/10/04 01:06

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in debug_mutex_unlock+0x124/0x140 kernel/locking/mutex-debug.c:74
Read of size 8 at addr ffff888036f8d418 by task kworker/u33:7/1159

CPU: 3 UID: 0 PID: 1159 Comm: kworker/u33:7 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: ib_addr process_one_req
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0x13d/0x4b0 mm/kasan/report.c:482
 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
 debug_mutex_unlock+0x124/0x140 kernel/locking/mutex-debug.c:74
 __mutex_unlock_slowpath+0x195/0x930 kernel/locking/mutex.c:1031
 addr_handler+0x12d/0x4c0 drivers/infiniband/core/cma.c:3557
 process_one_req+0x127/0x680 drivers/infiniband/core/addr.c:624
 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396
 process_scheduled_works kernel/workqueue.c:3479 [inline]
 worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560
 kthread+0x373/0x450 kernel/kthread.c:436
 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Allocated by task 12963:
 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
 kasan_save_track+0x14/0x30 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
 __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:426
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __kmalloc_cache_noprof+0x2f8/0x6d0 mm/slub.c:5563
 _kmalloc_noprof include/linux/slab.h:991 [inline]
 _kzalloc_noprof include/linux/slab.h:1312 [inline]
 __rdma_create_id+0x5b/0x8f0 drivers/infiniband/core/cma.c:1016
 rdma_create_user_id+0x7d/0xe0 drivers/infiniband/core/cma.c:1074
 ucma_create_id+0x189/0x380 drivers/infiniband/core/ucma.c:470
 ucma_write+0x1fb/0x330 drivers/infiniband/core/ucma.c:1869
 vfs_write+0x2aa/0x1050 fs/read_write.c:685
 ksys_write+0x1f8/0x250 fs/read_write.c:739
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 12961:
 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
 kasan_save_track+0x14/0x30 mm/kasan/common.c:78
 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:264 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:296
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2748 [inline]
 slab_free mm/slub.c:6509 [inline]
 kfree+0x22b/0x6d0 mm/slub.c:6802
 ucma_close_id drivers/infiniband/core/ucma.c:188 [inline]
 ucma_destroy_private_ctx+0xb30/0xe90 drivers/infiniband/core/ucma.c:585
 ucma_close+0x1aa/0x240 drivers/infiniband/core/ucma.c:1934
 __fput+0x400/0xb60 fs/file_table.c:512
 task_work_run+0x150/0x240 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
 exit_to_user_mode_loop+0x1d8/0x700 kernel/entry/common.c:101
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
 do_syscall_64+0x661/0x790 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888036f8d000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1048 bytes inside of
 freed 2048-byte region [ffff888036f8d000, ffff888036f8d800)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888036f8b000 pfn:0x36f88
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000240 ffff88801d042f00 ffffea000185b210 ffffea0001458810
raw: ffff888036f8b000 0000000000080005 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88801d042f00 ffffea000185b210 ffffea0001458810
head: ffff888036f8b000 0000000000080005 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 11623, tgid 11623 (syz-executor), ts 213103372263
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871
 prep_new_page mm/page_alloc.c:1879 [inline]
 get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943
 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436
 alloc_slab_page mm/slub.c:3347 [inline]
 allocate_slab mm/slub.c:3462 [inline]
 new_slab+0xa9/0x6e0 mm/slub.c:3513
 refill_objects+0xe3/0x410 mm/slub.c:7418
 refill_sheaf mm/slub.c:2885 [inline]
 __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774
 alloc_from_pcs mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:4984 [inline]
 __do_kmalloc_node mm/slub.c:5413 [inline]
 __kmalloc_noprof+0x67c/0x840 mm/slub.c:5439
 _kmalloc_noprof include/linux/slab.h:995 [inline]
 sk_prot_alloc+0x10b/0x2a0 net/core/sock.c:2252
 sk_alloc+0x36/0xe80 net/core/sock.c:2308
 __netlink_create+0x5e/0x2c0 net/netlink/af_netlink.c:627
 netlink_create+0x29b/0x610 net/netlink/af_netlink.c:685
 __sock_create+0x339/0x860 net/socket.c:1676
 sock_create net/socket.c:1734 [inline]
 __sys_socket_create net/socket.c:1771 [inline]
 __sys_socket+0x14d/0x260 net/socket.c:1818
 __do_sys_socket net/socket.c:1832 [inline]
 __se_sys_socket net/socket.c:1830 [inline]
 __x64_sys_socket+0x72/0xb0 net/socket.c:1830
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 11688 tgid 11688 ts 212464219133 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1418 [inline]
 __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:361
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4683 [inline]
 slab_alloc_node mm/slub.c:4996 [inline]
 kmem_cache_alloc_noprof+0x269/0x6a0 mm/slub.c:5010
 taskstats_tgid_alloc kernel/taskstats.c:563 [inline]
 taskstats_exit+0x6d3/0xca0 kernel/taskstats.c:602
 do_exit+0x65c/0x2a50 kernel/exit.c:956
 do_group_exit+0xd5/0x2a0 kernel/exit.c:1129
 __do_sys_exit_group kernel/exit.c:1140 [inline]
 __se_sys_exit_group kernel/exit.c:1138 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1138
 x64_sys_call+0x1567/0x1570 arch/x86/include/generated/asm/syscalls_64.h:232
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff888036f8d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888036f8d380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888036f8d400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                            ^
 ffff888036f8d480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888036f8d500: 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
2026/10/12 14:50 upstream 24a19b953e2a 745a967f .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in debug_mutex_unlock
2026/07/24 19:52 upstream 48a5a7ab8d6a 4a865b71 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: slab-use-after-free Read in debug_mutex_unlock
* Struck through repros no longer work on HEAD.