syzbot


KASAN: slab-out-of-bounds Read in drop_buffers (2)

Status: upstream: reported on 2025/09/19 09:12
Reported-by: syzbot+5b886a2e03529dbcef81@syzkaller.appspotmail.com
First crash: 5h13m, last: 5h13m
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: slab-out-of-bounds Read in drop_buffers 17 1 230d 230d 0/3 auto-obsoleted due to no activity on 2025/05/11 23:03
upstream KASAN: null-ptr-deref Read in drop_buffers (2) jfs 11 C error 252 568d 779d 0/29 auto-obsoleted due to no activity on 2024/05/08 22:28
upstream KASAN: null-ptr-deref Read in drop_buffers kernfs 11 5 1055d 1055d 0/29 auto-obsoleted due to no activity on 2023/02/27 02:04
upstream KASAN: null-ptr-deref Read in drop_buffers (4) fs 17 228 24d 32d 0/29 moderation: reported on 2025/08/18 04:14
upstream KASAN: null-ptr-deref Read in drop_buffers (3) fs 17 C 98 186d 352d 0/29 auto-obsoleted due to no activity on 2025/06/08 23:43

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: slab-out-of-bounds in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
BUG: KASAN: slab-out-of-bounds in buffer_busy fs/buffer.c:2784 [inline]
BUG: KASAN: slab-out-of-bounds in drop_buffers+0x65/0x6a0 fs/buffer.c:2796
Read of size 4 at addr ffff88803075ede0 by task syz.2.1030/8624

CPU: 0 PID: 8624 Comm: syz.2.1030 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
 instrument_atomic_read include/linux/instrumented.h:72 [inline]
 atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
 buffer_busy fs/buffer.c:2784 [inline]
 drop_buffers+0x65/0x6a0 fs/buffer.c:2796
 try_to_free_buffers+0x171/0x520 fs/buffer.c:2831
 mapping_evict_folio+0x229/0x520 mm/truncate.c:278
 invalidate_mapping_pagevec+0x335/0x660 mm/truncate.c:527
 drop_pagecache_sb+0x19a/0x230 fs/drop_caches.c:39
 iterate_supers+0x11e/0x1d0 fs/super.c:757
 drop_caches_sysctl_handler+0x8e/0x160 fs/drop_caches.c:62
 proc_sys_call_handler+0x458/0x6c0 fs/proc/proc_sysctl.c:602
 do_iter_readv_writev fs/read_write.c:-1 [inline]
 do_iter_write+0x62d/0xaf0 fs/read_write.c:861
 iter_file_splice_write+0x665/0xc50 fs/splice.c:685
 do_splice_from fs/splice.c:763 [inline]
 direct_splice_actor+0xe1/0x130 fs/splice.c:950
 splice_direct_to_actor+0x480/0xb60 fs/splice.c:896
 do_splice_direct+0x1b0/0x2b0 fs/splice.c:1002
 do_sendfile+0x5cc/0xeb0 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1317 [inline]
 __se_sys_sendfile64+0xd6/0x190 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f375e18eba9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f375f049038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f375e3d6270 RCX: 00007f375e18eba9
RDX: 0000200000002080 RSI: 0000000000000009 RDI: 000000000000000a
RBP: 00007f375e211e19 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000023b R11: 0000000000000246 R12: 0000000000000000
R13: 00007f375e3d6308 R14: 00007f375e3d6270 R15: 00007ffc70dc1528
 </TASK>

