==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0x3556/0x4a30 kernel/locking/lockdep.c:3215
Read of size 8 at addr ffff8880a8cef4a0 by task modprobe/12587
CPU: 1 PID: 12587 Comm: modprobe Not tainted 4.20.0+ #3
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:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report mm/kasan/report.c:412 [inline]
kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
__lock_acquire+0x3556/0x4a30 kernel/locking/lockdep.c:3215
lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144
spin_lock include/linux/spinlock.h:329 [inline]
nr_rx_frame+0x1277/0x1d50 net/netrom/af_netrom.c:983
nr_loopback_timer+0x7b/0x170 net/netrom/nr_loopback.c:62
call_timer_fn+0x254/0x900 kernel/time/timer.c:1325
expire_timers kernel/time/timer.c:1362 [inline]
__run_timers+0x6fc/0xd50 kernel/time/timer.c:1681
run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1694
__do_softirq+0x30b/0xb11 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807
RIP: 0033:0x7f078005eea1
Code: b4 24 18 01 00 00 4c 8b bc 24 20 01 00 00 48 81 c4 28 01 00 00 c3 e8 ae 0a 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 53 <0f> b6 c0 48 8d 1c 85 00 00 00 00 48 8d 05 3c 00 00 00 48 81 ec d0
RSP: 002b:00007ffec3a47e20 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: 0000561601e974a6 RCX: 0000000000001000
RDX: 0000000000000001 RSI: 0000000000001000 RDI: 00007ffec3a48040
RBP: 0000561601e97250 R08: 00007f078030b2cd R09: 00007f078030b471
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000001
R13: 0000561601e97110 R14: 0000561601e97200 R15: 00007ffec3a48040
Allocated by task 12549:
save_stack+0x45/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc mm/kasan/kasan.c:553 [inline]
kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531
__do_kmalloc mm/slab.c:3722 [inline]
__kmalloc+0x15d/0x750 mm/slab.c:3731
kmalloc include/linux/slab.h:551 [inline]
sk_prot_alloc+0x19c/0x2e0 net/core/sock.c:1477
sk_alloc+0xd7/0x1690 net/core/sock.c:1531
nr_create+0xb9/0x5e0 net/netrom/af_netrom.c:436
__sock_create+0x532/0x930 net/socket.c:1277
sock_create net/socket.c:1317 [inline]
__sys_socket+0x106/0x260 net/socket.c:1347
__do_sys_socket net/socket.c:1356 [inline]
__se_sys_socket net/socket.c:1354 [inline]
__x64_sys_socket+0x73/0xb0 net/socket.c:1354
do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 12549:
save_stack+0x45/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528
__cache_free mm/slab.c:3498 [inline]
kfree+0xcf/0x230 mm/slab.c:3817
sk_prot_free net/core/sock.c:1514 [inline]
__sk_destruct+0x76d/0xa60 net/core/sock.c:1596
sk_destruct+0x7b/0x90 net/core/sock.c:1604
__sk_free+0xce/0x300 net/core/sock.c:1615
sk_free+0x42/0x50 net/core/sock.c:1626
sock_put include/net/sock.h:1703 [inline]
nr_release+0x337/0x3c0 net/netrom/af_netrom.c:557
__sock_release+0xd3/0x250 net/socket.c:579
sock_close+0x1b/0x30 net/socket.c:1141
__fput+0x3c5/0xaf0 fs/file_table.c:278
____fput+0x16/0x20 fs/file_table.c:309
kobject: 'queues' (00000000a9e949e5): kobject_add_internal: parent: 'bcsf0', set: ''
task_work_run+0x1f4/0x2b0 kernel/task_work.c:113
get_signal+0x168d/0x19b0 kernel/signal.c:2347
do_signal+0x91/0x1e80 arch/x86/kernel/signal.c:816
exit_to_usermode_loop+0x2f7/0x3b0 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x696/0x800 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
kobject: 'queues' (00000000a9e949e5): kobject_uevent_env
The buggy address belongs to the object at ffff8880a8cef400
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 160 bytes inside of
2048-byte region [ffff8880a8cef400, ffff8880a8cefc00)
The buggy address belongs to the page:
page:ffffea0002a33b80 count:1 mapcount:0 mapping:ffff88812c3f0c40 index:0xffff8880a8cee300 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea0001ace488 ffffea0002801108 ffff88812c3f0c40
kobject: 'queues' (00000000a9e949e5): kobject_uevent_env: filter function caused the event to drop!
raw: ffff8880a8cee300 ffff8880a8cee300 0000000100000002 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880a8cef380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880a8cef400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880a8cef480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a8cef500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a8cef580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================