[v5.15] general protection fault in hci_uart_tty_ioctl

0 views
Skip to first unread message

syzbot

unread,
May 29, 2023, 1:45:57 AM5/29/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1fe619a7d252 Linux 5.15.113
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12c0b001280000
kernel config: https://syzkaller.appspot.com/x/.config?x=ab36330fd14820aa
dashboard link: https://syzkaller.appspot.com/bug?extid=78b6113e48e122fc1a82
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14cf1c71280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=111e9ffe280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2d1716ac5a07/disk-1fe619a7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9e9e3ef13603/vmlinux-1fe619a7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/810a025eede3/bzImage-1fe619a7.xz

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

general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 3630 Comm: syz-executor178 Not tainted 5.15.113-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:hci_uart_tty_ioctl+0x2dc/0xa70 drivers/bluetooth/hci_ldisc.c:772
Code: fa 4c 89 f3 48 81 c3 b8 00 00 00 48 89 d8 48 c1 e8 03 80 3c 28 00 74 08 48 89 df e8 7e 9f 6d fa 48 8b 1b 48 89 d8 48 c1 e8 03 <0f> b6 04 28 84 c0 0f 85 87 06 00 00 8b 2b e9 4f 07 00 00 e8 dc 43
RSP: 0018:ffffc9000303fe40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88807c3c0000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff875ba4e7 R09: ffffed100482a004
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000800455c9
R13: ffff888016eab000 R14: ffff888024150000 R15: 0000000000000000
FS: 00007fe0e13a3700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fed9efa3445 CR3: 000000002330b000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
tty_ioctl+0x8ff/0xc50 drivers/tty/tty_io.c:2816
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fe0e1412ac9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe0e13a3208 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe0e149a3f8 RCX: 00007fe0e1412ac9
RDX: 0000000000000000 RSI: 00000000800455c9 RDI: 0000000000000003
RBP: 00007fe0e149a3f0 R08: 00007fe0e13a3700 R09: 0000000000000000
R10: 00007fe0e13a3700 R11: 0000000000000246 R12: 00007fe0e149a3fc
R13: 00007ffeeb044c3f R14: 00007fe0e13a3300 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 7edf9da721f00b32 ]---
RIP: 0010:hci_uart_tty_ioctl+0x2dc/0xa70 drivers/bluetooth/hci_ldisc.c:772
Code: fa 4c 89 f3 48 81 c3 b8 00 00 00 48 89 d8 48 c1 e8 03 80 3c 28 00 74 08 48 89 df e8 7e 9f 6d fa 48 8b 1b 48 89 d8 48 c1 e8 03 <0f> b6 04 28 84 c0 0f 85 87 06 00 00 8b 2b e9 4f 07 00 00 e8 dc 43
RSP: 0018:ffffc9000303fe40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88807c3c0000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff875ba4e7 R09: ffffed100482a004
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000800455c9
R13: ffff888016eab000 R14: ffff888024150000 R15: 0000000000000000
FS: 00007fe0e13a3700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fed9efa3445 CR3: 000000002330b000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: fa cli
1: 4c 89 f3 mov %r14,%rbx
4: 48 81 c3 b8 00 00 00 add $0xb8,%rbx
b: 48 89 d8 mov %rbx,%rax
e: 48 c1 e8 03 shr $0x3,%rax
12: 80 3c 28 00 cmpb $0x0,(%rax,%rbp,1)
16: 74 08 je 0x20
18: 48 89 df mov %rbx,%rdi
1b: e8 7e 9f 6d fa callq 0xfa6d9f9e
20: 48 8b 1b mov (%rbx),%rbx
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 0f b6 04 28 movzbl (%rax,%rbp,1),%eax <-- trapping instruction
2e: 84 c0 test %al,%al
30: 0f 85 87 06 00 00 jne 0x6bd
36: 8b 2b mov (%rbx),%ebp
38: e9 4f 07 00 00 jmpq 0x78c
3d: e8 .byte 0xe8
3e: dc .byte 0xdc
3f: 43 rex.XB


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jun 4, 2023, 2:24:48 AM6/4/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d2869ace6eeb Linux 6.1.31
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=169c62b5280000
kernel config: https://syzkaller.appspot.com/x/.config?x=623aacf949348d7d
dashboard link: https://syzkaller.appspot.com/bug?extid=aeec2b0228ee92ab04b8
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a31f49280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17f4f82d280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2ed651ed0d8f/disk-d2869ace.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b8d3199c542c/vmlinux-d2869ace.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a44812549bf7/bzImage-d2869ace.xz

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

