audit: type=1804 audit(1615853934.671:27): pid=11236 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir113006157/syzkaller.lhQlUf/21/file0/file0" dev="loop1" ino=5 res=1 ================================================================== BUG: KASAN: use-after-free in atomic_sub_return include/asm-generic/atomic-instrumented.h:305 [inline] BUG: KASAN: use-after-free in skb_release_data+0x120/0x920 net/core/skbuff.c:572 Write of size 4 at addr ffff8880936398e0 by task syz-executor.3/11248 CPU: 1 PID: 11248 Comm: syz-executor.3 Not tainted 4.19.180-syzkaller #0 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+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 atomic_sub_return include/asm-generic/atomic-instrumented.h:305 [inline] skb_release_data+0x120/0x920 net/core/skbuff.c:572 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] kfree_skb+0x11a/0x3d0 net/core/skbuff.c:672 hci_dev_do_open+0xaf0/0x1260 net/bluetooth/hci_core.c:1511 hci_dev_open+0x130/0x250 net/bluetooth/hci_core.c:1577 hci_sock_ioctl+0x57e/0x7d0 net/bluetooth/hci_sock.c:1018 sock_do_ioctl+0xcb/0x2d0 net/socket.c:950 sock_ioctl+0x2ef/0x5d0 net/socket.c:1074 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465d27 Code: 3c 1c 48 f7 d8 49 39 c4 72 b8 e8 a4 4d 02 00 85 c0 78 bd 48 83 c4 08 4c 89 e0 5b 41 5c c3 0f 1f 44 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffe5cf19e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000001f383bc RCX: 0000000000465d27 RDX: 0000000000000003 RSI: 00000000400448c9 RDI: 0000000000000003 RBP: 0000000000000003 R08: 0000000000000000 R09: 00007f1b88c12700 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 000000000056ca68 R14: 0000000000000000 R15: 0000000000400538 Allocated by task 11248: __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3703 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0xae/0x560 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:995 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline] hci_prepare_cmd+0x2a/0x290 net/bluetooth/hci_request.c:292 hci_req_add_ev+0xdc/0x220 net/bluetooth/hci_request.c:326 bredr_setup net/bluetooth/hci_core.c:293 [inline] hci_init2_req+0x667/0x8b0 net/bluetooth/hci_core.c:422 __hci_req_sync+0x133/0x8a0 net/bluetooth/hci_request.c:205 __hci_init net/bluetooth/hci_core.c:874 [inline] hci_dev_do_open+0xe0d/0x1260 net/bluetooth/hci_core.c:1465 hci_dev_open+0x130/0x250 net/bluetooth/hci_core.c:1577 hci_sock_ioctl+0x57e/0x7d0 net/bluetooth/hci_sock.c:1018 sock_do_ioctl+0xcb/0x2d0 net/socket.c:950 sock_ioctl+0x2ef/0x5d0 net/socket.c:1074 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8147: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x6de/0x920 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] kfree_skb+0x11a/0x3d0 net/core/skbuff.c:672 hci_cmd_work+0x182/0x360 net/bluetooth/hci_core.c:4395 process_one_work+0x864/0x1570 kernel/workqueue.c:2152 worker_thread+0x64c/0x1130 kernel/workqueue.c:2295 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff888093639800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 224 bytes inside of 512-byte region [ffff888093639800, ffff888093639a00) The buggy address belongs to the page: page:ffffea00024d8e40 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002a48948 ffffea0002a1ee48 ffff88813bff0940 raw: 0000000000000000 ffff888093639080 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888093639780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888093639800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888093639880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888093639900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888093639980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================