================================================================== BUG: KASAN: use-after-free in file_inode include/linux/fs.h:1343 [inline] BUG: KASAN: use-after-free in lock_get_status+0x209/0x9a0 fs/locks.c:2861 Read of size 8 at addr ffff88813d1179a0 by task syz.0.19133/24655 CPU: 1 PID: 24655 Comm: syz.0.19133 Tainted: G W 5.10.226-syzkaller-00184-g139a6bb26d9d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309 file_inode include/linux/fs.h:1343 [inline] lock_get_status+0x209/0x9a0 fs/locks.c:2861 locks_show+0x234/0x350 fs/locks.c:2936 traverse+0x1d0/0x530 fs/seq_file.c:111 seq_read_iter+0xc24/0xd00 fs/seq_file.c:195 proc_reg_read_iter+0x1ba/0x290 fs/proc/inode.c:310 do_iter_readv_writev+0x58e/0x790 do_iter_read+0x177/0x650 fs/read_write.c:801 vfs_readv fs/read_write.c:921 [inline] do_preadv+0x20e/0x350 fs/read_write.c:1013 __do_sys_preadv fs/read_write.c:1063 [inline] __se_sys_preadv fs/read_write.c:1058 [inline] __x64_sys_preadv+0x9e/0xb0 fs/read_write.c:1058 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f2b22b91809 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:00007f2b21208058 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00007f2b22d56fa0 RCX: 00007f2b22b91809 RDX: 0000000000000001 RSI: 0000000020004ec0 RDI: 0000000000000008 RBP: 00007f2b22c0493e R08: 0000000000000008 R09: 0000000000000000 R10: 00000000000004bd R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2b22d56fa0 R15: 00007ffee9bc0598 Allocated by task 23895: 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+0xb1/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] nlmsg_new include/net/netlink.h:953 [inline] audit_buffer_alloc kernel/audit.c:1799 [inline] audit_log_start+0x4ae/0x9b0 kernel/audit.c:1917 audit_seccomp+0x61/0x1e0 kernel/auditsc.c:2675 seccomp_log kernel/seccomp.c:1004 [inline] __seccomp_filter+0xd03/0x1e10 kernel/seccomp.c:1247 __secure_computing+0xf0/0x300 kernel/seccomp.c:1313 syscall_trace_enter kernel/entry/common.c:58 [inline] __syscall_enter_from_user_work kernel/entry/common.c:81 [inline] syscall_enter_from_user_mode+0xbf/0x1a0 kernel/entry/common.c:99 do_syscall_64+0x13/0x70 arch/x86/entry/common.c:41 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 24: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kmem_cache_free+0xa9/0x1e0 mm/slub.c:3219 kfree_skbmem+0x104/0x170 __kfree_skb net/core/skbuff.c:695 [inline] kfree_skb+0xc1/0x320 net/core/skbuff.c:713 kauditd_hold_skb+0x115/0x200 kernel/audit.c:614 kauditd_send_queue+0x28d/0x2e0 kernel/audit.c:769 kauditd_thread+0x523/0x890 kernel/audit.c:893 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff88813d1178c0 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 224 bytes inside of 248-byte region [ffff88813d1178c0, ffff88813d1179b8) The buggy address belongs to the page: page:ffffea0004f445c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13d117 flags: 0x4000000000000200(slab) raw: 4000000000000200 ffffea0004949bc0 0000000b00000008 ffff888107d9cd80 raw: 0000000000000000 00000000000c000c 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 5300, ts 1294133710492, free_ts 1293308205521 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] ip_frag_next+0xe2/0xa20 net/ipv4/ip_output.c:701 ip_do_fragment+0xb4a/0x2310 net/ipv4/ip_output.c:910 ip_fragment+0x123/0x210 __ip_finish_output+0x557/0x740 net/ipv4/ip_output.c:313 ip_finish_output+0x34/0x1e0 net/ipv4/ip_output.c:325 NF_HOOK_COND include/linux/netfilter.h:288 [inline] ip_mc_output+0x3d3/0xa30 net/ipv4/ip_output.c:424 dst_output include/net/dst.h:437 [inline] ip_local_out+0x92/0xb0 net/ipv4/ip_output.c:126 iptunnel_xmit+0x470/0x850 net/ipv4/ip_tunnel_core.c:82 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_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page mm/page_alloc.c:3391 [inline] free_the_page+0x9e/0x370 mm/page_alloc.c:5407 __free_pages+0x67/0xc0 mm/page_alloc.c:5418 __vunmap+0x7bc/0x8f0 mm/vmalloc.c:2301 free_work+0x5b/0x80 mm/vmalloc.c:69 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Memory state around the buggy address: ffff88813d117880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88813d117900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88813d117980: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc ^ ffff88813d117a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88813d117a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ================================================================== general protection fault, probably for non-canonical address 0xeeac200745262610: 0000 [#1] PREEMPT SMP KASAN KASAN: maybe wild-memory-access in range [0x7561203a29313080-0x7561203a29313087] CPU: 1 PID: 24655 Comm: syz.0.19133 Tainted: G B W 5.10.226-syzkaller-00184-g139a6bb26d9d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:mandatory_lock include/linux/fs.h:2495 [inline] RIP: 0010:lock_get_status+0x3a3/0x9a0 fs/locks.c:2874 Code: 80 3c 08 00 4c 8b 75 d0 74 08 48 89 df e8 45 09 df ff 48 8b 1b 48 83 c3 50 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 1f 09 df ff 48 8b 1b 48 89 de 48 83 RSP: 0018:ffffc90000c978d8 EFLAGS: 00010202 RAX: 0eac240745262610 RBX: 7561203a29313081 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000282 RDI: ffff8881258f4028 RBP: ffffc90000c97938 R08: dffffc0000000000 R09: ffffed1022b05802 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000 R13: ffff88810f25a7d0 R14: ffff88810d78e3a8 R15: ffff8881258f4000 FS: 00007f2b212086c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000122999000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: locks_show+0x234/0x350 fs/locks.c:2936 traverse+0x1d0/0x530 fs/seq_file.c:111 seq_read_iter+0xc24/0xd00 fs/seq_file.c:195 proc_reg_read_iter+0x1ba/0x290 fs/proc/inode.c:310 do_iter_readv_writev+0x58e/0x790 do_iter_read+0x177/0x650 fs/read_write.c:801 vfs_readv fs/read_write.c:921 [inline] do_preadv+0x20e/0x350 fs/read_write.c:1013 __do_sys_preadv fs/read_write.c:1063 [inline] __se_sys_preadv fs/read_write.c:1058 [inline] __x64_sys_preadv+0x9e/0xb0 fs/read_write.c:1058 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f2b22b91809 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:00007f2b21208058 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00007f2b22d56fa0 RCX: 00007f2b22b91809 RDX: 0000000000000001 RSI: 0000000020004ec0 RDI: 0000000000000008 RBP: 00007f2b22c0493e R08: 0000000000000008 R09: 0000000000000000 R10: 00000000000004bd R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2b22d56fa0 R15: 00007ffee9bc0598 Modules linked in: ---[ end trace 5ac510e34ce875c1 ]--- RIP: 0010:mandatory_lock include/linux/fs.h:2495 [inline] RIP: 0010:lock_get_status+0x3a3/0x9a0 fs/locks.c:2874 Code: 80 3c 08 00 4c 8b 75 d0 74 08 48 89 df e8 45 09 df ff 48 8b 1b 48 83 c3 50 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 1f 09 df ff 48 8b 1b 48 89 de 48 83 RSP: 0018:ffffc90000c978d8 EFLAGS: 00010202 RAX: 0eac240745262610 RBX: 7561203a29313081 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000282 RDI: ffff8881258f4028 RBP: ffffc90000c97938 R08: dffffc0000000000 R09: ffffed1022b05802 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000 R13: ffff88810f25a7d0 R14: ffff88810d78e3a8 R15: ffff8881258f4000 FS: 00007f2b212086c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000122999000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) 4: 4c 8b 75 d0 mov -0x30(%rbp),%r14 8: 74 08 je 0x12 a: 48 89 df mov %rbx,%rdi d: e8 45 09 df ff call 0xffdf0957 12: 48 8b 1b mov (%rbx),%rbx 15: 48 83 c3 50 add $0x50,%rbx 19: 48 89 d8 mov %rbx,%rax 1c: 48 c1 e8 03 shr $0x3,%rax 20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx 27: fc ff df * 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction 2e: 74 08 je 0x38 30: 48 89 df mov %rbx,%rdi 33: e8 1f 09 df ff call 0xffdf0957 38: 48 8b 1b mov (%rbx),%rbx 3b: 48 89 de mov %rbx,%rsi 3e: 48 rex.W 3f: 83 .byte 0x83