==================================================================
BUG: KASAN: use-after-free in memcpy include/linux/string.h:377 [inline]
BUG: KASAN: use-after-free in skb_put_data include/linux/skbuff.h:2130 [inline]
BUG: KASAN: use-after-free in bcm_can_tx+0x3d4/0x800 net/can/bcm.c:295
Read of size 72 at addr ffff888040d94ac0 by task syz-executor.3/13019

CPU: 1 PID: 13019 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report+0x8f/0xa0 mm/kasan/report.c:412
 memcpy+0x20/0x50 mm/kasan/kasan.c:302
 memcpy include/linux/string.h:377 [inline]
 skb_put_data include/linux/skbuff.h:2130 [inline]
 bcm_can_tx+0x3d4/0x800 net/can/bcm.c:295
 bcm_tx_timeout_tsklet+0x1f0/0x3a0 net/can/bcm.c:414
 tasklet_action_common.constprop.0+0x265/0x360 kernel/softirq.c:522
 __do_softirq+0x265/0x980 kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:372 [inline]
 irq_exit+0x215/0x260 kernel/softirq.c:412
 exiting_irq arch/x86/include/asm/apic.h:536 [inline]
 smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
 </IRQ>
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline]
RIP: 0010:kfree+0x123/0x210 mm/slab.c:3823
Code: 89 ea 48 89 ee 4c 89 e7 e8 da ee ff ff f6 c7 02 74 ca e8 20 74 cf ff 48 83 3d 60 4d 59 08 00 0f 84 eb 00 00 00 48 89 df 57 9d <0f> 1f 44 00 00 5b 5d 41 5c 41 5d c3 65 8b 05 ea 4b 69 7e 83 f8 07
RSP: 0018:ffff888091bafd20 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000007 RBX: 0000000000000286 RCX: 1ffff110145ef5c2
RDX: 0000000000000000 RSI: ffff8880a2f7adf0 RDI: 0000000000000286
RBP: ffff888040d91280 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88813bff2380
R13: ffffffff8735c713 R14: ffff88809ab772d0 R15: ffff88809ab772d8
 bcm_remove_op+0x213/0x2c0 net/can/bcm.c:770
 bcm_release+0x260/0x950 net/can/bcm.c:1561
 __sock_release+0xcd/0x2a0 net/socket.c:599
 sock_close+0x15/0x20 net/socket.c:1214
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f7a6dc27f8b
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007fff2df82cb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000009 RCX: 00007f7a6dc27f8b
RDX: 0000000000000000 RSI: 0000001b304295a8 RDI: 0000000000000008
RBP: 00007f7a6dd97980 R08: 0000000000000000 R09: 00000000ee5a3a10
R10: 0000000000000000 R11: 0000000000000293 R12: 00000000000851eb
R13: 00007fff2df82db0 R14: 00007fff2df82dd0 R15: 0000000000000032

Allocated by task 13024:
 __do_kmalloc mm/slab.c:3727 [inline]
 __kmalloc+0x15a/0x3c0 mm/slab.c:3736
 kmalloc_array include/linux/slab.h:637 [inline]
 bcm_tx_setup net/can/bcm.c:957 [inline]
 bcm_sendmsg+0x316c/0x4150 net/can/bcm.c:1386
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
 __sys_sendmsg net/socket.c:2265 [inline]
 __do_sys_sendmsg net/socket.c:2274 [inline]
 __se_sys_sendmsg net/socket.c:2272 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 13019:
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 mm/slab.c:3822
 bcm_remove_op+0x213/0x2c0 net/can/bcm.c:770
 bcm_release+0x260/0x950 net/can/bcm.c:1561
 __sock_release+0xcd/0x2a0 net/socket.c:599
 sock_close+0x15/0x20 net/socket.c:1214
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff888040d91280
 which belongs to the cache kmalloc-32768 of size 32768
The buggy address is located 14400 bytes inside of
 32768-byte region [ffff888040d91280, ffff888040d99280)
The buggy address belongs to the page:
page:ffffea0001036400 count:1 mapcount:0 mapping:ffff88813bff2380 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea00012ba008 ffffea00025c2808 ffff88813bff2380
raw: 0000000000000000 ffff888040d91280 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888040d94980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888040d94a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888040d94a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                           ^
 ffff888040d94b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888040d94b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
   0:	89 ea                	mov    %ebp,%edx
   2:	48 89 ee             	mov    %rbp,%rsi
   5:	4c 89 e7             	mov    %r12,%rdi
   8:	e8 da ee ff ff       	callq  0xffffeee7
   d:	f6 c7 02             	test   $0x2,%bh
  10:	74 ca                	je     0xffffffdc
  12:	e8 20 74 cf ff       	callq  0xffcf7437
  17:	48 83 3d 60 4d 59 08 	cmpq   $0x0,0x8594d60(%rip)        # 0x8594d7f
  1e:	00
  1f:	0f 84 eb 00 00 00    	je     0x110
  25:	48 89 df             	mov    %rbx,%rdi
  28:	57                   	push   %rdi
  29:	9d                   	popfq
* 2a:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1) <-- trapping instruction
  2f:	5b                   	pop    %rbx
  30:	5d                   	pop    %rbp
  31:	41 5c                	pop    %r12
  33:	41 5d                	pop    %r13
  35:	c3                   	retq
  36:	65 8b 05 ea 4b 69 7e 	mov    %gs:0x7e694bea(%rip),%eax        # 0x7e694c27
  3d:	83 f8 07             	cmp    $0x7,%eax