================================================================== BUG: KASAN: slab-out-of-bounds in jfs_readdir+0x1b79/0x4660 fs/jfs/jfs_dtree.c:2894 Read of size 1 at addr ffff88807839f715 by task syz-executor.3/8961 CPU: 1 PID: 8961 Comm: syz-executor.3 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 jfs_readdir+0x1b79/0x4660 fs/jfs/jfs_dtree.c:2894 wrap_directory_iterator+0x94/0xe0 fs/readdir.c:67 iterate_dir+0x65e/0x820 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:394 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4ab28a83a3 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 52 8b fa ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 b0 ff ff ff f7 d8 RSP: 002b:00007ffd03206a68 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555592dc8970 RCX: 00007f4ab28a83a3 RDX: 0000000000008000 RSI: 0000555592dc8970 RDI: 0000000000000005 RBP: 0000555592dc8944 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffb0 R13: 0000000000000010 R14: 0000555592dc8940 R15: 0000000000000009 The buggy address belongs to the object at ffff88807839ef00 which belongs to the cache jfs_ip of size 2240 The buggy address is located 2069 bytes inside of allocated 2240-byte region [ffff88807839ef00, ffff88807839f7c0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807839ae40 pfn:0x78398 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88807a474101 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000040 ffff888019b83780 dead000000000122 0000000000000000 raw: ffff88807839ae40 00000000800d000c 00000001ffffefff ffff88807a474101 head: 00fff00000000040 ffff888019b83780 dead000000000122 0000000000000000 head: ffff88807839ae40 00000000800d000c 00000001ffffefff ffff88807a474101 head: 00fff00000000003 ffffea0001e0e601 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 5350, tgid 5349 (syz-executor.2), ts 92973013189, free_ts 89520915626 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2e43/0x2f00 mm/page_alloc.c:3420 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4678 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2265 allocate_slab+0x5a/0x2f0 mm/slub.c:2428 new_slab mm/slub.c:2481 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3667 __slab_alloc+0x58/0xa0 mm/slub.c:3757 __slab_alloc_node mm/slub.c:3810 [inline] slab_alloc_node mm/slub.c:3989 [inline] kmem_cache_alloc_lru_noprof+0x1c5/0x2b0 mm/slub.c:4020 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode fs/inode.c:261 [inline] iget_locked+0x1ad/0x850 fs/inode.c:1280 jfs_iget+0x22/0x3b0 fs/jfs/inode.c:29 jfs_fill_super+0x808/0xc50 fs/jfs/super.c:580 mount_bdev+0x20a/0x2d0 fs/super.c:1659 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1780 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 page last free pid 4522 tgid 4522 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0xd19/0xea0 mm/page_alloc.c:2583 __slab_free+0x31b/0x3d0 mm/slub.c:4348 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3941 [inline] slab_alloc_node mm/slub.c:4001 [inline] kmem_cache_alloc_node_noprof+0x16b/0x320 mm/slub.c:4044 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:656 alloc_skb include/linux/skbuff.h:1308 [inline] alloc_skb_with_frags+0xc3/0x770 net/core/skbuff.c:6504 sock_alloc_send_pskb+0x91a/0xa60 net/core/sock.c:2794 unix_dgram_sendmsg+0x6d3/0x1f80 net/unix/af_unix.c:1976 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 __sys_sendto+0x3a4/0x4f0 net/socket.c:2192 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2200 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88807839f600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807839f680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807839f700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807839f780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807839f800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================