================================================================== BUG: KASAN: slab-out-of-bounds in atomic_read include/asm-generic/atomic-instrumented.h:26 [inline] BUG: KASAN: slab-out-of-bounds in atomic_fetch_add_unless include/linux/atomic-fallback.h:1086 [inline] BUG: KASAN: slab-out-of-bounds in atomic_add_unless include/linux/atomic-fallback.h:1111 [inline] BUG: KASAN: slab-out-of-bounds in atomic_inc_not_zero include/linux/atomic-fallback.h:1127 [inline] BUG: KASAN: slab-out-of-bounds in dst_hold_safe include/net/dst.h:297 [inline] BUG: KASAN: slab-out-of-bounds in ip6_hold_safe+0xad/0x380 net/ipv6/route.c:1050 Read of size 4 at addr ffff8880991dffc4 by task syz-executor.1/1274 CPU: 1 PID: 1274 Comm: syz-executor.1 Not tainted 5.2.0-rc1+ #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x123/0x190 mm/kasan/generic.c:191 kasan_check_read+0x11/0x20 mm/kasan/common.c:94 atomic_read include/asm-generic/atomic-instrumented.h:26 [inline] atomic_fetch_add_unless include/linux/atomic-fallback.h:1086 [inline] atomic_add_unless include/linux/atomic-fallback.h:1111 [inline] atomic_inc_not_zero include/linux/atomic-fallback.h:1127 [inline] dst_hold_safe include/net/dst.h:297 [inline] ip6_hold_safe+0xad/0x380 net/ipv6/route.c:1050 rt6_get_pcpu_route net/ipv6/route.c:1277 [inline] ip6_pol_route+0x339/0x10f0 net/ipv6/route.c:1956 ip6_pol_route_input+0x65/0x80 net/ipv6/route.c:1975 __fib6_rule_action net/ipv6/fib6_rules.c:230 [inline] fib6_rule_action+0x49c/0xb40 net/ipv6/fib6_rules.c:261 fib_rules_lookup+0x34c/0xa90 net/core/fib_rules.c:304 fib6_rule_lookup+0x384/0x5a0 net/ipv6/fib6_rules.c:108 ip6_route_input_lookup+0xb7/0xd0 net/ipv6/route.c:1987 ip6_route_input+0x5e2/0x9e0 net/ipv6/route.c:2122 ip6_rcv_finish_core.isra.0+0x174/0x590 net/ipv6/ip6_input.c:67 ip6_rcv_finish+0x17a/0x310 net/ipv6/ip6_input.c:78 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:276 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:4990 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5104 netif_receive_skb_internal+0x117/0x5c0 net/core/dev.c:5207 napi_frags_finish net/core/dev.c:5774 [inline] napi_gro_frags+0xada/0xd10 net/core/dev.c:5848 tun_get_user+0x2f3c/0x3ff0 drivers/net/tun.c:1991 tun_chr_write_iter+0xbd/0x156 drivers/net/tun.c:2037 call_write_iter include/linux/fs.h:1872 [inline] do_iter_readv_writev+0x5f8/0x8f0 fs/read_write.c:693 do_iter_write fs/read_write.c:970 [inline] do_iter_write+0x184/0x610 fs/read_write.c:951 vfs_writev+0x1b3/0x2f0 fs/read_write.c:1015 do_writev+0x15b/0x330 fs/read_write.c:1058 __do_sys_writev fs/read_write.c:1131 [inline] __se_sys_writev fs/read_write.c:1128 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1128 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459131 Code: 75 14 b8 14 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 34 b9 fb ff c3 48 83 ec 08 e8 fa 2c 00 00 48 89 04 24 b8 14 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 43 2d 00 00 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007f82ce092ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000000066 RCX: 0000000000459131 RDX: 0000000000000001 RSI: 00007f82ce092c00 RDI: 00000000000000f0 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f82ce0939d0 R11: 0000000000000293 R12: 00007f82ce0936d4 R13: 00000000004c7d21 R14: 00000000004de160 R15: 00000000ffffffff Allocated by task 3877: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 kmem_cache_alloc_trace+0x151/0x750 mm/slab.c:3555 kmalloc include/linux/slab.h:547 [inline] kzalloc include/linux/slab.h:742 [inline] kernfs_iop_get_link fs/kernfs/symlink.c:136 [inline] kernfs_iop_get_link+0x6a/0x680 fs/kernfs/symlink.c:127 vfs_readlink+0x201/0x3e0 fs/namei.c:4734 do_readlinkat+0x2ab/0x320 fs/stat.c:411 __do_sys_readlink fs/stat.c:432 [inline] __se_sys_readlink fs/stat.c:429 [inline] __x64_sys_readlink+0x78/0xb0 fs/stat.c:429 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3877: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kfree+0xcf/0x220 mm/slab.c:3755 kfree_link+0x16/0x20 fs/libfs.c:1108 do_delayed_call include/linux/delayed_call.h:28 [inline] vfs_readlink+0x16e/0x3e0 fs/namei.c:4739 do_readlinkat+0x2ab/0x320 fs/stat.c:411 __do_sys_readlink fs/stat.c:432 [inline] __se_sys_readlink fs/stat.c:429 [inline] __x64_sys_readlink+0x78/0xb0 fs/stat.c:429 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880991de180 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3652 bytes to the right of 4096-byte region [ffff8880991de180, ffff8880991df180) The buggy address belongs to the page: page:ffffea0002647780 refcount:1 mapcount:0 mapping:ffff8880aa400dc0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002a26988 ffffea0001ab7b08 ffff8880aa400dc0 raw: 0000000000000000 ffff8880991de180 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880991dfe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880991dff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880991dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880991e0000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880991e0080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================