KASAN: use-after-free Write in hci_sock_release

48 views
Skip to first unread message

syzbot

unread,
Oct 23, 2018, 10:38:04 AM10/23/18
to da...@davemloft.net, johan....@gmail.com, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, mar...@holtmann.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 8c60c36d0b8c Add linux-next specific files for 20181019
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=163a6499400000
kernel config: https://syzkaller.appspot.com/x/.config?x=8b6d7c4c81535e89
dashboard link: https://syzkaller.appspot.com/bug?extid=b364ed862aa07c74bc62
compiler: gcc (GCC) 8.0.1 20180413 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+b364ed...@syzkaller.appspotmail.com

F2FS-fs (loop5): Can't find valid F2FS filesystem in 1th superblock
F2FS-fs (loop5): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (loop5): Can't find valid F2FS filesystem in 2th superblock
==================================================================
BUG: KASAN: use-after-free in atomic_dec
include/asm-generic/atomic-instrumented.h:127 [inline]
BUG: KASAN: use-after-free in hci_sock_release+0x14f/0x3b0
net/bluetooth/hci_sock.c:873
Write of size 4 at addr ffff880182f492a0 by task syz-executor0/7470

CPU: 1 PID: 7470 Comm: syz-executor0 Not tainted 4.19.0-rc8-next-20181019+
#98
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+0x244/0x39d lib/dump_stack.c:113
print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
atomic_dec include/asm-generic/atomic-instrumented.h:127 [inline]
hci_sock_release+0x14f/0x3b0 net/bluetooth/hci_sock.c:873
__sock_release+0xd7/0x250 net/socket.c:580
sock_close+0x19/0x20 net/socket.c:1142
__fput+0x3bc/0xa70 fs/file_table.c:279
____fput+0x15/0x20 fs/file_table.c:312
task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457569
Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fb9b189cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000457569
RDX: 000000000000000c RSI: 0000000020000240 RDI: 0000000000000006
RBP: 000000000072bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb9b189d6d4
R13: 00000000004bd6a4 R14: 00000000004cbf20 R15: 00000000ffffffff

Allocated by task 7468:
save_stack+0x43/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553
kmem_cache_alloc_trace+0x152/0x750 mm/slab.c:3620
kmalloc include/linux/slab.h:546 [inline]
kzalloc include/linux/slab.h:741 [inline]
hci_alloc_dev+0x228/0x21a0 net/bluetooth/hci_core.c:3116
__vhci_create_device+0x102/0x580 drivers/bluetooth/hci_vhci.c:114
vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline]
vhci_get_user drivers/bluetooth/hci_vhci.c:219 [inline]
vhci_write+0x2de/0x470 drivers/bluetooth/hci_vhci.c:299
call_write_iter include/linux/fs.h:1844 [inline]
new_sync_write fs/read_write.c:474 [inline]
__vfs_write+0x6b8/0x9f0 fs/read_write.c:487
vfs_write+0x1fc/0x560 fs/read_write.c:549
ksys_write+0x101/0x260 fs/read_write.c:598
__do_sys_write fs/read_write.c:610 [inline]
__se_sys_write fs/read_write.c:607 [inline]
__x64_sys_write+0x73/0xb0 fs/read_write.c:607
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 7467:
save_stack+0x43/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528
__cache_free mm/slab.c:3498 [inline]
kfree+0xcf/0x230 mm/slab.c:3817
bt_host_release+0x19/0x30 net/bluetooth/hci_sysfs.c:86
device_release+0x7e/0x210 drivers/base/core.c:891
kobject_cleanup lib/kobject.c:662 [inline]
kobject_release lib/kobject.c:691 [inline]
kref_put include/linux/kref.h:70 [inline]
kobject_put.cold.9+0x287/0x2e4 lib/kobject.c:708
put_device+0x20/0x30 drivers/base/core.c:2024
hci_free_dev+0x19/0x20 net/bluetooth/hci_core.c:3208
vhci_release+0x7e/0xf0 drivers/bluetooth/hci_vhci.c:355
__fput+0x3bc/0xa70 fs/file_table.c:279
____fput+0x15/0x20 fs/file_table.c:312
task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff880182f48240
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 4192 bytes inside of
8192-byte region [ffff880182f48240, ffff880182f4a240)
The buggy address belongs to the page:
page:ffffea00060bd200 count:1 mapcount:0 mapping:ffff8801da802080 index:0x0
compound_mapcount: 0
flags: 0x2fffc0000010200(slab|head)
raw: 02fffc0000010200 ffffea000610f708 ffff8801da801b48 ffff8801da802080
raw: 0000000000000000 ffff880182f48240 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff880182f49180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff880182f49200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ffff880182f49280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff880182f49300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff880182f49380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
audit: type=1800 audit(1540276897.489:32): pid=7430 uid=0 auid=4294967295
ses=4294967295 subj==unconfined op=collect_data cause=failed(directio)
comm="syz-executor5" name="file0" dev="sda1" ino=16559 res=0
syz-executor5 (7430) used greatest stack depth: 14640 bytes left


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.

