public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+35ebc808442df6420eae@syzkaller.appspotmail.com>
To: eadavis@qq.com, linux-kernel@vger.kernel.org,
	 syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bluetooth?] KASAN: invalid-free in hci_req_sync_complete
Date: Sat, 22 Jun 2024 20:08:02 -0700	[thread overview]
Message-ID: <000000000000fa689d061b85f8e2@google.com> (raw)
In-Reply-To: <tencent_F6252CBAF6BB6C338E9E2C1BFF4B971B4308@qq.com>

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in hci_req_sync_complete

skb: ffff88802ca99900, skb fc: 0, rskb: ffff88802ca99540, rskb fc: 0, hci_req_sync_complete
Oops: general protection fault, probably for non-canonical address 0xdffffc000000000f: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000078-0x000000000000007f]
CPU: 0 PID: 65 Comm: kworker/u33:0 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7-dirty #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: hci2 hci_rx_work
RIP: 0010:hci_req_sync_complete+0x217/0x3d0 net/bluetooth/hci_request.c:110
Code: 48 c1 ea 03 80 3c 02 00 0f 85 76 01 00 00 4c 8b b3 08 0e 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d 7e 7e 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 3a 01 00 00
RSP: 0018:ffffc90000d27b10 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff88801edac000 RCX: ffffffff816e69b9
RDX: 000000000000000f RSI: ffffffff816ef706 RDI: 000000000000007e
RBP: ffff88802ca99900 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000005 R12: 0000000000000000
R13: ffff88801edace08 R14: 0000000000000000 R15: 0000000000000c1a
FS:  0000000000000000(0000) GS:ffff88806b000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f599deb91b0 CR3: 000000002af2e000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 hci_event_packet+0x963/0x1170 net/bluetooth/hci_event.c:7479
 hci_rx_work+0x2c4/0x1610 net/bluetooth/hci_core.c:4074
 process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
 process_scheduled_works kernel/workqueue.c:3312 [inline]
 worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
 kthread+0x2c1/0x3a0 kernel/kthread.c:389
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:hci_req_sync_complete+0x217/0x3d0 net/bluetooth/hci_request.c:110
Code: 48 c1 ea 03 80 3c 02 00 0f 85 76 01 00 00 4c 8b b3 08 0e 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d 7e 7e 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 3a 01 00 00
RSP: 0018:ffffc90000d27b10 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff88801edac000 RCX: ffffffff816e69b9
RDX: 000000000000000f RSI: ffffffff816ef706 RDI: 000000000000007e
RBP: ffff88802ca99900 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000005 R12: 0000000000000000
R13: ffff88801edace08 R14: 0000000000000000 R15: 0000000000000c1a
FS:  0000000000000000(0000) GS:ffff88806b000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f599deb91b0 CR3: 000000001a976000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 76 01 00 00    	jne    0x184
   e:	4c 8b b3 08 0e 00 00 	mov    0xe08(%rbx),%r14
  15:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1c:	fc ff df
  1f:	49 8d 7e 7e          	lea    0x7e(%r14),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2e:	48 89 fa             	mov    %rdi,%rdx
  31:	83 e2 07             	and    $0x7,%edx
  34:	38 d0                	cmp    %dl,%al
  36:	7f 08                	jg     0x40
  38:	84 c0                	test   %al,%al
  3a:	0f 85 3a 01 00 00    	jne    0x17a


Tested on:

commit:         2ccbdf43 Merge tag 'for-linus' of git://git.kernel.org..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=137c4c8e980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b8786f381e62940f
dashboard link: https://syzkaller.appspot.com/bug?extid=35ebc808442df6420eae
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=11d3c1fa980000


  reply	other threads:[~2024-06-23  3:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  6:47 [syzbot] [bluetooth?] KASAN: invalid-free in hci_req_sync_complete syzbot
2024-06-19 11:23 ` syzbot
2024-06-19 12:32   ` Edward Adam Davis
2024-06-19 12:58     ` syzbot
2024-06-23  2:36   ` Edward Adam Davis
2024-06-23  3:08     ` syzbot [this message]
2024-06-23  3:42   ` Edward Adam Davis
2024-06-23  4:06     ` syzbot
2024-06-23  4:14   ` Edward Adam Davis
2024-06-23  4:40     ` syzbot
2024-06-23  5:43   ` Hillf Danton
2024-06-23  6:08     ` syzbot
2024-06-23  9:06   ` [PATCH] Bluetooth: fix double free " Edward Adam Davis
2024-06-24 10:40   ` [syzbot] [bluetooth?] KASAN: invalid-free " Hillf Danton
2024-06-24 11:03     ` syzbot
2024-06-24 12:07   ` Edward Adam Davis
2024-06-24 12:36     ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=000000000000fa689d061b85f8e2@google.com \
    --to=syzbot+35ebc808442df6420eae@syzkaller.appspotmail.com \
    --cc=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox