================================================================== BUG: KASAN: stack-out-of-bounds in skb_put_data include/linux/skbuff.h:2800 [inline] BUG: KASAN: stack-out-of-bounds in l2cap_build_cmd net/bluetooth/l2cap_core.c:3003 [inline] BUG: KASAN: stack-out-of-bounds in l2cap_send_cmd+0x9a5/0xc80 net/bluetooth/l2cap_core.c:954 Read of size 26 at addr ffffc900034a7a60 by task kworker/u33:8/5949 CPU: 0 UID: 0 PID: 5949 Comm: kworker/u33:8 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: hci1 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1e0 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:186 [inline] kasan_check_range+0x10f/0x1e0 mm/kasan/generic.c:200 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105 skb_put_data include/linux/skbuff.h:2800 [inline] l2cap_build_cmd net/bluetooth/l2cap_core.c:3003 [inline] l2cap_send_cmd+0x9a5/0xc80 net/bluetooth/l2cap_core.c:954 l2cap_ecred_conn_req net/bluetooth/l2cap_core.c:5208 [inline] l2cap_le_sig_cmd net/bluetooth/l2cap_core.c:5510 [inline] l2cap_le_sig_channel net/bluetooth/l2cap_core.c:5568 [inline] l2cap_recv_frame+0x76b7/0xa2e0 net/bluetooth/l2cap_core.c:6913 l2cap_recv_acldata+0xe60/0x10a0 net/bluetooth/l2cap_core.c:7637 hci_acldata_packet net/bluetooth/hci_core.c:3855 [inline] hci_rx_work+0x537/0xfc0 net/bluetooth/hci_core.c:4082 process_one_work+0xa23/0x19a0 kernel/workqueue.c:3276 process_scheduled_works kernel/workqueue.c:3359 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3440 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to stack of task kworker/u33:8/5949 and is located at offset 160 in frame: l2cap_recv_frame+0x0/0xa2e0 net/bluetooth/l2cap_core.c:1658 This frame has 10 objects: [48, 50) 'rsp' [64, 68) 'rsp' [80, 86) 'rej' [112, 122) 'rsp' [144, 148) 'rsp' [160, 178) 'pdu_u' [224, 264) 'chan' [304, 308) 'rx_func_to_event' [320, 328) 'buf' [352, 364) 'buf' The buggy address belongs to a 8-page vmalloc region starting at 0xffffc900034a0000 allocated at kernel_clone+0xfc/0x9a0 kernel/fork.c:2653 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x37a87 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 ffffea0000dea1c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x29c2(GFP_NOWAIT|__GFP_HIGHMEM|__GFP_IO|__GFP_FS|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 62570843623, free_ts 60974762391 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x111d/0x3140 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x27c/0x2ba0 mm/page_alloc.c:5250 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2484 alloc_frozen_pages_noprof mm/mempolicy.c:2555 [inline] alloc_pages_noprof+0x131/0x390 mm/mempolicy.c:2575 vm_area_alloc_pages mm/vmalloc.c:3662 [inline] __vmalloc_area_node mm/vmalloc.c:3876 [inline] __vmalloc_node_range_noprof+0xe5c/0x1530 mm/vmalloc.c:4064 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:4124 alloc_thread_stack_node kernel/fork.c:355 [inline] dup_task_struct kernel/fork.c:924 [inline] copy_process+0x5ec/0x7a40 kernel/fork.c:2050 kernel_clone+0xfc/0x9a0 kernel/fork.c:2653 kernel_thread+0xdb/0x120 kernel/fork.c:2714 create_kthread kernel/kthread.c:459 [inline] kthreadd+0x498/0x7a0 kernel/kthread.c:817 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 5918 tgid 5918 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0x7e1/0x10d0 mm/page_alloc.c:2978 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xe0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4538 [inline] slab_alloc_node mm/slub.c:4866 [inline] kmem_cache_alloc_node_noprof+0x25a/0x6f0 mm/slub.c:4918 __alloc_skb+0x140/0x710 net/core/skbuff.c:702 alloc_skb_fclone include/linux/skbuff.h:1433 [inline] tcp_stream_alloc_skb+0x34/0x660 net/ipv4/tcp.c:945 tcp_sendmsg_locked+0x1396/0x45e0 net/ipv4/tcp.c:1270 tcp_sendmsg+0x2e/0x50 net/ipv4/tcp.c:1465 inet_sendmsg+0xb9/0x140 net/ipv4/af_inet.c:865 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] sock_write_iter+0x4ea/0x5a0 net/socket.c:1195 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1070 fs/read_write.c:688 ksys_write+0x1f8/0x250 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc900034a7900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900034a7980: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 02 f2 >ffffc900034a7a00: 04 f2 06 f2 f2 f2 00 02 f2 f2 04 f2 00 00 02 f2 ^ ffffc900034a7a80: f2 f2 f2 f2 00 00 00 00 00 f2 f2 f2 f2 f2 04 f2 ffffc900034a7b00: 00 f2 f2 f2 00 04 f3 f3 00 00 00 00 00 00 00 00 ==================================================================