syzbot

unread,
Jan 4, 2019, 4:27:03 AM1/4/19
to da...@davemloft.net, johan....@gmail.com, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, mar...@holtmann.org, net...@vger.kernel.org, syzkall...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 645ff1e8e704 Merge branch 'for-linus' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1303e2bb400000
kernel config: https://syzkaller.appspot.com/x/.config?x=7308e68273924137
dashboard link: https://syzkaller.appspot.com/bug?extid=b364ed862aa07c74bc62
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=152532bb400000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13f73320c00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+b364ed...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in atomic_dec
include/asm-generic/atomic-instrumented.h:127 [inline]
BUG: KASAN: use-after-free in hci_sock_release+0x154/0x3c0
net/bluetooth/hci_sock.c:873
Write of size 4 at addr ffff888098651620 by task syz-executor472/8899

CPU: 1 PID: 8899 Comm: syz-executor472 Not tainted 4.20.0+ #8
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+0x1db/0x2d0 lib/dump_stack.c:113
print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187
kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
check_memory_region_inline mm/kasan/generic.c:185 [inline]
check_memory_region+0x123/0x190 mm/kasan/generic.c:191
kasan_check_write+0x14/0x20 mm/kasan/common.c:106
atomic_dec include/asm-generic/atomic-instrumented.h:127 [inline]
hci_sock_release+0x154/0x3c0 net/bluetooth/hci_sock.c:873
__sock_release+0xd3/0x250 net/socket.c:579
sock_close+0x1b/0x30 net/socket.c:1141
__fput+0x3c5/0xb10 fs/file_table.c:278
____fput+0x16/0x20 fs/file_table.c:309
task_work_run+0x1f4/0x2b0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x32a/0x3b0 arch/x86/entry/common.c:166
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x696/0x800 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446419
Code: e8 0c 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 7b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ff91cfd4da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 00000000006dbc28 RCX: 0000000000446419
RDX: 0000000000446419 RSI: 0000000000446419 RDI: 0000000000000004
RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c
R13: 6368762f7665642f R14: 00007ff91cfd59c0 R15: 00000000006dbd2c

Allocated by task 8889:
save_stack+0x45/0xd0 mm/kasan/common.c:73
set_track mm/kasan/common.c:85 [inline]
kasan_kmalloc mm/kasan/common.c:482 [inline]
kasan_kmalloc+0xcf/0xe0 mm/kasan/common.c:455
kmem_cache_alloc_trace+0x151/0x760 mm/slab.c:3607
kmalloc include/linux/slab.h:545 [inline]
kzalloc include/linux/slab.h:740 [inline]
hci_alloc_dev+0x148/0x21a0 net/bluetooth/hci_core.c:3116
__vhci_create_device+0x101/0x5a0 drivers/bluetooth/hci_vhci.c:114
vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline]
vhci_get_user drivers/bluetooth/hci_vhci.c:219 [inline]
vhci_write+0x2d0/0x470 drivers/bluetooth/hci_vhci.c:299
call_write_iter include/linux/fs.h:1862 [inline]
new_sync_write fs/read_write.c:474 [inline]
__vfs_write+0x764/0xb40 fs/read_write.c:487
vfs_write+0x20c/0x580 fs/read_write.c:549
ksys_write+0x105/0x260 fs/read_write.c:598
__do_sys_write fs/read_write.c:610 [inline]
__se_sys_write fs/read_write.c:607 [inline]
__x64_sys_write+0x73/0xb0 fs/read_write.c:607
do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 8888:
save_stack+0x45/0xd0 mm/kasan/common.c:73
kobject: 'rfkill320' (00000000e0cb8fff): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci4/rfkill320'
set_track mm/kasan/common.c:85 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/common.c:444
kasan_slab_free+0xe/0x10 mm/kasan/common.c:452
__cache_free mm/slab.c:3485 [inline]
kfree+0xcf/0x230 mm/slab.c:3804
bt_host_release+0x19/0x30 net/bluetooth/hci_sysfs.c:86
device_release+0x7d/0x210 drivers/base/core.c:919
kobject_cleanup lib/kobject.c:662 [inline]
kobject_release lib/kobject.c:691 [inline]
kref_put include/linux/kref.h:67 [inline]
kobject_put.cold+0x28f/0x2ec lib/kobject.c:708
put_device+0x20/0x30 drivers/base/core.c:2060
hci_free_dev+0x19/0x20 net/bluetooth/hci_core.c:3208
vhci_release+0x7e/0xf0 drivers/bluetooth/hci_vhci.c:355
kobject: 'rfkill313' (00000000d3ffb8c5): kobject_uevent_env
__fput+0x3c5/0xb10 fs/file_table.c:278
____fput+0x16/0x20 fs/file_table.c:309
task_work_run+0x1f4/0x2b0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x32a/0x3b0 arch/x86/entry/common.c:166
kobject: 'rfkill313' (00000000d3ffb8c5): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci2/rfkill313'
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x696/0x800 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880986505c0
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 4192 bytes inside of
8192-byte region [ffff8880986505c0, ffff8880986525c0)
The buggy address belongs to the page:
kobject: 'rfkill313' (00000000d3ffb8c5): kobject_cleanup, parent
(null)
page:ffffea0002619400 count:1 mapcount:0 mapping:ffff88812c3f2080 index:0x0
compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea0002616508 ffffea0002302f08 ffff88812c3f2080
raw: 0000000000000000 ffff8880986505c0 0000000100000001 0000000000000000
kobject: 'rfkill313' (00000000d3ffb8c5): calling ktype release
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff888098651500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888098651580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
kobject: 'rfkill313': free name
> ffff888098651600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888098651680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888098651700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

syzbot

unread,
Mar 22, 2019, 8:04:01 AM3/22/19
to da...@davemloft.net, johan....@gmail.com, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, mar...@holtmann.org, mma...@suse.com, net...@vger.kernel.org, syzkall...@googlegroups.com, torv...@linux-foundation.org
syzbot has bisected this bug to:

commit c470abd4fde40ea6a0846a2beab642a578c0b8cd
Author: Linus Torvalds <torv...@linux-foundation.org>
Date: Sun Feb 19 22:34:00 2017 +0000

Linux 4.10

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1664c6df200000
start commit: c470abd4 Linux 4.10
git tree: upstream
Reported-by: syzbot+b364ed...@syzkaller.appspotmail.com
Fixes: c470abd4fde4 ("Linux 4.10")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Dmitry Vyukov

unread,
Mar 22, 2019, 8:16:56 AM3/22/19
to syzbot, David Miller, Johan Hedberg, linux-bluetooth, open list:KERNEL BUILD + fi..., LKML, Marcel Holtmann, Michal Marek, netdev, syzkaller-bugs, Linus Torvalds
The same story of HCI being broken before v4.10, so this is bisected
to the release.

Cong Wang

unread,
Mar 23, 2019, 4:25:21 PM3/23/19
to Dmitry Vyukov, syzbot, David Miller, Johan Hedberg, linux-bluetooth, open list:KERNEL BUILD + fi..., LKML, Marcel Holtmann, Michal Marek, netdev, syzkaller-bugs, Linus Torvalds
Does syzbot test the latest upstream? Isn't this supposed to be fixed by

commit e20a2e9c42c9e4002d9e338d74e7819e88d77162
Author: Myungho Jung <mhj...@gmail.com>
Date: Sat Feb 2 16:56:36 2019 -0800

Bluetooth: Fix decrementing reference count twice in releasing socket

?

Dmitry Vyukov

