================================================================== 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:1075 Read of size 4 at addr ffff88808763b8bc by task syz-executor.0/8769 CPU: 1 PID: 8769 Comm: syz-executor.0 Not tainted 5.2.0-rc2+ #19 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:1075 rt6_get_pcpu_route net/ipv6/route.c:1304 [inline] ip6_pol_route+0x2e9/0xf40 net/ipv6/route.c:2055 ip6_pol_route_input+0x65/0x80 net/ipv6/route.c:2074 __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:2086 ip6_route_input+0x5e2/0x9e0 net/ipv6/route.c:2221 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:4985 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5099 netif_receive_skb_internal+0x108/0x390 net/core/dev.c:5189 napi_frags_finish net/core/dev.c:5740 [inline] napi_gro_frags+0xad9/0xd10 net/core/dev.c:5814 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:00007f90f0887ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000000140 RCX: 0000000000459131 RDX: 0000000000000001 RSI: 00007f90f0887c00 RDI: 00000000000000f0 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f90f08886d4 R13: 00000000004c7f9b R14: 00000000004de700 R15: 00000000ffffffff Allocated by task 15393: 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 __do_kmalloc mm/slab.c:3660 [inline] __kmalloc+0x15c/0x740 mm/slab.c:3669 kmalloc include/linux/slab.h:552 [inline] tomoyo_realpath_from_path+0xcd/0x7a0 security/tomoyo/realpath.c:277 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x230/0x430 security/tomoyo/file.c:822 tomoyo_path_symlink+0xaa/0xf0 security/tomoyo/tomoyo.c:206 security_path_symlink+0x10a/0x170 security/security.c:1014 do_symlinkat+0x137/0x290 fs/namei.c:4150 __do_sys_symlink fs/namei.c:4171 [inline] __se_sys_symlink fs/namei.c:4169 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4169 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 15393: 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 tomoyo_realpath_from_path+0x1de/0x7a0 security/tomoyo/realpath.c:319 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x230/0x430 security/tomoyo/file.c:822 tomoyo_path_symlink+0xaa/0xf0 security/tomoyo/tomoyo.c:206 security_path_symlink+0x10a/0x170 security/security.c:1014 do_symlinkat+0x137/0x290 fs/namei.c:4150 __do_sys_symlink fs/namei.c:4171 [inline] __se_sys_symlink fs/namei.c:4169 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4169 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 ffff88808763a540 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 892 bytes to the right of 4096-byte region [ffff88808763a540, ffff88808763b540) The buggy address belongs to the page: page:ffffea00021d8e80 refcount:1 mapcount:0 mapping:ffff8880aa400dc0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0001803688 ffffea0002151408 ffff8880aa400dc0 raw: 0000000000000000 ffff88808763a540 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808763b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808763b800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808763b880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808763b900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808763b980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================