general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 3680 Comm: syz-executor252 Not tainted 6.1.31-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:hci_uart_tty_ioctl+0x2a0/0xa20 drivers/bluetooth/hci_ldisc.c:774
Code: e9 f9 49 81 c4 b8 00 00 00 4c 89 e0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 e7 e8 5b 7d 3f fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 65 06 00 00 8b 2b e9 39 07 00 00 e8 07
RSP: 0018:ffffc90003d2fe40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88801e63bb80
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffff8880778165f8 R08: ffffffff87a09ee0 R09: ffffed1003f1d584
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88801f8eacb8
R13: dffffc0000000000 R14: ffff888077816000 R15: 0000000000000000
FS: 00007fe2460cc700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe246190ae8 CR3: 000000001e5f5000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
tty_ioctl+0x88e/0xbd0 drivers/tty/tty_io.c:2782
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fe24613b8c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe2460cc318 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe2461c33f8 RCX: 00007fe24613b8c9
RDX: 0000000000000000 RSI: 00000000800455c9 RDI: 0000000000000003
RBP: 00007fe2461c33f0 R08: 00007fe2460cc700 R09: 0000000000000000
R10: 00007fe2460cc700 R11: 0000000000000246 R12: 6d74702f7665642f
R13: 00007ffffe681b5f R14: 00007fe2460cc400 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:hci_uart_tty_ioctl+0x2a0/0xa20 drivers/bluetooth/hci_ldisc.c:774
Code: e9 f9 49 81 c4 b8 00 00 00 4c 89 e0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 e7 e8 5b 7d 3f fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 65 06 00 00 8b 2b e9 39 07 00 00 e8 07
RSP: 0018:ffffc90003d2fe40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88801e63bb80
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffff8880778165f8 R08: ffffffff87a09ee0 R09: ffffed1003f1d584
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88801f8eacb8
R13: dffffc0000000000 R14: ffff888077816000 R15: 0000000000000000
FS: 00007fe2460cc700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe24617ca70 CR3: 000000001e5f5000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: e9 f9 49 81 c4 jmpq 0xc48149fe
5: b8 00 00 00 4c mov $0x4c000000,%eax
a: 89 e0 mov %esp,%eax
c: 48 c1 e8 03 shr $0x3,%rax
10: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
15: 74 08 je 0x1f
17: 4c 89 e7 mov %r12,%rdi
1a: e8 5b 7d 3f fa callq 0xfa3f7d7a
1f: 49 8b 1c 24 mov (%r12),%rbx
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 65 06 00 00 jne 0x69c
37: 8b 2b mov (%rbx),%ebp
39: e9 39 07 00 00 jmpq 0x777
3e: e8 .byte 0xe8
3f: 07 (bad)

syzbot

unread,
Sep 16, 2023, 2:20:47 PM9/16/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 9c33663af9ad115f90c076a1828129a3fbadea98
git tree: upstream
Author: Lee, Chun-Yi <joeyli...@gmail.com>
Date: Mon Jul 10 15:17:23 2023 +0000

Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1161bef8680000
Please keep in mind that other backports might be required as well.

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

syzbot

unread,
Jan 9, 2024, 1:17:08 PMJan 9
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 9c33663af9ad115f90c076a1828129a3fbadea98
git tree: upstream
Author: Lee, Chun-Yi <joeyli...@gmail.com>
Date: Mon Jul 10 15:17:23 2023 +0000

Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13de94dee80000
Reply all
Reply to author
Forward
0 new messages