================================================================== BUG: KASAN: slab-out-of-bounds in ext4_read_inline_data fs/ext4/inline.c:209 [inline] BUG: KASAN: slab-out-of-bounds in ext4_read_inline_dir+0x48b/0xdf0 fs/ext4/inline.c:1483 Read of size 836 at addr ffff88805f2fb205 by task syz-executor/12715 CPU: 1 UID: 0 PID: 12715 Comm: syz-executor Not tainted 6.11.0-rc5-syzkaller-00079-g928f79a188aa #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 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 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 ext4_read_inline_data fs/ext4/inline.c:209 [inline] ext4_read_inline_dir+0x48b/0xdf0 fs/ext4/inline.c:1483 ext4_readdir+0x3bb/0x3500 fs/ext4/dir.c:158 iterate_dir+0x57a/0x810 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:407 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:392 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:0x7f11757ac093 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 32 43 f8 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 a8 ff ff ff f7 d8 RSP: 002b:00007ffc3b446ec8 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555583a4c640 RCX: 00007f11757ac093 RDX: 0000000000008000 RSI: 0000555583a4c640 RDI: 0000000000000006 RBP: 0000555583a4c614 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000016 R14: 0000555583a4c610 R15: 00007ffc3b44a260 Allocated by task 13819: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4158 [inline] __kmalloc_node_noprof+0x22a/0x440 mm/slub.c:4164 __kvmalloc_node_noprof+0x72/0x190 mm/util.c:650 kvmalloc_array_node_noprof include/linux/slab.h:833 [inline] __ptr_ring_init_queue_alloc_noprof include/linux/ptr_ring.h:471 [inline] ptr_ring_init_noprof include/linux/ptr_ring.h:489 [inline] skb_array_init_noprof include/linux/skb_array.h:182 [inline] pfifo_fast_init+0x114/0x6e0 net/sched/sch_generic.c:865 qdisc_create_dflt+0x136/0x4b0 net/sched/sch_generic.c:1015 attach_one_default_qdisc net/sched/sch_generic.c:1174 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2513 [inline] attach_default_qdiscs net/sched/sch_generic.c:1192 [inline] dev_activate+0x3c0/0x1240 net/sched/sch_generic.c:1251 __dev_open+0x352/0x450 net/core/dev.c:1483 __dev_change_flags+0x1e2/0x6f0 net/core/dev.c:8838 dev_change_flags+0x8b/0x1a0 net/core/dev.c:8910 do_setlink+0xcd0/0x41f0 net/core/rtnetlink.c:2900 __rtnl_newlink net/core/rtnetlink.c:3696 [inline] rtnl_newlink+0x180d/0x20a0 net/core/rtnetlink.c:3743 rtnetlink_rcv_msg+0x73f/0xcf0 net/core/rtnetlink.c:6647 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 __sys_sendto+0x3a4/0x4f0 net/socket.c:2204 __do_sys_sendto net/socket.c:2216 [inline] __se_sys_sendto net/socket.c:2212 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2212 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 The buggy address belongs to the object at ffff88805f2f8000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4805 bytes to the right of allocated 8000-byte region [ffff88805f2f8000, ffff88805f2f9f40) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805f2fc000 pfn:0x5f2f8 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: 0xfdffffff(slab) raw: 00fff00000000240 ffff888015442280 ffffea0001a98a10 ffffea0001528a10 raw: ffff88805f2fc000 0000000000020001 00000001fdffffff 0000000000000000 head: 00fff00000000240 ffff888015442280 ffffea0001a98a10 ffffea0001528a10 head: ffff88805f2fc000 0000000000020001 00000001fdffffff 0000000000000000 head: 00fff00000000003 ffffea00017cbe01 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 Unmovable, gfp_mask 0x1d28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4882, tgid 4882 (dhcpcd), ts 619325411028, free_ts 619154425879 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3439 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4695 __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:2321 allocate_slab+0x5a/0x2f0 mm/slub.c:2484 new_slab mm/slub.c:2537 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3723 __slab_alloc+0x58/0xa0 mm/slub.c:3813 __slab_alloc_node mm/slub.c:3866 [inline] slab_alloc_node mm/slub.c:4025 [inline] __do_kmalloc_node mm/slub.c:4157 [inline] __kmalloc_node_track_caller_noprof+0x281/0x440 mm/slub.c:4177 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:605 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:674 alloc_skb include/linux/skbuff.h:1320 [inline] netlink_dump+0x1f7/0xd80 net/netlink/af_netlink.c:2291 netlink_recvmsg+0x6bb/0x11d0 net/netlink/af_netlink.c:1983 sock_recvmsg_nosec net/socket.c:1046 [inline] sock_recvmsg+0x22f/0x280 net/socket.c:1068 ____sys_recvmsg+0x1db/0x470 net/socket.c:2816 ___sys_recvmsg net/socket.c:2858 [inline] __sys_recvmsg+0x2f0/0x3e0 net/socket.c:2888 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 page last free pid 4657 tgid 4657 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_page+0xd19/0xea0 mm/page_alloc.c:2612 discard_slab mm/slub.c:2583 [inline] __put_partials+0xeb/0x130 mm/slub.c:3051 put_cpu_partial+0x17c/0x250 mm/slub.c:3126 __slab_free+0x2ea/0x3d0 mm/slub.c:4343 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:3988 [inline] slab_alloc_node mm/slub.c:4037 [inline] kmem_cache_alloc_node_noprof+0x16b/0x320 mm/slub.c:4080 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:664 alloc_skb include/linux/skbuff.h:1320 [inline] alloc_skb_with_frags+0xc3/0x770 net/core/skbuff.c:6526 sock_alloc_send_pskb+0x91a/0xa60 net/core/sock.c:2815 unix_dgram_sendmsg+0x6d3/0x1f80 net/unix/af_unix.c:2030 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 __sys_sendto+0x3a4/0x4f0 net/socket.c:2204 __do_sys_sendto net/socket.c:2216 [inline] __se_sys_sendto net/socket.c:2212 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2212 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 Memory state around the buggy address: ffff88805f2fb100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805f2fb180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805f2fb200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805f2fb280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805f2fb300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================