kasan: GPF could be caused by NULL-ptr deref or user memory access kobject_add_internal failed for hci1 (error: -2 parent: bluetooth) general protection fault: 0000 [#1] PREEMPT SMP KASAN kobject: 'rfkill983' (00000000165922ad): kobject_cleanup, parent (null) CPU: 0 PID: 8848 Comm: syz-executor170 Not tainted 4.19.57 #29 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:kernfs_add_one+0x343/0x4d0 fs/kernfs/dir.c:811 Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 52 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 5b 70 48 8d 7b 08 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1f 01 00 00 8b 5b 08 31 ff 83 kobject: 'hci6' (0000000094443a88): kobject_add_internal: parent: 'bluetooth', set: 'devices' RSP: 0018:ffff888089047850 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86eeab78 RDX: 0000000000000001 RSI: ffffffff81cd0afb RDI: 0000000000000008 RBP: ffff888089047890 R08: 1ffffffff111067c R09: fffffbfff111067d R10: fffffbfff111067c R11: ffffffff888833e7 R12: ffff8880991a29a0 R13: ffff8880991a29a0 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000001b91880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 Bluetooth: Can't register HCI device CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004bf748 CR3: 0000000082c0e000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kernfs_create_dir_ns+0xff/0x160 fs/kernfs/dir.c:1030 sysfs_create_dir_ns+0x131/0x290 fs/sysfs/dir.c:58 kobject: 'rfkill983' (00000000165922ad): calling ktype release create_dir lib/kobject.c:88 [inline] kobject_add_internal lib/kobject.c:247 [inline] kobject_add_internal.cold+0xe5/0x5d1 lib/kobject.c:217 kobject: 'hci6' (0000000094443a88): kobject_uevent_env kobject_add_varg lib/kobject.c:382 [inline] kobject_add+0x150/0x1c0 lib/kobject.c:426 kobject: 'rfkill983': free name device_add+0x3cc/0x1760 drivers/base/core.c:1885 kobject: 'hci1' (000000008a5e142a): kobject_cleanup, parent (null) kobject: 'hci6' (0000000094443a88): fill_kobj_path: path = '/devices/virtual/bluetooth/hci6' hci_register_dev+0x304/0x880 net/bluetooth/hci_core.c:3198 __vhci_create_device+0x2d0/0x5a0 drivers/bluetooth/hci_vhci.c:139 kobject: 'hci2' (0000000056b3f34c): kobject_uevent_env vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:219 [inline] vhci_write+0x2d6/0x470 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1820 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x587/0x810 fs/read_write.c:487 kobject: 'rfkill985' (00000000592d6cbe): kobject_add_internal: parent: 'hci6', set: 'devices' kobject: 'hci1' (000000008a5e142a): calling ktype release vfs_write+0x20c/0x560 fs/read_write.c:549 ksys_write+0x14f/0x2d0 fs/read_write.c:599 kobject: 'hci2' (0000000056b3f34c): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:608 kobject: 'hci1': free name do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x441279 Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffd12358358 EFLAGS: 00000246 kobject: 'rfkill985' (00000000592d6cbe): kobject_uevent_env ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441279 RDX: 0000000000000002 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 000000000007c72f R08: 00000000004002c8 R09: 00000000004002c8 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000401ff0 R13: 0000000000402080 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: kobject: 'hci3' (00000000b8de6feb): kobject_uevent_env kobject: 'hci2' (0000000056b3f34c): kobject_cleanup, parent (null) kobject: 'hci3' (00000000b8de6feb): fill_kobj_path: path = '/devices/virtual/bluetooth/hci3' kobject: 'hci2' (0000000056b3f34c): calling ktype release kobject: 'rfkill985' (00000000592d6cbe): fill_kobj_path: path = '/devices/virtual/bluetooth/hci6/rfkill985' kobject: 'hci1' (000000000a4c1a73): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'rfkill984' (00000000c1cea46f): kobject_cleanup, parent (null) kobject: 'hci1' (000000000a4c1a73): kobject_uevent_env kobject: 'rfkill986' (000000000160d6e5): kobject_add_internal: parent: 'hci3', set: 'devices' kobject: 'rfkill985' (00000000592d6cbe): kobject_uevent_env kobject: 'rfkill986' (000000000160d6e5): kobject_uevent_env kobject: 'hci1' (000000000a4c1a73): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' kobject: 'rfkill984' (00000000c1cea46f): calling ktype release kobject: 'rfkill985' (00000000592d6cbe): fill_kobj_path: path = '/devices/virtual/bluetooth/hci6/rfkill985' kobject: 'rfkill984': free name kobject: 'rfkill986' (000000000160d6e5): fill_kobj_path: path = '/devices/virtual/bluetooth/hci3/rfkill986' kobject: 'rfkill987' (00000000de0028da): kobject_add_internal: parent: 'hci1', set: 'devices' kobject: 'rfkill986' (000000000160d6e5): kobject_uevent_env kobject: 'hci5' (000000009cfda838): kobject_uevent_env kobject: 'hci5' (000000009cfda838): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5' kobject: 'rfkill987' (00000000de0028da): kobject_uevent_env kobject: 'rfkill986' (000000000160d6e5): fill_kobj_path: path = '/devices/virtual/bluetooth/hci3/rfkill986' kobject: 'hci5' (000000009cfda838): kobject_cleanup, parent (null) kobject: 'hci2': free name kobject: 'hci5' (000000009cfda838): calling ktype release kobject: 'hci5': free name kobject: 'rfkill987' (00000000de0028da): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill987' kobject: 'hci2' (000000000291e826): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'hci5' (00000000cb14376a): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'rfkill985' (00000000592d6cbe): kobject_cleanup, parent (null) kobject: 'rfkill986' (000000000160d6e5): kobject_cleanup, parent (null) kobject: 'rfkill987' (00000000de0028da): kobject_uevent_env kobject: 'hci2' (000000000291e826): kobject_uevent_env ---[ end trace 42547c4ea7bb06cf ]--- kobject: 'hci5' (00000000cb14376a): kobject_uevent_env kobject: 'rfkill986' (000000000160d6e5): calling ktype release kobject: 'rfkill985' (00000000592d6cbe): calling ktype release kobject: 'hci5' (00000000cb14376a): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5' kobject: 'hci2' (000000000291e826): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' RIP: 0010:kernfs_add_one+0x343/0x4d0 fs/kernfs/dir.c:811 kobject: 'rfkill986': free name kobject: 'rfkill987' (00000000de0028da): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill987' kobject: 'hci3' (00000000b8de6feb): kobject_uevent_env kobject: 'rfkill988' (00000000f6403cd4): kobject_add_internal: parent: 'hci2', set: 'devices' kobject: 'rfkill985': free name kobject: 'rfkill988' (00000000f6403cd4): kobject_uevent_env Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 52 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 5b 70 48 8d 7b 08 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1f 01 00 00 8b 5b 08 31 ff 83 kobject: 'hci3' (00000000b8de6feb): fill_kobj_path: path = '/devices/virtual/bluetooth/hci3' kobject: 'hci6' (0000000094443a88): kobject_uevent_env kobject: 'rfkill988' (00000000f6403cd4): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill988' kobject: 'hci6' (0000000094443a88): fill_kobj_path: path = '/devices/virtual/bluetooth/hci6' kobject: 'rfkill989' (00000000c97795f2): kobject_add_internal: parent: 'hci5', set: 'devices' RSP: 0018:ffff888089047850 EFLAGS: 00010202 kobject: 'hci6' (0000000094443a88): kobject_cleanup, parent (null) kobject: 'rfkill988' (00000000f6403cd4): kobject_uevent_env kobject: 'hci3' (00000000b8de6feb): kobject_cleanup, parent (null) kobject: 'hci6' (0000000094443a88): calling ktype release kobject: 'hci3' (00000000b8de6feb): calling ktype release kobject: 'hci6': free name kobject: 'hci3': free name kobject: 'rfkill989' (00000000c97795f2): kobject_uevent_env RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86eeab78 kobject: 'rfkill988' (00000000f6403cd4): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2/rfkill988' kobject: 'hci3' (000000008e852873): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'rfkill989' (00000000c97795f2): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5/rfkill989' RDX: 0000000000000001 RSI: ffffffff81cd0afb RDI: 0000000000000008 kobject: 'rfkill987' (00000000de0028da): kobject_cleanup, parent (null) kobject: 'hci3' (000000008e852873): kobject_uevent_env kobject: 'rfkill988' (00000000f6403cd4): kobject_cleanup, parent (null) RBP: ffff888089047890 R08: 1ffffffff111067c R09: fffffbfff111067d kobject: 'rfkill989' (00000000c97795f2): kobject_uevent_env kobject: 'hci3' (000000008e852873): fill_kobj_path: path = '/devices/virtual/bluetooth/hci3' kobject: 'rfkill988' (00000000f6403cd4): calling ktype release R10: fffffbfff111067c R11: ffffffff888833e7 R12: ffff8880991a29a0 kobject: 'hci6' (0000000056c6cbae): kobject_add_internal: parent: 'bluetooth', set: 'devices' kobject: 'rfkill990' (00000000908849cc): kobject_add_internal: parent: 'hci3', set: 'devices' kobject: 'rfkill987' (00000000de0028da): calling ktype release R13: ffff8880991a29a0 R14: 0000000000000000 R15: 0000000000000000 kobject: 'rfkill988': free name kobject: 'rfkill990' (00000000908849cc): kobject_uevent_env kobject: 'rfkill989' (00000000c97795f2): fill_kobj_path: path = '/devices/virtual/bluetooth/hci5/rfkill989' FS: 0000000001b91880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 kobject: 'hci6' (0000000056c6cbae): kobject_uevent_env kobject: 'rfkill990' (00000000908849cc): fill_kobj_path: path = '/devices/virtual/bluetooth/hci3/rfkill990' kobject: 'hci2' (000000000291e826): kobject_uevent_env CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kobject: 'rfkill987': free name kobject: 'rfkill990' (00000000908849cc): kobject_uevent_env kobject: 'hci1' (000000000a4c1a73): kobject_uevent_env CR2: 00007fe3703a7000 CR3: 0000000082c0e000 CR4: 00000000001406f0 kobject: 'hci6' (0000000056c6cbae): fill_kobj_path: path = '/devices/virtual/bluetooth/hci6' kobject: 'rfkill990' (00000000908849cc): fill_kobj_path: path = '/devices/virtual/bluetooth/hci3/rfkill990' kobject: 'rfkill989' (00000000c97795f2): kobject_cleanup, parent (null) DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kobject: 'hci1' (000000000a4c1a73): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' kobject: 'rfkill990' (00000000908849cc): kobject_cleanup, parent (null) kobject: 'hci2' (000000000291e826): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2' DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 kobject: 'rfkill991' (0000000030e3a1db): kobject_add_internal: parent: 'hci6', set: 'devices'