================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:218 [inline] BUG: KASAN: use-after-free in atomic_read arch/x86/include/asm/atomic.h:26 [inline] BUG: KASAN: use-after-free in __atomic_add_unless arch/x86/include/asm/atomic.h:211 [inline] BUG: KASAN: use-after-free in atomic_add_unless include/linux/atomic.h:437 [inline] BUG: KASAN: use-after-free in sk_dst_get include/net/sock.h:1745 [inline] BUG: KASAN: use-after-free in sk_dst_check+0x347/0x380 net/core/sock.c:546 Read of size 4 at addr ffff8800b430a800 by task syz-executor.5/13280 CPU: 1 PID: 13280 Comm: syz-executor.5 Not tainted 4.4.174+ #17 0000000000000000 1da1591abfa979de ffff8800b4b27698 ffffffff81aad1a1 0000000000000000 ffffea0002d0c280 ffff8800b430a800 0000000000000004 0000000000000000 ffff8800b4b276d0 ffffffff81490120 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_address_description+0x6f/0x21b mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report mm/kasan/report.c:408 [inline] [] kasan_report.cold+0x8c/0x2be mm/kasan/report.c:393 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:428 [] __read_once_size include/linux/compiler.h:218 [inline] [] atomic_read arch/x86/include/asm/atomic.h:26 [inline] [] __atomic_add_unless arch/x86/include/asm/atomic.h:211 [inline] [] atomic_add_unless include/linux/atomic.h:437 [inline] [] sk_dst_get include/net/sock.h:1745 [inline] [] sk_dst_check+0x347/0x380 net/core/sock.c:546 [] udp_sendmsg+0x114f/0x1c60 net/ipv4/udp.c:1019 [] inet_sendmsg+0x202/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbe/0x110 net/socket.c:648 [] ___sys_sendmsg+0x369/0x890 net/socket.c:1975 [] __sys_sendmmsg+0x1d6/0x2e0 net/socket.c:2053 [] C_SYSC_sendmmsg net/compat.c:731 [inline] [] compat_SyS_sendmmsg+0x32/0x40 net/compat.c:728 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a Allocated by task 13280: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc.part.0+0x62/0xf0 mm/kasan/kasan.c:616 [] kasan_kmalloc+0xb7/0xd0 mm/kasan/kasan.c:601 [] kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:554 [] slab_post_alloc_hook mm/slub.c:1349 [inline] [] slab_alloc_node mm/slub.c:2615 [inline] [] slab_alloc mm/slub.c:2623 [inline] [] kmem_cache_alloc+0xdc/0x2c0 mm/slub.c:2628 [] dst_alloc+0xf3/0x1b0 net/core/dst.c:210 [] ipv4_blackhole_route+0x30/0x720 net/ipv4/route.c:2396 [] make_blackhole net/xfrm/xfrm_policy.c:2161 [inline] [] xfrm_lookup_route net/xfrm/xfrm_policy.c:2331 [inline] [] xfrm_lookup_route+0xf4/0x140 net/xfrm/xfrm_policy.c:2322 [] ip_route_output_flow+0x93/0xa0 net/ipv4/route.c:2437 [] udp_sendmsg+0x1537/0x1c60 net/ipv4/udp.c:1040 [] inet_sendmsg+0x202/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbe/0x110 net/socket.c:648 [] ___sys_sendmsg+0x369/0x890 net/socket.c:1975 [] __sys_sendmmsg+0x1d6/0x2e0 net/socket.c:2053 [] C_SYSC_sendmmsg net/compat.c:731 [inline] [] compat_SyS_sendmmsg+0x32/0x40 net/compat.c:728 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a Freed by task 9682: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kmem_cache_free+0xbe/0x350 mm/slub.c:2881 [] dst_destroy+0x26f/0x330 net/core/dst.c:270 [] dst_gc_task+0x1be/0x530 net/core/dst.c:89 [] process_one_work+0x825/0x1720 kernel/workqueue.c:2064 [] worker_thread+0x4e4/0xf50 kernel/workqueue.c:2196 [] kthread+0x273/0x310 kernel/kthread.c:211 [] ret_from_fork+0x55/0x80 arch/x86/entry/entry_64.S:537 The buggy address belongs to the object at ffff8800b430a780 which belongs to the cache ip_dst_cache of size 208 The buggy address is located 128 bytes inside of 208-byte region [ffff8800b430a780, ffff8800b430a850) The buggy address belongs to the page: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 13279 Comm: syz-executor.5 Not tainted 4.4.174+ #17 task: ffff8801d55b8000 task.stack: ffff8800a1360000 RIP: 0010:[] [] rb_next+0xd7/0x140 lib/rbtree.c:489 RSP: 0018:ffff8801db607d40 EFLAGS: 00010002 RAX: 000033e200000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: 0000067c40000002 RSI: ffffffff81aca27a RDI: 000033e200000010 RBP: ffff8801db607d68 R08: 0000000000000004 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800b431ebd0 R13: ffff8800b430a780 R14: dffffc0000000000 R15: ffff8801db6192c0 FS: 0000000000000000(0000) GS:ffff8801db600000(0063) knlGS:00000000f551db40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 000000002043e1ff CR3: 00000001ced7b000 CR4: 00000000001606b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8801db607d80 ffff8800b431ebd0 ffff8801db619390 ffff8801db619398 0000000000000000 ffff8801db607d98 ffffffff81aca282 ffff8801d55b8000 ffff8800b431ebd0 ffff8801db619380 0000000000000000 ffff8801db607dd0 Call Trace: [] timerqueue_del+0xd2/0x170 lib/timerqueue.c:81 [] __remove_hrtimer+0x8e/0x250 kernel/time/hrtimer.c:917 [] __run_hrtimer kernel/time/hrtimer.c:1242 [inline] [] __hrtimer_run_queues+0x282/0xfc0 kernel/time/hrtimer.c:1325 [] hrtimer_interrupt+0x1b6/0x450 kernel/time/hrtimer.c:1359 [] local_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:901 [] smp_apic_timer_interrupt+0x79/0xb0 arch/x86/kernel/apic/apic.c:925 [] apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:768 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 [] dump_page+0x20/0x30 mm/debug.c:105 [] page_mapcount include/linux/mm.h:464 [inline] [] dump_page_badflags+0x56/0x70 mm/debug.c:85 Code: 2b 49 89 dc 4c 89 eb 48 83 e3 fc 48 89 d8 75 c8 48 83 c4 08 5b 41 5c 41 5d 41 5e 5d c3 48 89 d0 48 8d 78 10 48 89 fa 48 c1 ea 03 <80> 3c 1a 00 75 1a 48 8b 50 10 48 85 d2 75 e3 48 83 c4 08 5b 41 RIP [] rb_next+0xd7/0x140 lib/rbtree.c:489 RSP ---[ end trace 793bcba92a762f33 ]---