================================================================== 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+0x2a3/0xb90 net/bluetooth/l2cap_core.c:954 Read of size 22 at addr ffffc9000f9b7500 by task kworker/u5:1/4670 CPU: 0 UID: 0 PID: 4670 Comm: kworker/u5:1 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: hci0 hci_rx_work Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200 __asan_memcpy+0x29/0x70 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+0x2a3/0xb90 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+0xc032/0x10240 net/bluetooth/l2cap_core.c:6913 l2cap_recv_acldata+0x7e9/0x13e0 net/bluetooth/l2cap_core.c:7637 hci_acldata_packet net/bluetooth/hci_core.c:3855 [inline] hci_rx_work+0x4f9/0x1030 net/bluetooth/hci_core.c:4082 process_one_work kernel/workqueue.c:3275 [inline] process_scheduled_works+0xb02/0x1830 kernel/workqueue.c:3358 worker_thread+0xa50/0xfc0 kernel/workqueue.c:3439 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x51e/0xb90 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/u5:1/4670 and is located at offset 128 in frame: l2cap_recv_frame+0x0/0x10240 include/linux/skbuff.h:-1 This frame has 26 objects: [32, 34) 'rsp.i241.i.i' [48, 88) 'chan.i.i.i' [128, 146) 'pdu_u.i.i.i' [192, 202) 'rsp.i94.i.i' [224, 226) 'rsp.i.i.i111' [240, 242) 'rej.i' [256, 258) 'rej.i145.i' [272, 274) 'rej.i143.i' [288, 290) 'req.i229.i.i' [304, 312) 'buf.i222.i.i' [336, 348) 'buf29.i.i.i' [368, 372) 'rsp49.i.i.i' [384, 393) 'rfc.i.i118.i.i' [416, 480) 'buf.i119.i.i' [512, 576) 'req.i120.i.i' [608, 617) 'rfc.i.i.i.i' [640, 656) 'efs.i.i.i.i' [672, 678) 'rej.i371.i.i.i' [704, 710) 'rej.i.i.i.i' [736, 800) 'rsp.i.i.i' [832, 896) 'buf.i.i.i' [928, 1056) 'req.i.i.i' [1088, 1096) 'rsp.i.i.i.i' [1120, 1122) 'info.i.i.i.i' [1136, 1264) 'buf.i.i.i.i' [1296, 1298) 'rej.i.i' The buggy address belongs to a 8-page vmalloc region starting at 0xffffc9000f9b0000 allocated at copy_process+0x508/0x3cf0 kernel/fork.c:2050 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x438cf flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 ffffea00010e33c8 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 29930699177, free_ts 29501713085 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 __alloc_pages_noprof+0xa/0x30 mm/page_alloc.c:5284 __alloc_pages_node_noprof include/linux/gfp.h:289 [inline] alloc_pages_node_noprof include/linux/gfp.h:316 [inline] vm_area_alloc_pages mm/vmalloc.c:3664 [inline] __vmalloc_area_node mm/vmalloc.c:3876 [inline] __vmalloc_node_range_noprof+0x7be/0x1730 mm/vmalloc.c:4064 __vmalloc_node_noprof+0xc2/0x100 mm/vmalloc.c:4124 alloc_thread_stack_node kernel/fork.c:355 [inline] dup_task_struct+0x228/0x9a0 kernel/fork.c:924 copy_process+0x508/0x3cf0 kernel/fork.c:2050 kernel_clone+0x248/0x8e0 kernel/fork.c:2654 kernel_thread+0x13f/0x1b0 kernel/fork.c:2715 create_kthread kernel/kthread.c:459 [inline] kthreadd+0x4ec/0x6e0 kernel/kthread.c:817 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978 __slab_free+0x263/0x2b0 mm/slub.c:5576 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 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] kmem_cache_alloc_noprof+0x2bc/0x650 mm/slub.c:4876 __kernfs_new_node+0xe9/0x8e0 fs/kernfs/dir.c:637 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:718 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1057 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:313 create_files fs/sysfs/group.c:82 [inline] internal_create_group+0x673/0x1180 fs/sysfs/group.c:189 sysfs_slab_add+0x14a/0x290 mm/slub.c:9500 slab_sysfs_init+0x5b/0xf0 mm/slub.c:9586 do_one_initcall+0x250/0x8d0 init/main.c:1382 do_initcall_level+0x104/0x190 init/main.c:1444 do_initcalls+0x59/0xa0 init/main.c:1460 Memory state around the buggy address: ffffc9000f9b7400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000f9b7480: f1 f1 f1 f1 f8 f2 f8 f8 f8 f8 f8 f2 f2 f2 f2 f2 >ffffc9000f9b7500: 00 00 02 f2 f2 f2 f2 f2 f8 f8 f2 f2 f8 f2 f8 f2 ^ ffffc9000f9b7580: f8 f2 f8 f2 f8 f2 f8 f2 f2 f2 f8 f8 f2 f2 f8 f2 ffffc9000f9b7600: f8 f8 f2 f2 f8 f8 f8 f8 f8 f8 f8 f8 f2 f2 f2 f2 ==================================================================