netlink: 188 bytes leftover after parsing attributes in process `syz-executor4'.
==================================================================
BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
BUG: KASAN: use-after-free in refcount_sub_and_test+0x9a/0x350 lib/refcount.c:179
Read of size 4 at addr ffff8801d336f1c4 by task udevd/2622
CPU: 1 PID: 2622 Comm: udevd Not tainted 4.18.0-rc7+ #171
netlink: 188 bytes leftover after parsing attributes in process `syz-executor4'.
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
QAT: Invalid ioctl
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272
atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
refcount_sub_and_test+0x9a/0x350 lib/refcount.c:179
refcount_dec_and_test+0x1a/0x20 lib/refcount.c:212
fib6_metrics_release+0x4f/0x90 net/ipv6/ip6_fib.c:178
QAT: Invalid ioctl
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
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:__lookup_slow+0x47b/0x540 fs/namei.c:1634
Code: 48 89 df e8 e7 4e 04 00 48 89 df e8 0f 19 04 00 e9 69 fd ff ff e8 c5 3c b5 ff 48 89 df 4c 89 f3 e8 fa 18 04 00 e9 92 fe ff ff b0 3c b5 ff 4c 8d ab 80 00 00 00 4c 89 ef e8 31 16 e4 04 48 89
RSP: 0018:ffff8801b49e7578 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: ffff8801cc077080 RCX: ffffffff81c6d966
RDX: 0000000010000000 RSI: 0000000000000000 RDI: 0000000000000005
RBP: ffff8801b49e76d8 R08: ffff8801b49da4c0 R09: fffffbfff100d5ec
R10: fffffbfff100d5ec R11: ffffffff8806af67 R12: 1ffff1003693ceb2
R13: 0000000010000000 R14: 0000000000000000 R15: ffff8801c93ca760
lookup_slow+0x57/0x80 fs/namei.c:1647
walk_component+0x94a/0x2630 fs/namei.c:1769
lookup_last fs/namei.c:2237 [inline]
path_lookupat.isra.45+0x202/0xbf0 fs/namei.c:2287
filename_lookup+0x264/0x510 fs/namei.c:2321
user_path_at_empty+0x40/0x50 fs/namei.c:2584
user_path_at include/linux/namei.h:57 [inline]
vfs_statx+0x129/0x210 fs/stat.c:185
vfs_stat include/linux/fs.h:3102 [inline]
__do_sys_newstat+0x8f/0x110 fs/stat.c:337
__se_sys_newstat fs/stat.c:333 [inline]
__x64_sys_newstat+0x54/0x80 fs/stat.c:333
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f4cb3ac4c65
Code: 00 00 00 e8 5d 01 00 00 48 83 c4 18 c3 90 90 90 90 90 90 90 90 83 ff 01 48 89 f0 77 18 48 89 c7 48 89 d6 b8 04 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 17 f3 c3 90 48 8b 05 a1 51 2b 00 64 c7 00 16
RSP: 002b:00007ffe5b452638 EFLAGS: 00000246 ORIG_RAX: 0000000000000004
RAX: ffffffffffffffda RBX: 0000000000e0b250 RCX: 00007f4cb3ac4c65
RDX: 00007ffe5b452650 RSI: 00007ffe5b452650 RDI: 00007ffe5b452ae0
RBP: 00007ffe5b452f20 R08: 000000000041f4f1 R09: 00007f4cb3b1b7d0
R10: 7665642f7379732f R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffe5b452f27 R14: 0000000000e0b250 R15: 0000000000e10e10
Allocated by task 15107:
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 2622:
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 ffff8801d336f180
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 68 bytes inside of
96-byte region [ffff8801d336f180, ffff8801d336f1e0)
The buggy address belongs to the page:
page:ffffea00074cdbc0 count:1 mapcount:0 mapping:ffff8801dac004c0 index:0xffff8801d336f500
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffffea000766fec8 ffffea000741aa88 ffff8801dac004c0
raw: ffff8801d336f500 ffff8801d336f000 000000010000001d 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8801d336f080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff8801d336f100: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
>ffff8801d336f180: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff8801d336f200: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff8801d336f280: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
==================================================================