unread,
Mar 25, 2019, 4:04:39 AM3/25/19
to Cong Wang, syzbot, David Miller, Johan Hedberg, linux-bluetooth, open list:KERNEL BUILD + fi..., LKML, Marcel Holtmann, Michal Marek, netdev, syzkaller-bugs, Linus Torvalds
On Sat, Mar 23, 2019 at 9:25 PM Cong Wang <xiyou.w...@gmail.com> wrote:
>
> On Fri, Mar 22, 2019 at 5:19 AM Dmitry Vyukov <dvy...@google.com> wrote:
> >
> > On Fri, Mar 22, 2019 at 1:04 PM syzbot
> > <syzbot+b364ed...@syzkaller.appspotmail.com> wrote:
> > >
> > > syzbot has bisected this bug to:
> > >
> > > commit c470abd4fde40ea6a0846a2beab642a578c0b8cd
> > > Author: Linus Torvalds <torv...@linux-foundation.org>
> > > Date: Sun Feb 19 22:34:00 2017 +0000
> > >
> > > Linux 4.10
> > >
> > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1664c6df200000
> > > start commit: c470abd4 Linux 4.10
> > > git tree: upstream
> > > kernel config: https://syzkaller.appspot.com/x/.config?x=7308e68273924137
> > > dashboard link: https://syzkaller.appspot.com/bug?extid=b364ed862aa07c74bc62
> > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=152532bb400000
> > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13f73320c00000
> > >
> > > Reported-by: syzbot+b364ed...@syzkaller.appspotmail.com
> > > Fixes: c470abd4fde4 ("Linux 4.10")
> > >
> > > For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> >
> > The same story of HCI being broken before v4.10, so this is bisected
> > to the release.
>
> Does syzbot test the latest upstream?

Yes, it does.

> Isn't this supposed to be fixed by
>
> commit e20a2e9c42c9e4002d9e338d74e7819e88d77162
> Author: Myungho Jung <mhj...@gmail.com>
> Date: Sat Feb 2 16:56:36 2019 -0800
>
> Bluetooth: Fix decrementing reference count twice in releasing socket
>
> ?

I and syzbot have no idea. You may know better. Is it? If yes, please
tell syzbot about the fix.

syzbot

unread,
Mar 25, 2019, 6:26:01 PM3/25/19
to syzkall...@googlegroups.com, xiyou.w...@gmail.com
Hello,

syzbot has tested the proposed patch but the reproducer still triggered
crash:
WARNING in kernfs_get

