================================================================== BUG: KASAN: slab-out-of-bounds in ifname_compare_aligned include/linux/netfilter/x_tables.h:411 [inline] BUG: KASAN: slab-out-of-bounds in ip_packet_match net/ipv4/netfilter/ip_tables.c:64 [inline] BUG: KASAN: slab-out-of-bounds in ipt_do_table+0x68d/0x1480 net/ipv4/netfilter/ip_tables.c:284 Read of size 8 at addr ffff888125b08000 by task syz.7.358/1591 CPU: 1 PID: 1591 Comm: syz.7.358 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x100/0x140 mm/kasan/report.c:452 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309 ifname_compare_aligned include/linux/netfilter/x_tables.h:411 [inline] ip_packet_match net/ipv4/netfilter/ip_tables.c:64 [inline] ipt_do_table+0x68d/0x1480 net/ipv4/netfilter/ip_tables.c:284 iptable_mangle_hook+0x200/0x540 net/ipv4/netfilter/iptable_mangle.c:82 nf_hook_entry_hookfn include/linux/netfilter.h:137 [inline] nf_hook_slow+0xbc/0x1f0 net/netfilter/core.c:584 nf_hook include/linux/netfilter.h:254 [inline] NF_HOOK_COND include/linux/netfilter.h:287 [inline] ip_mc_output+0x622/0x8e0 net/ipv4/ip_output.c:424 dst_output include/net/dst.h:451 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] ip_send_skb+0xb2/0x140 net/ipv4/ip_output.c:1598 udp_send_skb+0x8e6/0x10f0 net/ipv4/udp.c:977 udp_sendmsg+0x17a6/0x2140 net/ipv4/udp.c:1265 inet_sendmsg+0xa5/0xc0 net/ipv4/af_inet.c:830 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2377 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2431 __sys_sendmmsg+0x2ab/0x4c0 net/socket.c:2517 __do_sys_sendmmsg net/socket.c:2546 [inline] __se_sys_sendmmsg net/socket.c:2543 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2543 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc58ab0c559 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:00007fc589544028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007fc58ad94090 RCX: 00007fc58ab0c559 RDX: 000000000800001d RSI: 0000200000007fc0 RDI: 0000000000000005 RBP: 00007fc58aba38b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000300 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc58ad94128 R14: 00007fc58ad94090 R15: 00007ffe29587d28 Allocated by task 1610: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] __kasan_slab_alloc+0xb7/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x15a/0x2d0 mm/slub.c:2965 shmem_alloc_inode+0x1a/0x30 mm/shmem.c:3816 alloc_inode fs/inode.c:233 [inline] new_inode_pseudo+0x62/0x210 fs/inode.c:968 new_inode+0x28/0x1e0 fs/inode.c:997 shmem_get_inode+0x343/0x9d0 mm/shmem.c:2311 __shmem_file_setup+0x113/0x2b0 mm/shmem.c:4187 shmem_file_setup+0x2f/0x40 mm/shmem.c:4228 __do_sys_memfd_create mm/memfd.c:323 [inline] __se_sys_memfd_create+0x1de/0x3a0 mm/memfd.c:266 __x64_sys_memfd_create+0x5b/0x70 mm/memfd.c:266 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888125b08000 which belongs to the cache shmem_inode_cache of size 800 The buggy address is located 0 bytes inside of 800-byte region [ffff888125b08000, ffff888125b08320) The buggy address belongs to the page: page:ffffea000496c200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x125b08 head:ffffea000496c200 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff88810018bc80 raw: 0000000000000000 0000000080110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 1603, ts 91834515942, free_ts 91801994124 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x176/0x190 mm/page_alloc.c:2462 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x1a4/0x2d0 mm/slub.c:2965 shmem_alloc_inode+0x1a/0x30 mm/shmem.c:3816 alloc_inode fs/inode.c:233 [inline] new_inode_pseudo+0x62/0x210 fs/inode.c:968 new_inode+0x28/0x1e0 fs/inode.c:997 shmem_get_inode+0x343/0x9d0 mm/shmem.c:2311 shmem_symlink+0x9e/0x4f0 mm/shmem.c:3118 vfs_symlink+0x339/0x4c0 fs/namei.c:4149 do_symlinkat+0x10e/0x3d0 fs/namei.c:4176 __do_sys_symlinkat fs/namei.c:4190 [inline] __se_sys_symlinkat fs/namei.c:4187 [inline] __x64_sys_symlinkat+0x7b/0x90 fs/namei.c:4187 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] __free_pages_ok+0x80b/0x830 mm/page_alloc.c:1629 free_the_page mm/page_alloc.c:5445 [inline] __free_pages+0xd8/0x390 mm/page_alloc.c:5454 kfree+0x1e4/0x270 mm/slub.c:4193 kvfree+0x35/0x40 mm/util.c:647 netdev_freemem+0x3f/0x60 net/core/dev.c:10492 netdev_release+0x7f/0xb0 net/core/net-sysfs.c:1886 device_release+0x96/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:713 [inline] kobject_release lib/kobject.c:744 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x18a/0x270 lib/kobject.c:761 netdev_run_todo+0xc06/0xda0 net/core/dev.c:10363 rtnl_unlock net/core/rtnetlink.c:112 [inline] rtnetlink_rcv_msg+0xa24/0xca0 net/core/rtnetlink.c:5623 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2508 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5640 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x86c/0xa30 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x949/0xb70 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2377 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2431 Memory state around the buggy address: ffff888125b07f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888125b07f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888125b08000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888125b08080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888125b08100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================