================================================================== 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:1166 Read of size 4 at addr ffff8880a1758c1c by task syz-executor.2/2798 CPU: 0 PID: 2798 Comm: syz-executor.2 Not tainted 5.2.0-rc3+ #31 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:1166 rt6_get_pcpu_route net/ipv6/route.c:1395 [inline] ip6_pol_route+0x2e9/0xe40 net/ipv6/route.c:2251 ip6_pol_route_output+0x54/0x70 net/ipv6/route.c:2427 fib6_rule_lookup+0x133/0x5a0 net/ipv6/fib6_rules.c:116 ip6_route_output_flags+0x2c4/0x350 net/ipv6/route.c:2456 ip6_route_output include/net/ip6_route.h:93 [inline] ip6_dst_lookup_tail+0xd1f/0x1f90 net/ipv6/ip6_output.c:1022 ip6_dst_lookup_flow+0xa8/0x220 net/ipv6/ip6_output.c:1150 tcp_v6_connect+0xda3/0x1ff0 net/ipv6/tcp_ipv6.c:278 __inet_stream_connect+0x834/0xe90 net/ipv4/af_inet.c:655 tcp_sendmsg_fastopen net/ipv4/tcp.c:1139 [inline] tcp_sendmsg_locked+0x2318/0x3920 net/ipv4/tcp.c:1181 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1415 inet_sendmsg+0x141/0x5d0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:665 __sys_sendto+0x262/0x380 net/socket.c:1958 __do_sys_sendto net/socket.c:1970 [inline] __se_sys_sendto net/socket.c:1966 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1966 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4592c9 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fd5f0f50c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000004592c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 000000000075bf20 R08: 000000002031e000 R09: 000000000000001c R10: 0000000020000004 R11: 0000000000000246 R12: 00007fd5f0f516d4 R13: 00000000004c707f R14: 00000000004dc260 R15: 00000000ffffffff Allocated by task 2789: 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_check_open_permission+0x2a8/0x3f0 security/tomoyo/file.c:771 tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline] tomoyo_file_open+0xa9/0xd0 security/tomoyo/tomoyo.c:314 security_file_open+0x71/0x300 security/security.c:1454 do_dentry_open+0x373/0x1250 fs/open.c:765 vfs_open+0xa0/0xd0 fs/open.c:887 do_last fs/namei.c:3416 [inline] path_openat+0x10e9/0x46d0 fs/namei.c:3533 do_filp_open+0x1a1/0x280 fs/namei.c:3563 do_sys_open+0x3fe/0x5d0 fs/open.c:1070 __do_sys_open fs/open.c:1088 [inline] __se_sys_open fs/open.c:1083 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1083 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 2789: 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_check_open_permission+0x2a8/0x3f0 security/tomoyo/file.c:771 tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline] tomoyo_file_open+0xa9/0xd0 security/tomoyo/tomoyo.c:314 security_file_open+0x71/0x300 security/security.c:1454 do_dentry_open+0x373/0x1250 fs/open.c:765 vfs_open+0xa0/0xd0 fs/open.c:887 do_last fs/namei.c:3416 [inline] path_openat+0x10e9/0x46d0 fs/namei.c:3533 do_filp_open+0x1a1/0x280 fs/namei.c:3563 do_sys_open+0x3fe/0x5d0 fs/open.c:1070 __do_sys_open fs/open.c:1088 [inline] __se_sys_open fs/open.c:1083 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1083 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 ffff8880a1758c40 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 36 bytes to the left of 4096-byte region [ffff8880a1758c40, ffff8880a1759c40) The buggy address belongs to the page: page:ffffea000285d600 refcount:1 mapcount:0 mapping:ffff8880aa400dc0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00011e2908 ffffea00022dd788 ffff8880aa400dc0 raw: 0000000000000000 ffff8880a1758c40 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a1758b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a1758b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a1758c00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880a1758c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a1758d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================