BUG: unable to handle kernel NULL pointer dereference in amp_read_loc_assoc_final_data

49 views
Skip to first unread message

syzbot

unread,
Jul 31, 2020, 12:34:17 AM7/31/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 205a42ce Linux 4.19.135
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12f07b60900000
kernel config: https://syzkaller.appspot.com/x/.config?x=155b0b328eb5e700
dashboard link: https://syzkaller.appspot.com/bug?extid=4ba87ea303864cf9af8b
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12a85468900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=157774d4900000

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

audit: type=1400 audit(1596169927.206:8): avc: denied { execmem } for pid=6477 comm="syz-executor286" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
IPVS: ftp: loaded support on port[0] = 21
BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
PGD 0 P4D 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 6505 Comm: kworker/u5:2 Not tainted 4.19.135-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: hci0 hci_rx_work
RIP: 0010:set_bit arch/x86/include/asm/bitops.h:71 [inline]
RIP: 0010:amp_read_loc_assoc_final_data+0x102/0x1d0 net/bluetooth/amp.c:312
Code: fc ff df 0f b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 ae 00 00 00 41 0f b7 84 24 9c 03 00 00 66 89 44 24 23 <f0> 41 80 4d 30 04 48 8d 6c 24 40 4c 89 e6 48 89 ef e8 a8 59 fe ff
RSP: 0018:ffff888088f27980 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 1ffff110111e4f30 RCX: 1ffff110148421ab
RDX: 0000000000000000 RSI: ffffffff8687a34e RDI: ffff888084fa54dc
RBP: ffff888088f50140 R08: 0000000000000000 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888084fa5140
R13: 0000000000000000 R14: ffff888084fa6080 R15: ffff888084fa5140
FS: 0000000000000000(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000030 CR3: 000000008e98f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hci_chan_selected_evt+0x1e0/0x360 net/bluetooth/hci_event.c:4656
hci_event_packet+0x185a/0x858f net/bluetooth/hci_event.c:5894
hci_rx_work+0x46b/0xa90 net/bluetooth/hci_core.c:4359
process_one_work+0x864/0x1570 kernel/workqueue.c:2155
worker_thread+0x64c/0x1130 kernel/workqueue.c:2298
kthread+0x30b/0x410 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Modules linked in:
CR2: 0000000000000030
---[ end trace 02e159b07500cc69 ]---
RIP: 0010:set_bit arch/x86/include/asm/bitops.h:71 [inline]
RIP: 0010:amp_read_loc_assoc_final_data+0x102/0x1d0 net/bluetooth/amp.c:312
Code: fc ff df 0f b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 ae 00 00 00 41 0f b7 84 24 9c 03 00 00 66 89 44 24 23 <f0> 41 80 4d 30 04 48 8d 6c 24 40 4c 89 e6 48 89 ef e8 a8 59 fe ff
RSP: 0018:ffff888088f27980 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 1ffff110111e4f30 RCX: 1ffff110148421ab
RDX: 0000000000000000 RSI: ffffffff8687a34e RDI: ffff888084fa54dc
RBP: ffff888088f50140 R08: 0000000000000000 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888084fa5140
R13: 0000000000000000 R14: ffff888084fa6080 R15: ffff888084fa5140
FS: 0000000000000000(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000030 CR3: 000000008e98f000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Jul 31, 2020, 1:12:23 AM7/31/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e5a54aa2 Linux 4.14.190
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17a37f12900000
kernel config: https://syzkaller.appspot.com/x/.config?x=dbb53fc7192d83c3
dashboard link: https://syzkaller.appspot.com/bug?extid=57af1c816d57b3e57ff3
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=155cf69b100000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13211ff4900000

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

audit: type=1400 audit(1596172170.294:8): avc: denied { execmem } for pid=6357 comm="syz-executor882" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
IPVS: ftp: loaded support on port[0] = 21
BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
IP: set_bit arch/x86/include/asm/bitops.h:76 [inline]
IP: amp_read_loc_assoc_final_data+0xe6/0x190 net/bluetooth/amp.c:312
PGD 0 P4D 0
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 1201 Comm: kworker/u5:0 Not tainted 4.14.190-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: hci0 hci_rx_work
task: ffff8880a79d6680 task.stack: ffff8880a7a28000
RIP: 0010:set_bit arch/x86/include/asm/bitops.h:76 [inline]
RIP: 0010:amp_read_loc_assoc_final_data+0xe6/0x190 net/bluetooth/amp.c:312
RSP: 0018:ffff8880a7a2f9f8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 1ffff11014f45f3f RCX: 1ffff11014f3adeb
RDX: 1ffff11012e2e90b RSI: ffff88809726c700 RDI: ffff888097174858
RBP: ffff88809726c700 R08: 0000000000000000 R09: 0000000000000002
R10: 0000000000000000 R11: ffff8880a79d6680 R12: ffff8880971744c0
R13: 0000000000000000 R14: ffff8880971744c0 R15: ffff8880952d5800
FS: 0000000000000000(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000030 CR3: 0000000090981000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hci_chan_selected_evt+0x1a3/0x2f0 net/bluetooth/hci_event.c:4334
hci_event_packet+0x17d8/0x7c7a net/bluetooth/hci_event.c:5425
hci_rx_work+0x3e6/0x970 net/bluetooth/hci_core.c:4244
process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
kthread+0x30d/0x420 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Code: 44 24 21 48 b8 00 00 00 00 00 fc ff df 0f b6 04 02 84 c0 74 08 3c 01 0f 8e 90 00 00 00 41 0f b7 84 24 98 03 00 00 66 89 44 24 23 <f0> 41 80 4d 30 04 48 8d 6c 24 40 4c 89 e6 48 89 ef e8 94 8b fe
RIP: set_bit arch/x86/include/asm/bitops.h:76 [inline] RSP: ffff8880a7a2f9f8
RIP: amp_read_loc_assoc_final_data+0xe6/0x190 net/bluetooth/amp.c:312 RSP: ffff8880a7a2f9f8
CR2: 0000000000000030
---[ end trace d21a20431cbfe6a2 ]---

syzbot

unread,
Apr 3, 2021, 2:48:06 AM4/3/21
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 99c2c8b009c42cbffd2bc5291ea8e1f27c3a9559
Author: Gopal Tiwari <gti...@redhat.com>
Date: Tue Feb 2 09:42:30 2021 +0000

Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1472e31ad00000
start commit: 13d2ce42 Linux 4.19.163
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=fac7c3360835a4e0
dashboard link: https://syzkaller.appspot.com/bug?extid=4ba87ea303864cf9af8b
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17d64fb7500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=161cc4c0d00000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data

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

syzbot

unread,
Apr 4, 2021, 12:57:09 PM4/4/21
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 2f642a2b33655f6495ce3640f44be76b0145aede
Author: Gopal Tiwari <gti...@redhat.com>
Date: Tue Feb 2 09:42:30 2021 +0000

Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1684b16ed00000
start commit: 87335852 Linux 4.14.209
git tree: linux-4.14.y
kernel config: https://syzkaller.appspot.com/x/.config?x=a932ed2a762225b
dashboard link: https://syzkaller.appspot.com/bug?extid=57af1c816d57b3e57ff3
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=116b8d1d500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16b8b0e5500000
Reply all
Reply to author
Forward
0 new messages