==================================================================
BUG: KASAN: use-after-free in instrument_atomic_write include/linux/instrumented.h:71 [inline]
BUG: KASAN: use-after-free in atomic_dec_return include/asm-generic/atomic-instrumented.h:340 [inline]
BUG: KASAN: use-after-free in rxrpc_put_bundle+0x1d/0x80 net/rxrpc/conn_client.c:141
Write of size 4 at addr ffff8880a1caa720 by task systemd-udevd/3920
CPU: 0 PID: 3920 Comm: systemd-udevd Not tainted 5.9.0-rc6-syzkaller #0
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+0x198/0x1fd lib/dump_stack.c:118
print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383
__kasan_report mm/kasan/report.c:513 [inline]
kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530
check_memory_region_inline mm/kasan/generic.c:186 [inline]
check_memory_region+0x13d/0x180 mm/kasan/generic.c:192
instrument_atomic_write include/linux/instrumented.h:71 [inline]
atomic_dec_return include/asm-generic/atomic-instrumented.h:340 [inline]
rxrpc_put_bundle+0x1d/0x80 net/rxrpc/conn_client.c:141
rxrpc_destroy_connection+0x150/0x2f0 net/rxrpc/conn_object.c:367
rcu_do_batch kernel/rcu/tree.c:2428 [inline]
rcu_core+0x5ca/0x1130 kernel/rcu/tree.c:2656
__do_softirq+0x1f8/0xb23 kernel/softirq.c:298
asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706
__run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
do_softirq_own_stack+0x9d/0xd0 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:393 [inline]
__irq_exit_rcu kernel/softirq.c:423 [inline]
irq_exit_rcu+0x235/0x280 kernel/softirq.c:435
sysvec_apic_timer_interrupt+0x51/0xf0 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x4b/0x80 kernel/locking/spinlock.c:199
Code: c0 f8 6b fc 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 31 48 83 3d 46 c2 c3 01 00 74 25 fb 66 0f 1f 44 00 00 01 00 00 00 e8 cb 6a 18 f9 65 8b 05 b4 54 c9 77 85 c0 74 02 5d
RSP: 0018:ffffc90002c37810 EFLAGS: 00000282
RAX: 1ffffffff13f8d7f RBX: ffff88809f6da040 RCX: 1ffffffff16b89f1
RDX: dffffc0000000000 RSI: 0000000000000002 RDI: 0000000000000000
RBP: ffff8880ae435e80 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880ae435e80
R13: ffff8880646704c0 R14: 0000000000000000 R15: 0000000000000001
finish_lock_switch kernel/sched/core.c:3517 [inline]
finish_task_switch+0x150/0x790 kernel/sched/core.c:3617
context_switch kernel/sched/core.c:3781 [inline]
__schedule+0xed1/0x2280 kernel/sched/core.c:4527
preempt_schedule_irq+0xbf/0x1b0 kernel/sched/core.c:4785
irqentry_exit_cond_resched kernel/entry/common.c:358 [inline]
irqentry_exit_cond_resched kernel/entry/common.c:350 [inline]
irqentry_exit+0x65/0x90 kernel/entry/common.c:388
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581
RIP: 0010:tomoyo_path_matches_pattern+0x49/0x280 security/tomoyo/util.c:919
Code: fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 33 02 00 00 48 89 da 4c 8b 6d 00 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 <0f> 85 21 02 00 00 48 8d 7b 0f 4c 8b 33 48 b8 00 00 00 00 00 fc ff
RSP: 0018:ffffc90002c37a40 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffff8880a66d5d98 RCX: ffffffff838a1dc2
RDX: 1ffff11014cdabb3 RSI: ffffffff838b4195 RDI: ffffc90002c37ba0
RBP: ffffc90002c37ba0 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880a1e3a500
R13: ffff888094c26080 R14: 0000000000000000 R15: ffff8880a1e3a520
tomoyo_compare_name_union security/tomoyo/file.c:87 [inline]
tomoyo_compare_name_union security/tomoyo/file.c:82 [inline]
tomoyo_check_path_acl security/tomoyo/file.c:260 [inline]
tomoyo_check_path_acl+0x164/0x1f0 security/tomoyo/file.c:252
tomoyo_check_acl+0x13c/0x450 security/tomoyo/domain.c:175
tomoyo_path_permission security/tomoyo/file.c:586 [inline]
tomoyo_path_permission+0x1ff/0x3a0 security/tomoyo/file.c:573
tomoyo_path_perm+0x2f0/0x400 security/tomoyo/file.c:838
security_inode_getattr+0xcf/0x140 security/security.c:1278
vfs_getattr fs/stat.c:121 [inline]
vfs_statx_fd+0x70/0xf0 fs/stat.c:151
vfs_fstat include/linux/fs.h:3189 [inline]
__do_sys_newfstat+0x88/0x100 fs/stat.c:398
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fe11c52e2e2
Code: 48 8b 05 b9 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 77 33 48 63 fe b8 05 00 00 00 48 89 d6 0f 05 <48> 3d 00 f0 ff ff 77 06 f3 c3 0f 1f 40 00 48 8b 15 81 db 2b 00 f7
RSP: 002b:00007ffcaee1d5e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000005
RAX: ffffffffffffffda RBX: 00007fe11c7e9440 RCX: 00007fe11c52e2e2
RDX: 00007ffcaee1d5f0 RSI: 00007ffcaee1d5f0 RDI: 000000000000000e
RBP: 000055e2c7cc4b40 R08: 0000000000000b40 R09: 000055e2c7cbd1c0
R10: 000055e2c7cc4b40 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000001000 R14: 000055e2c7cbd1c0 R15: 00007ffcaee1d8b0
Allocated by task 14149:
kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48
kasan_set_track mm/kasan/common.c:56 [inline]
__kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461
kmem_cache_alloc_trace+0x174/0x300 mm/slab.c:3550
kmalloc include/linux/slab.h:554 [inline]
kzalloc include/linux/slab.h:666 [inline]
rxrpc_alloc_bundle+0x88/0x2c0 net/rxrpc/conn_client.c:121
rxrpc_look_up_bundle net/rxrpc/conn_client.c:275 [inline]
rxrpc_prep_call net/rxrpc/conn_client.c:374 [inline]
rxrpc_connect_call+0x85c/0x1580 net/rxrpc/conn_client.c:710
rxrpc_new_client_call+0x961/0x1020 net/rxrpc/call_object.c:331
rxrpc_new_client_call_for_sendmsg net/rxrpc/sendmsg.c:622 [inline]
rxrpc_do_sendmsg+0xf14/0x136d net/rxrpc/sendmsg.c:679
rxrpc_sendmsg+0x420/0x630 net/rxrpc/af_rxrpc.c:560
sock_sendmsg_nosec net/socket.c:651 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:671
____sys_sendmsg+0x6e8/0x810 net/socket.c:2353
___sys_sendmsg+0xf3/0x170 net/socket.c:2407
__sys_sendmsg+0xe5/0x1b0 net/socket.c:2440
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Freed by task 2635:
kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48
kasan_set_track+0x1c/0x30 mm/kasan/common.c:56
kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355
__kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422
__cache_free mm/slab.c:3418 [inline]
kfree+0x10e/0x2b0 mm/slab.c:3756
rxrpc_put_bundle net/rxrpc/conn_client.c:146 [inline]
rxrpc_put_bundle+0x6b/0x80 net/rxrpc/conn_client.c:138
rxrpc_unbundle_conn+0x1f8/0x3d0 net/rxrpc/conn_client.c:935
rxrpc_clean_up_local_conns+0x38d/0x587 net/rxrpc/conn_client.c:1114
rxrpc_local_destroyer net/rxrpc/local_object.c:399 [inline]
rxrpc_local_processor+0x38d/0x5e0 net/rxrpc/local_object.c:433
process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
kthread+0x3b5/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Last call_rcu():
kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48
kasan_record_aux_stack+0x82/0xb0 mm/kasan/generic.c:346
__call_rcu kernel/rcu/tree.c:2894 [inline]
call_rcu+0x15e/0x7c0 kernel/rcu/tree.c:2968
neigh_parms_release net/core/neighbour.c:1662 [inline]
neigh_parms_release+0x1e3/0x260 net/core/neighbour.c:1652
inetdev_destroy net/ipv4/devinet.c:325 [inline]
inetdev_event+0xca6/0x14fd net/ipv4/devinet.c:1599
notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2034
call_netdevice_notifiers_extack net/core/dev.c:2046 [inline]
call_netdevice_notifiers net/core/dev.c:2060 [inline]
rollback_registered_many+0x97f/0x1550 net/core/dev.c:9346
unregister_netdevice_many.part.0+0x1a/0x2f0 net/core/dev.c:10499
unregister_netdevice_many net/core/dev.c:10498 [inline]
default_device_exit_batch+0x30c/0x3d0 net/core/dev.c:10982
ops_exit_list+0x10d/0x160 net/core/net_namespace.c:190
cleanup_net+0x4ea/0xa00 net/core/net_namespace.c:604
process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
kthread+0x3b5/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
The buggy address belongs to the object at ffff8880a1caa700
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 32 bytes inside of
192-byte region [ffff8880a1caa700, ffff8880a1caa7c0)
The buggy address belongs to the page:
page:00000000f55e41c6 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880a1caa400 pfn:0xa1caa
flags: 0xfffe0000000200(slab)
raw: 00fffe0000000200 ffffea0002855488 ffffea000297fb48 ffff8880aa040000
raw: ffff8880a1caa400 ffff8880a1caa000 000000010000000c 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880a1caa600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880a1caa680: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a1caa700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a1caa780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff8880a1caa800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================