================================================================== BUG: KASAN: use-after-free in selinux_inode_permission+0x59d/0x6a0 security/selinux/hooks.c:3134 Read of size 4 at addr ffff8881db2da824 by task syz-executor.1/2311 CPU: 0 PID: 2311 Comm: syz-executor.1 Not tainted 5.4.281-syzkaller-04937-gd883a2284ec1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 selinux_inode_permission+0x59d/0x6a0 security/selinux/hooks.c:3134 security_inode_permission+0x9d/0xf0 security/security.c:1223 may_lookup fs/namei.c:1773 [inline] link_path_walk+0x1d1/0x1040 fs/namei.c:2159 path_openat+0x1a3/0x34b0 fs/namei.c:3682 do_filp_open+0x20b/0x450 fs/namei.c:3713 do_sys_open+0x39c/0x810 fs/open.c:1123 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x456e69 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 b4 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f06067110d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000000000055c038 RCX: 0000000000456e69 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00000000004b0cab R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004b02b7 R13: 000000000000006e R14: 000000000055c038 R15: 00007ffd410eefa8 Allocated by task 2311: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x171/0x210 mm/kasan/common.c:529 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] alloc_inode+0x43/0x70 fs/incfs/vfs.c:1569 alloc_inode fs/inode.c:231 [inline] iget5_locked+0x9c/0x260 fs/inode.c:1189 fetch_regular_inode+0x256/0x320 fs/incfs/vfs.c:377 incfs_mount_fs+0x5c3/0xa00 fs/incfs/vfs.c:1864 legacy_get_tree+0xdf/0x170 fs/fs_context.c:648 vfs_get_tree+0x85/0x260 fs/super.c:1556 do_new_mount+0x292/0x570 fs/namespace.c:2843 do_mount+0x688/0xe10 fs/namespace.c:3163 ksys_mount+0xc2/0xf0 fs/namespace.c:3372 __do_sys_mount fs/namespace.c:3386 [inline] __se_sys_mount fs/namespace.c:3383 [inline] __x64_sys_mount+0xb1/0xc0 fs/namespace.c:3383 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 2291: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1b5/0x270 mm/kasan/common.c:487 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook mm/slub.c:1494 [inline] slab_free mm/slub.c:3080 [inline] kfree+0x123/0x370 mm/slub.c:4071 destroy_inode fs/inode.c:281 [inline] evict+0x59d/0x6a0 fs/inode.c:592 dispose_list fs/inode.c:610 [inline] evict_inodes+0x5e1/0x660 fs/inode.c:660 generic_shutdown_super+0x94/0x2a0 fs/super.c:454 kill_anon_super+0x37/0x60 fs/super.c:1117 incfs_kill_sb+0x4c/0x200 fs/incfs/vfs.c:1936 deactivate_locked_super+0xa8/0x110 fs/super.c:335 deactivate_super+0x1e2/0x2a0 fs/super.c:366 cleanup_mnt+0x44e/0x500 fs/namespace.c:1102 task_work_run+0x140/0x170 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x190/0x1a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode+0x199/0x200 arch/x86/entry/common.c:194 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881db2da800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 36 bytes inside of 1024-byte region [ffff8881db2da800, ffff8881db2dac00) The buggy address belongs to the page: page:ffffea00076cb600 refcount:1 mapcount:0 mapping:ffff8881f5c02280 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 ffffea0007ab9e00 0000000500000005 ffff8881f5c02280 raw: 0000000000000000 0000000080100010 00000001ffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893 alloc_slab_page+0x39/0x3c0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x97/0x440 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x2fe/0x490 mm/slub.c:2667 __slab_alloc+0x62/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] __kmalloc_track_caller+0x16d/0x2b0 mm/slub.c:4449 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0xb4/0x4d0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1080 [inline] alloc_uevent_skb+0x74/0x220 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast+0x176/0x560 lib/kobject_uevent.c:412 kobject_uevent_env+0x54d/0x710 lib/kobject_uevent.c:593 netdev_queue_add_kobject net/core/net-sysfs.c:1578 [inline] netdev_queue_update_kobjects+0x1a6/0x3a0 net/core/net-sysfs.c:1595 register_queue_kobjects net/core/net-sysfs.c:1637 [inline] netdev_register_kobject+0x263/0x310 net/core/net-sysfs.c:1858 register_netdevice+0xbc5/0x12a0 net/core/dev.c:9190 __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267 page_owner free stack trace missing Memory state around the buggy address: ffff8881db2da700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881db2da780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881db2da800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881db2da880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881db2da900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================