================================================================== 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 24 at addr ffffc900043e7a60 by task kworker/u33:4/5939 CPU: 2 UID: 0 PID: 5939 Comm: kworker/u33:4 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: hci2 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+0x9d7/0x1920 kernel/workqueue.c:3275 process_scheduled_works kernel/workqueue.c:3358 [inline] worker_thread+0x5da/0xe40 kernel/workqueue.c:3439 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:4/5939 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 0xffffc900043e0000 allocated at kernel_clone+0xfc/0x9a0 kernel/fork.c:2654 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36def flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 ffffea0000db7bc8 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 61243869059, free_ts 61235696587 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/0x7a10 kernel/fork.c:2050 kernel_clone+0xfc/0x9a0 kernel/fork.c:2654 kernel_thread+0xdb/0x120 kernel/fork.c:2715 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 5935 tgid 5935 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:4542 [inline] slab_alloc_node mm/slub.c:4869 [inline] __kmalloc_cache_noprof+0x243/0x6f0 mm/slub.c:5378 kmalloc_noprof include/linux/slab.h:950 [inline] do_signalfd4+0x14e/0x480 fs/signalfd.c:267 __do_sys_signalfd4 fs/signalfd.c:308 [inline] __se_sys_signalfd4 fs/signalfd.c:299 [inline] __x64_sys_signalfd4+0x14b/0x1d0 fs/signalfd.c:299 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: ffffc900043e7900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900043e7980: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 02 f2 >ffffc900043e7a00: 04 f2 06 f2 f2 f2 00 02 f2 f2 04 f2 00 00 02 f2 ^ ffffc900043e7a80: f2 f2 f2 f2 00 00 00 00 00 f2 f2 f2 f2 f2 04 f2 ffffc900043e7b00: 00 f2 f2 f2 00 04 f3 f3 00 00 00 00 00 00 00 00 ==================================================================