Bluetooth: Can't register HCI device
kobject_add_internal failed for hci0 (error: -2 parent: bluetooth)
Bluetooth: Can't register HCI device
kobject_add_internal failed for hci0 (error: -2 parent: bluetooth)
Bluetooth: Can't register HCI device
WARNING: CPU: 0 PID: 9688 at fs/kernfs/dir.c:494
kernfs_get.part.0+0x73/0x90 fs/kernfs/dir.c:494
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 9688 Comm: syz-executor2 Not tainted 5.1.0-rc2 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
panic+0x2cb/0x65c kernel/panic.c:214
__warn.cold+0x20/0x45 kernel/panic.c:571
report_bug+0x263/0x2b0 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:179 [inline]
fixup_bug arch/x86/kernel/traps.c:174 [inline]
do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272
do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:291
kobject: 'bluetooth' (0000000036becc10): kobject_add_internal:
parent: 'virtual', set: '(null)'
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:973
RIP: 0010:kernfs_get.part.0+0x73/0x90 fs/kernfs/dir.c:494
Code: e6 e8 e1 c2 9a ff 45 85 e4 74 1a e8 57 c1 9a ff be 04 00 00 00 48 89
df e8 da f9 d2 ff f0 ff 03 5b 41 5c 5d c3 e8 3d c1 9a ff <0f> 0b eb dd 48
89 df e8 b1 1f d3 ff eb c1 0f 1f 44 00 00 66 2e 0f
RSP: 0018:ffff88801e57f808 EFLAGS: 00010293
RAX: ffff888025210000 RBX: ffff88806f978000 RCX: ffffffff81d6822f
RDX: 0000000000000000 RSI: ffffffff81d68253 RDI: 0000000000000005
RBP: ffff88801e57f818 R08: ffff888025210000 R09: ffffed100df2f001
R10: ffffed100df2f000 R11: ffff88806f978003 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
kobject: 'hci1' (000000004fcabb44): kobject_add_internal:
parent: 'bluetooth', set: 'devices'
kobject: 'hci1' (000000004fcabb44): kobject_uevent_env
kernfs_get fs/kernfs/dir.c:493 [inline]
kernfs_new_node+0xb8/0x130 fs/kernfs/dir.c:698
kobject: 'hci2' (000000006a9a55c3): kobject_add_internal:
parent: 'bluetooth', set: 'devices'
kernfs_create_dir_ns+0x52/0x160 fs/kernfs/dir.c:1021
kobject: 'hci2' (000000006a9a55c3): kobject_uevent_env
sysfs_create_dir_ns+0x131/0x2a0 fs/sysfs/dir.c:59
kobject: 'hci1' (000000004fcabb44): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci1'
kobject: 'rfkill1103' (0000000019667ecd): kobject_add_internal:
parent: 'hci1', set: 'devices'
create_dir lib/kobject.c:88 [inline]
kobject_add_internal lib/kobject.c:247 [inline]
kobject_add_internal.cold+0xe5/0x5d4 lib/kobject.c:217
kobject_add_varg lib/kobject.c:382 [inline]
kobject_add+0x150/0x1c0 lib/kobject.c:426
kobject: 'rfkill1103' (0000000019667ecd): kobject_uevent_env
device_add+0x3d5/0x18a0 drivers/base/core.c:2057
kobject: 'rfkill1103' (0000000019667ecd): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci1/rfkill1103'
kobject: 'hci2' (000000006a9a55c3): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci2'
kobject: 'rfkill1104' (0000000076d4aaa7): kobject_add_internal:
parent: 'hci2', set: 'devices'
hci_register_dev+0x2e8/0x860 net/bluetooth/hci_core.c:3307
__vhci_create_device+0x2d0/0x5a0 drivers/bluetooth/hci_vhci.c:139
vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline]
vhci_get_user drivers/bluetooth/hci_vhci.c:219 [inline]
vhci_write+0x2d0/0x470 drivers/bluetooth/hci_vhci.c:299
call_write_iter include/linux/fs.h:1863 [inline]
new_sync_write+0x4c7/0x760 fs/read_write.c:474
kobject: 'rfkill1104' (0000000076d4aaa7): kobject_uevent_env
kobject: 'rfkill1104' (0000000076d4aaa7): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci2/rfkill1104'
kobject: 'hci3' (00000000519acec1): kobject_add_internal:
parent: 'bluetooth', set: 'devices'
__vfs_write+0xe4/0x110 fs/read_write.c:487
kobject: 'hci3' (00000000519acec1): kobject_uevent_env
vfs_write+0x20c/0x580 fs/read_write.c:549
kobject: 'hci4' (00000000b542ea85): kobject_add_internal:
parent: 'bluetooth', set: 'devices'
ksys_write+0xea/0x1f0 fs/read_write.c:598
kobject: 'hci4' (00000000b542ea85): kobject_uevent_env
__do_sys_write fs/read_write.c:610 [inline]
__se_sys_write fs/read_write.c:607 [inline]
__x64_sys_write+0x73/0xb0 fs/read_write.c:607
kobject: 'hci3' (00000000519acec1): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci3'
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
kobject: 'rfkill1105' (0000000029b9ee4e): kobject_add_internal:
parent: 'hci3', set: 'devices'
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4576a9
Code: 4d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 1b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
kobject: 'rfkill1103' (0000000019667ecd): kobject_uevent_env
RSP: 002b:00007f9f9aaaac88 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
kobject: 'rfkill1103' (0000000019667ecd): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci1/rfkill1103'
RAX: ffffffffffffffda RBX: 000000000071bf00 RCX: 00000000004576a9
RDX: 0000000000000002 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9f9aaab6d4
kobject: 'hci4' (00000000b542ea85): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci4'
R13: 00000000004add53 R14: 00000000006ef630 R15: 00000000ffffffff
kobject: 'rfkill1105' (0000000029b9ee4e): kobject_uevent_env
Kernel Offset: disabled
Rebooting in 86400 seconds..


Tested on:

commit: 8c2ffd91 Linux 5.1-rc2
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12dc13b3200000
kernel config: https://syzkaller.appspot.com/x/.config?x=545283dfc864ff41
compiler: gcc (GCC) 9.0.0 20190115 (experimental)

syzbot

unread,
May 16, 2020, 5:27:04 PM5/16/20
to big...@linutronix.de, da...@davemloft.net, dvy...@google.com, ja...@suse.cz, johan....@gmail.com, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, mar...@holtmann.org, mma...@suse.com, net...@vger.kernel.org, syzkall...@googlegroups.com, tg...@linutronix.de, torv...@linux-foundation.org, xiyou.w...@gmail.com
syzbot suspects this bug was fixed by commit:

commit f1e67e355c2aafeddf1eac31335709236996d2fe
Author: Thomas Gleixner <tg...@linutronix.de>
Date: Mon Nov 18 13:28:24 2019 +0000

fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1761ce06100000
start commit: 645ff1e8 Merge branch 'for-linus' of git://git.kernel.org/..
If the result looks correct, please mark the bug fixed by replying with:

#syz fix: fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t

syzbot

unread,
Sep 13, 2022, 7:21:26 PM9/13/22
to syzkall...@googlegroups.com
Auto-closing this bug as obsolete.
No recent activity, existing reproducers are no longer triggering the issue.
Reply all
Reply to author
Forward
0 new messages