Allocated by task 8728:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slab_common.c:936 [inline]
 __kmalloc+0xb0/0x240 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 iomap_page_create+0x14a/0x600 fs/iomap/buffered-io.c:61
 iomap_readpage_iter+0x240/0x8f0 fs/iomap/buffered-io.c:273
 iomap_read_folio+0x2e7/0x7f0 fs/iomap/buffered-io.c:344
 filemap_read_folio+0x160/0x760 mm/filemap.c:2490
 do_read_cache_folio+0x2a0/0x760 mm/filemap.c:3627
 erofs_bread+0x18e/0x670 fs/erofs/data.c:50
 erofs_find_target_block fs/erofs/namei.c:102 [inline]
 erofs_namei+0x28f/0xf00 fs/erofs/namei.c:175
 erofs_lookup+0x14b/0x390 fs/erofs/namei.c:204
 lookup_one_qstr_excl+0x10e/0x240 fs/namei.c:1605
 filename_create+0x21e/0x450 fs/namei.c:3877
 do_mknodat+0x16e/0x4c0 fs/namei.c:4022
 __do_sys_mknod fs/namei.c:4068 [inline]
 __se_sys_mknod fs/namei.c:4066 [inline]
 __x64_sys_mknod+0x8a/0xa0 fs/namei.c:4066
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
 kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405
 cfg80211_update_known_bss+0x178/0xa20 net/wireless/scan.c:-1
 cfg80211_bss_update+0x15f/0x2250 net/wireless/scan.c:1853
 cfg80211_inform_single_bss_frame_data net/wireless/scan.c:2512 [inline]
 cfg80211_inform_bss_frame_data+0x9f4/0x1370 net/wireless/scan.c:2545
 ieee80211_bss_info_update+0x734/0xbc0 net/mac80211/scan.c:190
 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x17b4/0x2b10 net/mac80211/ibss.c:1638
 ieee80211_iface_process_skb net/mac80211/iface.c:1671 [inline]
 ieee80211_iface_work+0x726/0xc80 net/mac80211/iface.c:1725
 process_one_work+0x898/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Second to last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
 kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405
 cfg80211_update_known_bss+0x178/0xa20 net/wireless/scan.c:-1
 cfg80211_bss_update+0x15f/0x2250 net/wireless/scan.c:1853
 cfg80211_inform_single_bss_frame_data net/wireless/scan.c:2512 [inline]
 cfg80211_inform_bss_frame_data+0x9f4/0x1370 net/wireless/scan.c:2545
 ieee80211_bss_info_update+0x734/0xbc0 net/mac80211/scan.c:190
 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x17b4/0x2b10 net/mac80211/ibss.c:1638
 ieee80211_iface_process_skb net/mac80211/iface.c:1671 [inline]
 ieee80211_iface_work+0x726/0xc80 net/mac80211/iface.c:1725
 process_one_work+0x898/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff88803075ed80
 which belongs to the cache kmalloc-96 of size 96
The buggy address is located 0 bytes to the right of
 96-byte region [ffff88803075ed80, ffff88803075ede0)

The buggy address belongs to the physical page:
page:ffffea0000c1d780 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3075e
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0000ba0680 dead000000000005 ffff888017441780
raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 4333, tgid 4333 (kworker/1:6), ts 65703283108, free_ts 65666855142
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
 prep_new_page mm/page_alloc.c:2539 [inline]
 get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
 alloc_slab_page+0x5d/0x160 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2c0 mm/slub.c:1997
 ___slab_alloc+0xbc6/0x1230 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026
 kmalloc include/linux/slab.h:563 [inline]
 dst_cow_metrics_generic+0x52/0x1b0 net/core/dst.c:202
 dst_metrics_write_ptr include/net/dst.h:119 [inline]
 dst_metric_set include/net/dst.h:180 [inline]
 icmp6_dst_alloc+0x2d8/0x460 net/ipv6/route.c:3321
 mld_sendpack+0x710/0xe80 net/ipv6/mcast.c:1814
 mld_dad_work+0x3c/0x270 net/ipv6/mcast.c:2267
 process_one_work+0x898/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1459 [inline]
 free_pcp_prepare mm/page_alloc.c:1509 [inline]
 free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 __kmem_cache_alloc_node+0x140/0x260 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc+0xa0/0x240 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 tomoyo_realpath_from_path+0xdf/0x5d0 security/tomoyo/realpath.c:251
 tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
 tomoyo_path_perm+0x1fd/0x550 security/tomoyo/file.c:822
 security_inode_getattr+0xcf/0x120 security/security.c:1361
 vfs_getattr+0x26/0x3a0 fs/stat.c:158
 vfs_fstat fs/stat.c:183 [inline]
 __do_sys_newfstat fs/stat.c:447 [inline]
 __se_sys_newfstat fs/stat.c:444 [inline]
 __x64_sys_newfstat+0x102/0x1c0 fs/stat.c:444
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff88803075ec80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff88803075ed00: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
>ffff88803075ed80: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
                                                       ^
 ffff88803075ee00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
 ffff88803075ee80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/19 09:12 linux-6.1.y 3db754f56897 e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in drop_buffers
* Struck through repros no longer work on HEAD.