syzbot


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

Status: upstream: reported on 2026/03/11 03:17
Subsystems: media dri
Labels: actionable
[Documentation on labels]
Reported-by: syzbot+7f4987d0afb97dd090cb@syzkaller.appspotmail.com
First crash: 55d, last: 6d04h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
05c08db1-4dfa-4983-a7d1-c462f404046e moderation Actionable: ✅  Confident: ✅  KASAN: slab-use-after-free Read in dma_buf_fd 2026/03/10 14:15 2026/03/10 14:15 2026/03/10 14:38 d16aa12f36812fd3c4bc5f61111b6678f99f6b6e+
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly dri report (Apr 2026) 0 (1) 2026/04/01 07:42
[syzbot] [media?] [dri?] KASAN: slab-use-after-free Read in dma_buf_fd 0 (1) 2026/03/11 03:17

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:132 [inline]
BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x40/0x60 kernel/locking/spinlock.c:166
Read of size 1 at addr ffff8880689ce868 by task syz.5.4643/21254

CPU: 1 UID: 0 PID: 21254 Comm: syz.5.4643 Tainted: G             L      syzkaller #0 PREEMPT_{RT,(full)} 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 __kasan_check_byte+0x2a/0x40 mm/kasan/common.c:574
 kasan_check_byte include/linux/kasan.h:402 [inline]
 lock_acquire+0x84/0x350 kernel/locking/lockdep.c:5842
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:132 [inline]
 _raw_spin_lock_irqsave+0x40/0x60 kernel/locking/spinlock.c:166
 rt_mutex_slowunlock+0xbf/0x8b0 kernel/locking/rtmutex.c:1426
 spin_unlock include/linux/spinlock_rt.h:109 [inline]
 class_spinlock_destructor include/linux/spinlock.h:587 [inline]
 dma_buf_fd+0x178/0x330 drivers/dma-buf/dma-buf.c:796
 dma_heap_buffer_alloc drivers/dma-buf/dma-heap.c:76 [inline]
 dma_heap_ioctl_allocate drivers/dma-buf/dma-heap.c:116 [inline]
 dma_heap_ioctl+0x50b/0x620 drivers/dma-buf/dma-heap.c:176
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3d6370c819
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3d61966028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f3d63985fa0 RCX: 00007f3d6370c819
RDX: 0000200000000100 RSI: 00000000c0184800 RDI: 0000000000000006
RBP: 00007f3d637a2c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f3d63986038 R14: 00007f3d63985fa0 R15: 00007ffd2f8a7288
 </TASK>

Allocated by task 21254:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5295 [inline]
 __kmalloc_noprof+0x3e7/0x7b0 mm/slub.c:5307
 kmalloc_noprof include/linux/slab.h:954 [inline]
 kzalloc_noprof include/linux/slab.h:1188 [inline]
 dma_buf_export+0x3ba/0xad0 drivers/dma-buf/dma-buf.c:739
 system_heap_allocate+0xf11/0x1430 drivers/dma-buf/heaps/system_heap.c:473
 dma_heap_buffer_alloc drivers/dma-buf/dma-heap.c:72 [inline]
 dma_heap_ioctl_allocate drivers/dma-buf/dma-heap.c:116 [inline]
 dma_heap_ioctl+0x4ce/0x620 drivers/dma-buf/dma-heap.c:176
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 21255:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2689 [inline]
 slab_free mm/slub.c:6246 [inline]
 kfree+0x1c5/0x6c0 mm/slub.c:6561
 __dentry_kill+0x211/0x5e0 fs/dcache.c:675
 finish_dput+0xc9/0x480 fs/dcache.c:879
 __fput+0x6a3/0xa70 fs/file_table.c:518
 task_work_run+0x1d9/0x270 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:67 [inline]
 exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98
 __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:238 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:328 [inline]
 do_syscall_64+0x33e/0xf80 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff8880689ce800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 104 bytes inside of
 freed 1024-byte region [ffff8880689ce800, ffff8880689cec00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x689c8
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x80000000000040(head|node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000040 ffff88801a01fdc0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 0080000000000040 ffff88801a01fdc0 dead000000000100 dead000000000122
head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 0080000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 57, tgid 57 (kworker/u8:3), ts 97547451750, free_ts 0
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x231/0x280 mm/page_alloc.c:1860
 prep_new_page mm/page_alloc.c:1868 [inline]
 get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3948
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5228
 alloc_slab_page mm/slub.c:3278 [inline]
 allocate_slab+0x77/0x660 mm/slub.c:3467
 new_slab mm/slub.c:3525 [inline]
 refill_objects+0x33c/0x3d0 mm/slub.c:7251
 refill_sheaf mm/slub.c:2816 [inline]
 __pcs_replace_empty_main+0x373/0x720 mm/slub.c:4651
 alloc_from_pcs mm/slub.c:4749 [inline]
 slab_alloc_node mm/slub.c:4883 [inline]
 __do_kmalloc_node mm/slub.c:5294 [inline]
 __kmalloc_noprof+0x530/0x7b0 mm/slub.c:5307
 kmalloc_noprof include/linux/slab.h:954 [inline]
 kzalloc_noprof include/linux/slab.h:1188 [inline]
 ieee802_11_parse_elems_full+0x159/0x2ab0 net/mac80211/parse.c:1051
 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2518 [inline]
 ieee80211_inform_bss+0x161/0x1160 net/mac80211/scan.c:79
 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
 cfg80211_inform_single_bss_data+0xd2f/0x1b80 net/wireless/scan.c:2372
 cfg80211_inform_bss_data+0x266/0x3c40 net/wireless/scan.c:3226
 cfg80211_inform_bss_frame_data+0x3c7/0x730 net/wireless/scan.c:3317
 ieee80211_bss_info_update+0x794/0xa40 net/mac80211/scan.c:230
 ieee80211_rx_bss_info net/mac80211/ibss.c:1088 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1569 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x1901/0x2cb0 net/mac80211/ibss.c:1596
 ieee80211_iface_process_skb net/mac80211/iface.c:1795 [inline]
 ieee80211_iface_work+0x845/0x1390 net/mac80211/iface.c:1849
 cfg80211_wiphy_work+0x2cf/0x460 net/wireless/core.c:513
page_owner free stack trace missing

Memory state around the buggy address:
 ffff8880689ce700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880689ce780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880689ce800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                          ^
 ffff8880689ce880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880689ce900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/18 12:40 upstream 8541d8f725c6 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/04/18 09:38 upstream 8541d8f725c6 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/04/16 10:31 upstream aec2f682d47c df15c5f3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/04/15 03:24 upstream 508fed679541 e2e976a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/31 13:51 upstream d0c3bcd5b897 aeea1c72 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/30 08:49 upstream 7aaa8047eafd 356bdfc9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/26 16:24 upstream 0138af2472df fca8d360 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/26 02:05 upstream d2a43e7f89da c6143aac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/25 07:27 upstream bbeb83d3182a 35e4ff71 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/23 16:30 upstream c369299895a5 5e3db351 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/23 16:29 upstream c369299895a5 5e3db351 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/06 11:54 upstream 5ee8dbf54602 31e9c887 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/04 07:19 upstream 0031c06807cf 4180d919 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in dma_buf_fd
2026/03/19 15:57 upstream 8a30aeb0d1b4 bd6dcb30 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: slab-use-after-free Read in dma_buf_fd
2026/04/23 00:05 linux-next 70c8a7ec6715 b10da5ec .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in dma_buf_fd
2026/04/13 20:35 linux-next 1c7cc4904160 9530ccf9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in dma_buf_fd
* Struck through repros no longer work on HEAD.