syzbot


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

Status: upstream: reported C repro on 2025/09/19 09:12
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+5b886a2e03529dbcef81@syzkaller.appspotmail.com
First crash: 26d, last: 21d
Bug presence (2)
Date Name Commit Repro Result
2025/09/24 linux-6.1.y (ToT) 363a599da6d9 C [report] KASAN: slab-out-of-bounds Read in drop_buffers
2025/09/24 upstream (ToT) cec1e6e5d1ab C Didn't crash
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 257d 257d 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 595d 806d 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 1082d 1082d 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 50d 58d 0/29 auto-obsoleted due to no activity on 2025/10/15 13:15
upstream KASAN: null-ptr-deref Read in drop_buffers (3) fs 17 C 98 213d 379d 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 ffff88807665d8e0 by task syz.2.39/4540

CPU: 0 PID: 4540 Comm: syz.2.39 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:0x7f1eb218ec29
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:00007ffe85dc25e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f1eb23d5fa0 RCX: 00007f1eb218ec29
RDX: 0000200000002080 RSI: 0000000000000003 RDI: 0000000000000004
RBP: 00007f1eb2211e41 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000023b R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1eb23d5fa0 R14: 00007f1eb23d5fa0 R15: 0000000000000004
 </TASK>

Allocated by task 4539:
 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

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

The buggy address belongs to the physical page:
page:ffffea0001d99740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7665d
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0001cf8b00 dead000000000002 ffff888017441780
raw: 0000000000000000 0000000080200020 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 4391, tgid 4391 (syz-executor), ts 89997991153, free_ts 89976810442
 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]
 kzalloc include/linux/slab.h:699 [inline]
 nsim_fib_event_schedule_work drivers/net/netdevsim/fib.c:990 [inline]
 nsim_fib_event_nb+0xe3/0x1040 drivers/net/netdevsim/fib.c:1043
 notifier_call_chain kernel/notifier.c:87 [inline]
 atomic_notifier_call_chain+0x17a/0x2b0 kernel/notifier.c:225
 call_fib_notifiers+0x2d/0x60 net/core/fib_notifier.c:35
 call_fib_entry_notifiers+0x148/0x1f0 net/ipv4/fib_trie.c:106
 fib_table_insert+0xca4/0x1b50 net/ipv4/fib_trie.c:1375
 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1118
 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1140
 fib_inetaddr_event+0x13c/0x1c0 net/ipv4/fib_frontend.c:1454
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
 free_slab mm/slub.c:2036 [inline]
 discard_slab mm/slub.c:2042 [inline]
 __unfreeze_partials+0x1a5/0x200 mm/slub.c:2591
 put_cpu_partial+0x17c/0x250 mm/slub.c:2667
 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]
 kzalloc include/linux/slab.h:699 [inline]
 fib6_info_alloc+0x2e/0xe0 net/ipv6/ip6_fib.c:156
 ip6_route_info_create+0x44f/0x1210 net/ipv6/route.c:3794
 ip6_route_add+0x24/0x130 net/ipv6/route.c:3890
 addrconf_add_mroute net/ipv6/addrconf.c:2506 [inline]
 addrconf_add_dev+0x253/0x330 net/ipv6/addrconf.c:2524
 addrconf_gre_config net/ipv6/addrconf.c:3474 [inline]
 addrconf_init_auto_addrs+0x19b/0xa60 net/ipv6/addrconf.c:3504
 addrconf_notify+0xaca/0xf40 net/ipv6/addrconf.c:3685

Memory state around the buggy address:
 ffff88807665d780: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff88807665d800: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
>ffff88807665d880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
                                                       ^
 ffff88807665d900: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff88807665d980: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/20 18:35 linux-6.1.y 363a599da6d9 67c37560 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in drop_buffers
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.