netlink: 13 bytes leftover after parsing attributes in process `syz-executor5'.
==================================================================
BUG: KASAN: use-after-free in rtnetlink_put_metrics+0x621/0x690 net/core/rtnetlink.c:754
Read of size 4 at addr ffff8801d87ddd80 by task blkid/24428
CPU: 1 PID: 24428 Comm: blkid Not tainted 4.18.0-rc7+ #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+0x1c9/0x2b4 lib/dump_stack.c:113
print_address_description+0x6c/0x20b mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432
IPVS: length: 73 != 8
rtnetlink_put_metrics+0x621/0x690 net/core/rtnetlink.c:754
rt6_fill_node+0x7d9/0x1540 net/ipv6/route.c:4753
inet6_rt_notify+0x161/0x2c0 net/ipv6/route.c:4985
fib6_del_route net/ipv6/ip6_fib.c:1788 [inline]
fib6_del+0xf4d/0x1310 net/ipv6/ip6_fib.c:1815
fib6_clean_node+0x3ee/0x5e0 net/ipv6/ip6_fib.c:1976
fib6_walk_continue+0x4b1/0x8e0 net/ipv6/ip6_fib.c:1899
fib6_walk+0x95/0xf0 net/ipv6/ip6_fib.c:1947
fib6_clean_tree+0x1ea/0x360 net/ipv6/ip6_fib.c:2024
__fib6_clean_all+0x21c/0x420 net/ipv6/ip6_fib.c:2040
fib6_clean_all net/ipv6/ip6_fib.c:2051 [inline]
fib6_run_gc+0x182/0x3d0 net/ipv6/ip6_fib.c:2107
fib6_gc_timer_cb+0x20/0x30 net/ipv6/ip6_fib.c:2124
call_timer_fn+0x242/0x970 kernel/time/timer.c:1326
expire_timers kernel/time/timer.c:1363 [inline]
__run_timers+0x7a6/0xc70 kernel/time/timer.c:1666
run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1692
__do_softirq+0x2e8/0xb17 kernel/softirq.c:292
netlink: 5 bytes leftover after parsing attributes in process `syz-executor5'.
invoke_softirq kernel/softirq.c:372 [inline]
irq_exit+0x1d4/0x210 kernel/softirq.c:412
exiting_irq arch/x86/include/asm/apic.h:527 [inline]
smp_apic_timer_interrupt+0x186/0x730 arch/x86/kernel/apic/apic.c:1055
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:783 [inline]
RIP: 0010:lock_release+0x4dc/0xa30 kernel/locking/lockdep.c:3946
Code: 00 00 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 cd 03 00 00 48 83 3d 5b 92 92 06 00 0f 84 c4 02 00 00 48 8b bd e8 fe ff ff 57 9d <0f> 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 48 01 c3 48 c7 03 00
netlink: 5 bytes leftover after parsing attributes in process `syz-executor5'.
RSP: 0000:ffff880198b36fd0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: dffffc0000000000 RBX: 1ffff10033166dff RCX: 1ffff1003220a18d
RDX: 1ffffffff0fe3615 RSI: 0000000000000004 RDI: 0000000000000286
RBP: ffff880198b37100 R08: 1ffff10033166e03 R09: ffffed003b6246d6
R10: 0000000000000003 R11: 0000000000000003 R12: ffff880191050440
R13: ffffffff87f926a0 R14: ffff880191050440 R15: ffff880198b37018
rcu_lock_release include/linux/rcupdate.h:250 [inline]
rcu_read_unlock include/linux/rcupdate.h:685 [inline]
__unlock_page_memcg+0x72/0x100 mm/memcontrol.c:1654
unlock_page_memcg+0x2c/0x40 mm/memcontrol.c:1663
page_add_file_rmap+0x781/0xe40 mm/rmap.c:1207
alloc_set_pte+0x932/0x1620 mm/memory.c:3456
filemap_map_pages+0x11ff/0x18b0 mm/filemap.c:2677
do_fault_around mm/memory.c:3602 [inline]
do_read_fault mm/memory.c:3636 [inline]
do_fault mm/memory.c:3741 [inline]
handle_pte_fault mm/memory.c:3972 [inline]
__handle_mm_fault+0x3384/0x4460 mm/memory.c:4096
handle_mm_fault+0x53e/0xc80 mm/memory.c:4133
__do_page_fault+0x620/0xe50 arch/x86/mm/fault.c:1396
do_page_fault+0xf6/0x8c0 arch/x86/mm/fault.c:1471
page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1160
RIP: 0033:0x7f9d47f97900
Code: ff 48 8d 3a 48 81 ec 80 00 00 00 e8 8a d4 03 00 48 81 c4 80 00 00 00 e9 73 ff ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 3f 00 00 00 0f 05 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d 01 95 2d
RSP: 002b:00007ffd850432b8 EFLAGS: 00010206
RAX: 00000000ffffffff RBX: 0000000000000003 RCX: 0000000000002000
RDX: 0000000000006000 RSI: 00000000024a7040 RDI: 00007ffd850432d0
RBP: 00000000024a7040 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 00007f9d47f97900 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000005
Allocated by task 20765:
save_stack+0x43/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553
kmem_cache_alloc_trace+0x152/0x780 mm/slab.c:3620
kmalloc include/linux/slab.h:513 [inline]
kzalloc include/linux/slab.h:707 [inline]
fib6_metric_set+0x163/0x2c0 net/ipv6/ip6_fib.c:645
fib6_add_rt2node+0xe36/0x27f0 net/ipv6/ip6_fib.c:1000
fib6_add+0xaae/0x14d0 net/ipv6/ip6_fib.c:1308
__ip6_ins_rt+0x54/0x80 net/ipv6/route.c:1163
ip6_route_add+0x6d/0xc0 net/ipv6/route.c:3171
addrconf_prefix_route.isra.48+0x51d/0x720 net/ipv6/addrconf.c:2347
inet6_addr_modify net/ipv6/addrconf.c:4627 [inline]
inet6_rtm_newaddr+0x112e/0x1b50 net/ipv6/addrconf.c:4743
rtnetlink_rcv_msg+0x46e/0xc30 net/core/rtnetlink.c:4665
netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2453
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4683
netlink_unicast_kernel net/netlink/af_netlink.c:1315 [inline]
netlink_unicast+0x5a0/0x760 net/netlink/af_netlink.c:1341
netlink_sendmsg+0xa18/0xfd0 net/netlink/af_netlink.c:1906
sock_sendmsg_nosec net/socket.c:642 [inline]
sock_sendmsg+0xd5/0x120 net/socket.c:652
___sys_sendmsg+0x7fd/0x930 net/socket.c:2126
__sys_sendmsg+0x11d/0x290 net/socket.c:2164
__do_sys_sendmsg net/socket.c:2173 [inline]
__se_sys_sendmsg net/socket.c:2171 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2171
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 24428:
save_stack+0x43/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
__kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528
__cache_free mm/slab.c:3498 [inline]
kfree+0xd9/0x260 mm/slab.c:3813
fib6_metrics_release+0x77/0x90 net/ipv6/ip6_fib.c:179
fib6_drop_pcpu_from net/ipv6/ip6_fib.c:899 [inline]
fib6_purge_rt+0x5ec/0x7f0 net/ipv6/ip6_fib.c:934
fib6_del_route net/ipv6/ip6_fib.c:1784 [inline]
fib6_del+0xc11/0x1310 net/ipv6/ip6_fib.c:1815
fib6_clean_node+0x3ee/0x5e0 net/ipv6/ip6_fib.c:1976
fib6_walk_continue+0x4b1/0x8e0 net/ipv6/ip6_fib.c:1899
fib6_walk+0x95/0xf0 net/ipv6/ip6_fib.c:1947
fib6_clean_tree+0x1ea/0x360 net/ipv6/ip6_fib.c:2024
__fib6_clean_all+0x21c/0x420 net/ipv6/ip6_fib.c:2040
fib6_clean_all net/ipv6/ip6_fib.c:2051 [inline]
fib6_run_gc+0x182/0x3d0 net/ipv6/ip6_fib.c:2107
fib6_gc_timer_cb+0x20/0x30 net/ipv6/ip6_fib.c:2124
call_timer_fn+0x242/0x970 kernel/time/timer.c:1326
expire_timers kernel/time/timer.c:1363 [inline]
__run_timers+0x7a6/0xc70 kernel/time/timer.c:1666
run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1692
__do_softirq+0x2e8/0xb17 kernel/softirq.c:292
The buggy address belongs to the object at ffff8801d87ddd80
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 0 bytes inside of
96-byte region [ffff8801d87ddd80, ffff8801d87ddde0)
The buggy address belongs to the page:
page:ffffea000761f740 count:1 mapcount:0 mapping:ffff8801dac004c0 index:0xffff8801d87ddc00
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffffea0006a18808 ffffea00071df108 ffff8801dac004c0
raw: ffff8801d87ddc00 ffff8801d87dd000 0000000100000017 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8801d87ddc80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff8801d87ddd00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
>ffff8801d87ddd80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff8801d87dde00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff8801d87dde80: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
==================================================================