================================================================== BUG: KASAN: slab-out-of-bounds in __list_add_valid_or_report+0x105/0x130 lib/list_debug.c:29 Read of size 8 at addr ffff888051554600 by task syz.0.460/7658 CPU: 1 UID: 0 PID: 7658 Comm: syz.0.460 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1e0 mm/kasan/report.c:595 __list_add_valid_or_report+0x105/0x130 lib/list_debug.c:29 __list_add_valid include/linux/list.h:96 [inline] __list_add include/linux/list.h:158 [inline] list_add include/linux/list.h:177 [inline] clone_mnt+0x633/0x930 fs/namespace.c:1275 create_new_namespace fs/namespace.c:3098 [inline] open_new_namespace fs/namespace.c:3168 [inline] vfs_open_tree+0xb02/0x1500 fs/namespace.c:3217 __do_sys_open_tree fs/namespace.c:3227 [inline] __se_sys_open_tree fs/namespace.c:3225 [inline] __ia32_sys_open_tree+0xa3/0x150 fs/namespace.c:3225 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe3/0x8c0 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf706ef6c Code: d2 74 05 c1 e8 0c 89 02 8b 5d fc 31 c0 c9 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 58 b8 77 00 00 00 cd 80 0f 0b 8d b6 00 00 00 00 b8 ad RSP: 002b:00000000f545d50c EFLAGS: 00000292 ORIG_RAX: 00000000000001ac RAX: ffffffffffffffda RBX: 00000000ffffff9c RCX: 0000000080000640 RDX: 0000000000001902 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7639: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4459 [inline] slab_alloc_node mm/slub.c:4788 [inline] kmem_cache_alloc_noprof+0x241/0x6e0 mm/slub.c:4795 vm_area_alloc+0x1f/0x160 mm/vma_init.c:32 __mmap_new_vma mm/vma.c:2510 [inline] __mmap_region+0x1027/0x2760 mm/vma.c:2752 mmap_region+0x30a/0x3e0 mm/vma.c:2830 do_mmap+0xc63/0x12f0 mm/mmap.c:558 vm_mmap_pgoff+0x29e/0x470 mm/util.c:581 ksys_mmap_pgoff+0x328/0x5b0 mm/mmap.c:604 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe3/0x8c0 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888051554500 which belongs to the cache vm_area_struct of size 256 The buggy address is located 0 bytes to the right of allocated 256-byte region [ffff888051554500, ffff888051554600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x51554 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888051777401 flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff88804049a140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000800190019 00000000f5000000 ffff888051777401 head: 04fff00000000040 ffff88804049a140 dead000000000122 0000000000000000 head: 0000000000000000 0000000800190019 00000000f5000000 ffff888051777401 head: 04fff00000000001 ffffea0001455501 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5936, tgid 5936 (syz-executor), ts 137265111178, free_ts 136981513385 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1888 prep_new_page mm/page_alloc.c:1896 [inline] get_page_from_freelist+0x111d/0x3140 mm/page_alloc.c:3961 __alloc_frozen_pages_noprof+0x27c/0x2ba0 mm/page_alloc.c:5249 alloc_slab_page mm/slub.c:3238 [inline] allocate_slab mm/slub.c:3411 [inline] new_slab+0xa6/0x6e0 mm/slub.c:3469 refill_objects+0x26b/0x400 mm/slub.c:7091 refill_sheaf mm/slub.c:2787 [inline] alloc_full_sheaf mm/slub.c:2808 [inline] __pcs_replace_empty_main+0x19f/0x600 mm/slub.c:4546 alloc_from_pcs mm/slub.c:4639 [inline] slab_alloc_node mm/slub.c:4773 [inline] kmem_cache_alloc_noprof+0x480/0x6e0 mm/slub.c:4795 vm_area_dup+0x27/0x8e0 mm/vma_init.c:123 dup_mmap+0x6c9/0x1db0 mm/mmap.c:1773 dup_mm kernel/fork.c:1530 [inline] copy_mm kernel/fork.c:1582 [inline] copy_process+0x73d1/0x7a10 kernel/fork.c:2223 kernel_clone+0xfc/0x9a0 kernel/fork.c:2654 __do_compat_sys_ia32_clone+0xd4/0x120 arch/x86/kernel/sys_ia32.c:254 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe3/0x8c0 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e page last free pid 12 tgid 12 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1432 [inline] __free_frozen_pages+0x7ca/0x10a0 mm/page_alloc.c:2977 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xe0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4459 [inline] slab_alloc_node mm/slub.c:4788 [inline] __kmalloc_cache_noprof+0x243/0x6f0 mm/slub.c:5292 kmalloc_noprof include/linux/slab.h:962 [inline] kzalloc_noprof include/linux/slab.h:1204 [inline] kobject_uevent_env+0x263/0x18b0 lib/kobject_uevent.c:540 nfs_netns_sysfs_destroy+0x4c/0xc0 fs/nfs/sysfs.c:213 nfs_clients_exit+0x5a/0x1c0 fs/nfs/client.c:1285 ops_exit_list net/core/net_namespace.c:199 [inline] ops_undo_list+0x2ee/0xab0 net/core/net_namespace.c:252 cleanup_net+0x499/0x920 net/core/net_namespace.c:704 process_one_work+0x9d7/0x1920 kernel/workqueue.c:3275 process_scheduled_works kernel/workqueue.c:3358 [inline] worker_thread+0x5da/0xe40 kernel/workqueue.c:3439 kthread+0x370/0x450 kernel/kthread.c:467 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888051554500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888051554580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888051554600: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff888051554680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888051554700: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: d2 74 05 c1 shlb %cl,-0x3f(%rbp,%rax,1) 4: e8 0c 89 02 8b call 0x8b028915 9: 5d pop %rbp a: fc cld b: 31 c0 xor %eax,%eax d: c9 leave e: c3 ret f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 0f 1f 00 nopl (%rax) 21: 51 push %rcx 22: 52 push %rdx 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 ret 2e: 58 pop %rax 2f: b8 77 00 00 00 mov $0x77,%eax 34: cd 80 int $0x80 36: 0f 0b ud2 38: 8d b6 00 00 00 00 lea 0x0(%rsi),%esi 3e: b8 .byte 0xb8 3f: ad lods %ds:(%rsi),%eax