IPVS: Creating netns size=2536 id=9 ================================================================== BUG: KASAN: use-after-free in do_get_mempolicy+0xb41/0xba0 mm/mempolicy.c:938 at addr ffff8801c89573ee Read of size 2 by task syz-executor6/3977 CPU: 1 PID: 3977 Comm: syz-executor6 Not tainted 4.9.39-g5b07c2d #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c641fcf8 ffffffff81eacd59 ffff8801dac0ec80 ffff8801c89573e8 ffff8801c8957400 ffffed003912ae7d ffff8801c89573ee ffff8801c641fd20 ffffffff81546bfc ffffed003912ae7d ffff8801dac0ec80 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x20d/0x4e0 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:328 [inline] [] __asan_report_load2_noabort+0x29/0x30 mm/kasan/report.c:328 [] do_get_mempolicy+0xb41/0xba0 mm/mempolicy.c:938 [] SYSC_get_mempolicy mm/mempolicy.c:1479 [inline] [] SyS_get_mempolicy+0xc3/0x190 mm/mempolicy.c:1468 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801c89573e8, in cache numa_policy size: 24 Allocated: PID = 3972 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:537 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2715 [inline] slab_alloc mm/slub.c:2723 [inline] kmem_cache_alloc+0xc9/0x2a0 mm/slub.c:2728 __mpol_dup+0x79/0x3c0 mm/mempolicy.c:2104 mpol_dup include/linux/mempolicy.h:89 [inline] vma_replace_policy mm/mempolicy.c:703 [inline] mbind_range mm/mempolicy.c:776 [inline] do_mbind+0x71e/0xb30 mm/mempolicy.c:1240 SYSC_mbind mm/mempolicy.c:1349 [inline] SyS_mbind+0x13b/0x150 mm/mempolicy.c:1331 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 3946 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kmem_cache_free+0xb2/0x2e0 mm/slub.c:2980 __mpol_put+0x26/0x30 mm/mempolicy.c:299 mpol_put include/linux/mempolicy.h:67 [inline] remove_vma+0x12b/0x1a0 mm/mmap.c:174 remove_vma_list mm/mmap.c:2482 [inline] do_munmap+0x7ff/0xeb0 mm/mmap.c:2705 mmap_region+0x14d/0xfe0 mm/mmap.c:1635 do_mmap+0x595/0xbe0 mm/mmap.c:1473 do_mmap_pgoff include/linux/mm.h:2014 [inline] vm_mmap_pgoff+0x158/0x1a0 mm/util.c:305 SYSC_mmap_pgoff mm/mmap.c:1523 [inline] SyS_mmap_pgoff+0x1fc/0x580 mm/mmap.c:1481 SYSC_mmap arch/x86/kernel/sys_x86_64.c:95 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:86 entry_SYSCALL_64_fastpath+0x23/0xc6 Memory state around the buggy address: ffff8801c8957280: fb fb fb fc fc fb fb fb fc fc fb fb fb fc fc fb ffff8801c8957300: fb fb fc fc fb fb fb fc fc fb fb fb fc fc fb fb >ffff8801c8957380: fb fc fc fb fb fb fc fc fb fb fb fc fc fb fb fb ^ ffff8801c8957400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c8957480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== IPVS: Creating netns size=2536 id=10 ================================================================== BUG: KASAN: use-after-free in do_get_mempolicy+0xb23/0xba0 mm/mempolicy.c:938 at addr ffff8801c89573f8 Read of size 8 by task syz-executor6/3977 CPU: 1 PID: 3977 Comm: syz-executor6 Tainted: G B 4.9.39-g5b07c2d #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c641fcf8 ffffffff81eacd59 ffff8801dac0ec80 ffff8801c89573e8 ffff8801c8957400 ffffed003912ae7f ffff8801c89573f8 ffff8801c641fd20 ffffffff81546bfc ffffed003912ae7f ffff8801dac0ec80 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x20d/0x4e0 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:330 [inline] [] __asan_report_load8_noabort+0x29/0x30 mm/kasan/report.c:330 [] do_get_mempolicy+0xb23/0xba0 mm/mempolicy.c:938 [] SYSC_get_mempolicy mm/mempolicy.c:1479 [inline] [] SyS_get_mempolicy+0xc3/0x190 mm/mempolicy.c:1468 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801c89573e8, in cache numa_policy size: 24 Allocated: PID = 3972 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:537 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2715 [inline] slab_alloc mm/slub.c:2723 [inline] kmem_cache_alloc+0xc9/0x2a0 mm/slub.c:2728 __mpol_dup+0x79/0x3c0 mm/mempolicy.c:2104 mpol_dup include/linux/mempolicy.h:89 [inline] vma_replace_policy mm/mempolicy.c:703 [inline] mbind_range mm/mempolicy.c:776 [inline] do_mbind+0x71e/0xb30 mm/mempolicy.c:1240 SYSC_mbind mm/mempolicy.c:1349 [inline] SyS_mbind+0x13b/0x150 mm/mempolicy.c:1331 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 3946 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kmem_cache_free+0xb2/0x2e0 mm/slub.c:2980 __mpol_put+0x26/0x30 mm/mempolicy.c:299 mpol_put include/linux/mempolicy.h:67 [inline] remove_vma+0x12b/0x1a0 mm/mmap.c:174 remove_vma_list mm/mmap.c:2482 [inline] do_munmap+0x7ff/0xeb0 mm/mmap.c:2705 mmap_region+0x14d/0xfe0 mm/mmap.c:1635 do_mmap+0x595/0xbe0 mm/mmap.c:1473 do_mmap_pgoff include/linux/mm.h:2014 [inline] vm_mmap_pgoff+0x158/0x1a0 mm/util.c:305 SYSC_mmap_pgoff mm/mmap.c:1523 [inline] SyS_mmap_pgoff+0x1fc/0x580 mm/mmap.c:1481 SYSC_mmap arch/x86/kernel/sys_x86_64.c:95 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:86 entry_SYSCALL_64_fastpath+0x23/0xc6 Memory state around the buggy address: ffff8801c8957280: fb fb fb fc fc fb fb fb fc fc fb fb fb fc fc fb ffff8801c8957300: fb fb fc fc fb fb fb fc fc fb fb fb fc fc fb fb >ffff8801c8957380: fb fc fc fb fb fb fc fc fb fb fb fc fc fb fb fb ^ ffff8801c8957400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c8957480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ================================================================== BUG: KASAN: use-after-free in mpol_needs_cond_ref include/linux/mempolicy.h:76 [inline] at addr ffff8801c89573ee BUG: KASAN: use-after-free in mpol_cond_put include/linux/mempolicy.h:81 [inline] at addr ffff8801c89573ee BUG: KASAN: use-after-free in do_get_mempolicy+0xaee/0xba0 mm/mempolicy.c:947 at addr ffff8801c89573ee Read of size 2 by task syz-executor6/3977 CPU: 1 PID: 3977 Comm: syz-executor6 Tainted: G B 4.9.39-g5b07c2d #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c641fcf8 ffffffff81eacd59 ffff8801dac0ec80 ffff8801c89573e8 ffff8801c8957400 ffffed003912ae7d ffff8801c89573ee ffff8801c641fd20 ffffffff81546bfc ffffed003912ae7d ffff8801dac0ec80 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x20d/0x4e0 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:328 [inline] [] __asan_report_load2_noabort+0x29/0x30 mm/kasan/report.c:328 [] mpol_needs_cond_ref include/linux/mempolicy.h:76 [inline] [] mpol_cond_put include/linux/mempolicy.h:81 [inline] [] do_get_mempolicy+0xaee/0xba0 mm/mempolicy.c:947 [] SYSC_get_mempolicy mm/mempolicy.c:1479 [inline] [] SyS_get_mempolicy+0xc3/0x190 mm/mempolicy.c:1468 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801c89573e8, in cache numa_policy size: 24 Allocated: PID = 3972 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:537 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2715 [inline] slab_alloc mm/slub.c:2723 [inline] kmem_cache_alloc+0xc9/0x2a0 mm/slub.c:2728 __mpol_dup+0x79/0x3c0 mm/mempolicy.c:2104 mpol_dup include/linux/mempolicy.h:89 [inline] vma_replace_policy mm/mempolicy.c:703 [inline] mbind_range mm/mempolicy.c:776 [inline] do_mbind+0x71e/0xb30 mm/mempolicy.c:1240 SYSC_mbind mm/mempolicy.c:1349 [inline] SyS_mbind+0x13b/0x150 mm/mempolicy.c:1331 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 3946 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kmem_cache_free+0xb2/0x2e0 mm/slub.c:2980 __mpol_put+0x26/0x30 mm/mempolicy.c:299 mpol_put include/linux/mempolicy.h:67 [inline] remove_vma+0x12b/0x1a0 mm/mmap.c:174 remove_vma_list mm/mmap.c:2482 [inline] do_munmap+0x7ff/0xeb0 mm/mmap.c:2705 mmap_region+0x14d/0xfe0 mm/mmap.c:1635 do_mmap+0x595/0xbe0 mm/mmap.c:1473 do_mmap_pgoff include/linux/mm.h:2014 [inline] vm_mmap_pgoff+0x158/0x1a0 mm/util.c:305 SYSC_mmap_pgoff mm/mmap.c:1523 [inline] SyS_mmap_pgoff+0x1fc/0x580 mm/mmap.c:1481 SYSC_mmap arch/x86/kernel/sys_x86_64.c:95 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:86 entry_SYSCALL_64_fastpath+0x23/0xc6 Memory state around the buggy address: ffff8801c8957280: fb fb fb fc fc fb fb fb fc fc fb fb fb fc fc fb ffff8801c8957300: fb fb fc fc fb fb fb fc fc fb fb fb fc fc fb fb >ffff8801c8957380: fb fc fc fb fb fb fc fc fb fb fb fc fc fb fb fb ^ ffff8801c8957400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c8957480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access binder: 7170:7176 ioctl 4b6b 20410000 returned -22 general protection fault: 0000 [#1] PREEMPT SMP KASAN binder: 7170:7174 ioctl 4b6b 20410000 returned -22 Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 3400 Comm: syz-executor7 Tainted: G B 4.9.39-g5b07c2d #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801d0b91780 task.stack: ffff8801d9ae8000 RIP: 0010:[] [] virt_to_head_page include/linux/mm.h:555 [inline] RIP: 0010:[] [] qlink_to_cache mm/kasan/quarantine.c:132 [inline] RIP: 0010:[] [] quarantine_reduce+0x101/0x1b0 mm/kasan/quarantine.c:226 RSP: 0018:ffff8801d9aefb30 EFLAGS: 00010003 RAX: 03fe0be7227c8b80 RBX: 0000000000000000 RCX: 0000000002e80e00 RDX: ff8801c89f22e800 RSI: 0000000080000000 RDI: ffffea0000000000 RBP: ffff8801d9aefb60 R08: 000077ff80000000 R09: 0000000000000292 R10: 0000000009572630 R11: ffff8801cdfc4780 R12: 000077ff80000000 R13: fffffffffffff990 R14: ffffffff8112cd81 R15: ffff8801daca0b40 FS: 0000000000b3b940(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000096000a CR3: 00000001d9903000 CR4: 00000000001406e0 Stack: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ffff8801adabde00 00000000024000c0 ffff8801d9aefba0 ffffffff8154618a 0000000000001680 0000000000000000 00000000024000c0 ffff8801adabde00 Call Trace: [] kasan_kmalloc+0xca/0xe0 mm/kasan/kasan.c:583 [] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:537 [] slab_post_alloc_hook mm/slab.h:417 [inline] [] slab_alloc_node mm/slub.c:2715 [inline] [] kmem_cache_alloc_node+0x107/0x2a0 mm/slub.c:2751 [] alloc_task_struct_node kernel/fork.c:142 [inline] [] dup_task_struct kernel/fork.c:480 [inline] [] copy_process.part.39+0x1771/0x5f70 kernel/fork.c:1511 [] copy_process kernel/fork.c:1482 [inline] [] _do_fork+0x1b8/0xd50 kernel/fork.c:1940 [] SYSC_clone kernel/fork.c:2050 [inline] [] SyS_clone+0x37/0x50 kernel/fork.c:2044 [] do_syscall_64+0x197/0x490 arch/x86/entry/common.c:280 [] entry_SYSCALL64_slow_path+0x25/0x25 Code: c1 e8 02 49 29 c5 49 39 cd 72 44 4c 89 e2 48 89 d0 48 01 f0 0f 82 b5 00 00 00 4d 89 c4 4c 01 e0 48 c1 e8 0c 48 c1 e0 06 48 01 f8 <4c> 8b 60 20 4d 8d 6c 24 ff 41 83 e4 01 4c 8b 22 49 0f 45 c5 48 RIP [] virt_to_head_page include/linux/mm.h:555 [inline] RIP [] qlink_to_cache mm/kasan/quarantine.c:132 [inline] RIP [] quarantine_reduce+0x101/0x1b0 mm/kasan/quarantine.c:226 RSP ---[ end trace 4f262e36984211f7 ]---