================================================================== BUG: KASAN: slab-out-of-bounds in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] BUG: KASAN: slab-out-of-bounds in atomic_fetch_add_unless include/linux/atomic.h:575 [inline] BUG: KASAN: slab-out-of-bounds in atomic_add_unless include/linux/atomic.h:597 [inline] BUG: KASAN: slab-out-of-bounds in dst_hold_safe include/net/dst.h:308 [inline] BUG: KASAN: slab-out-of-bounds in ip6_hold_safe+0xca/0x620 net/ipv6/route.c:1023 Read of size 4 at addr ffff888090a73c25 by task syz-executor0/26944 CPU: 0 PID: 26944 Comm: syz-executor0 Not tainted 5.0.0-rc4+ #36 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+0x1db/0x2d0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 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:100 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] atomic_fetch_add_unless include/linux/atomic.h:575 [inline] atomic_add_unless include/linux/atomic.h:597 [inline] dst_hold_safe include/net/dst.h:308 [inline] ip6_hold_safe+0xca/0x620 net/ipv6/route.c:1023 rt6_get_pcpu_route net/ipv6/route.c:1243 [inline] ip6_pol_route+0x3a3/0x1490 net/ipv6/route.c:1892 ip6_pol_route_input+0x65/0x80 net/ipv6/route.c:1911 __fib6_rule_action net/ipv6/fib6_rules.c:233 [inline] fib6_rule_action+0x484/0xc00 net/ipv6/fib6_rules.c:264 fib_rules_lookup+0x467/0xcd0 net/core/fib_rules.c:304 fib6_rule_lookup+0x41c/0x870 net/ipv6/fib6_rules.c:110 ip6_route_input_lookup+0xb7/0xd0 net/ipv6/route.c:1923 ip6_route_input+0x79b/0xe00 net/ipv6/route.c:2058 ip6_rcv_finish_core.isra.0+0x204/0x720 net/ipv6/ip6_input.c:63 ip6_rcv_finish+0x109/0x330 net/ipv6/ip6_input.c:74 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ipv6_rcv+0x113/0x650 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x160/0x210 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083 netif_receive_skb_internal+0x11e/0x690 net/core/dev.c:5186 napi_frags_finish net/core/dev.c:5753 [inline] napi_gro_frags+0xd07/0xfe0 net/core/dev.c:5827 tun_get_user+0x2ec2/0x4150 drivers/net/tun.c:1975 tun_chr_write_iter+0xbd/0x160 drivers/net/tun.c:2020 call_write_iter include/linux/fs.h:1862 [inline] do_iter_readv_writev+0x902/0xbc0 fs/read_write.c:680 __nla_parse: 7 callbacks suppressed netlink: 25 bytes leftover after parsing attributes in process `syz-executor3'. do_iter_write fs/read_write.c:956 [inline] do_iter_write+0x184/0x610 fs/read_write.c:937 vfs_writev+0x1ee/0x370 fs/read_write.c:1001 do_writev+0x11a/0x300 fs/read_write.c:1036 __do_sys_writev fs/read_write.c:1109 [inline] __se_sys_writev fs/read_write.c:1106 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1106 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457f41 Code: 75 14 b8 14 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 a4 b8 fb ff c3 48 83 ec 08 e8 1a 2d 00 00 48 89 04 24 b8 14 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 63 2d 00 00 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007f6d96d11ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 000000000000004a RCX: 0000000000457f41 RDX: 0000000000000001 RSI: 00007f6d96d11bf0 RDI: 00000000000000f0 RBP: 0000000020000180 R08: 00000000000000f0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f6d96d126d4 R13: 00000000004c666a R14: 00000000004db9c8 R15: 00000000ffffffff Allocated by task 8478: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:496 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469 kasan_kmalloc mm/kasan/common.c:504 [inline] kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:411 kmem_cache_alloc+0x12d/0x710 mm/slab.c:3543 dst_alloc+0x10e/0x200 net/core/dst.c:109 ip6_dst_alloc+0x34/0xa0 net/ipv6/route.c:355 ip6_rt_pcpu_alloc net/ipv6/route.c:1223 [inline] rt6_make_pcpu_route net/ipv6/route.c:1253 [inline] ip6_pol_route+0x73c/0x1490 net/ipv6/route.c:1895 ip6_pol_route_input+0x65/0x80 net/ipv6/route.c:1911 fib6_rule_lookup+0x12f/0x870 net/ipv6/fib6_rules.c:118 ip6_route_input_lookup+0xb7/0xd0 net/ipv6/route.c:1923 ip6_route_input+0x79b/0xe00 net/ipv6/route.c:2058 ip6_rcv_finish_core.isra.0+0x204/0x720 net/ipv6/ip6_input.c:63 ip6_rcv_finish+0x109/0x330 net/ipv6/ip6_input.c:74 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ipv6_rcv+0x113/0x650 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x160/0x210 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083 netif_receive_skb_internal+0x11e/0x690 net/core/dev.c:5186 napi_frags_finish net/core/dev.c:5753 [inline] napi_gro_frags+0xd07/0xfe0 net/core/dev.c:5827 tun_get_user+0x2ec2/0x4150 drivers/net/tun.c:1975 tun_chr_write_iter+0xbd/0x160 drivers/net/tun.c:2020 call_write_iter include/linux/fs.h:1862 [inline] do_iter_readv_writev+0x902/0xbc0 fs/read_write.c:680 do_iter_write fs/read_write.c:956 [inline] do_iter_write+0x184/0x610 fs/read_write.c:937 vfs_writev+0x1ee/0x370 fs/read_write.c:1001 do_writev+0x11a/0x300 fs/read_write.c:1036 __do_sys_writev fs/read_write.c:1109 [inline] __se_sys_writev fs/read_write.c:1106 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1106 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888090a73b40 which belongs to the cache ip6_dst_cache of size 224 The buggy address is located 5 bytes to the right of 224-byte region [ffff888090a73b40, ffff888090a73c20) The buggy address belongs to the page: netlink: 25 bytes leftover after parsing attributes in process `syz-executor3'. page:ffffea0002429cc0 count:1 mapcount:0 mapping:ffff88809acc8b00 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002380a08 ffff88809acc9a48 ffff88809acc8b00 raw: 0000000000000000 ffff888090a73000 000000010000000c 0000000000000000 kobject: 'loop2' (00000000bfb7441f): kobject_uevent_env page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888090a73b00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888090a73b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888090a73c00: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc kobject: 'loop2' (00000000bfb7441f): fill_kobj_path: path = '/devices/virtual/block/loop2' ^ ffff888090a73c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888090a73d00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ==================================================================