syzbot


BUG: corrupted list in kobject_add_internal (3)

Status: fixed on 2021/11/10 00:50
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+66264bf2fd0476be7e6c@syzkaller.appspotmail.com
Fix commit: 92fe24a7db75 Bluetooth: skip invalid hci_sync_conn_complete_evt
First crash: 1004d, last: 896d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: general protection fault in klist_next (log)
Repro: C syz .config
  
Discussions (22)
Title Replies (including bot) Last reply
[PATCH 5.13 000/380] 5.13.19-rc1 review 391 (391) 2021/10/01 17:10
[PATCH 4.4 000/133] 4.4.284-rc1 review 138 (138) 2021/09/22 07:22
[PATCH 4.19 000/293] 4.19.207-rc1 review 300 (300) 2021/09/22 05:34
[PATCH 5.4 000/260] 5.4.148-rc1 review 268 (268) 2021/09/22 05:31
[PATCH 4.14 000/217] 4.14.247-rc1 review 220 (220) 2021/09/22 01:59
[PATCH 4.9 000/175] 4.9.283-rc1 review 180 (180) 2021/09/21 15:34
[PATCH 5.10 000/306] 5.10.67-rc1 review 323 (323) 2021/09/20 05:00
[PATCH AUTOSEL 4.4 01/35] crypto: mxs-dcp - Use sg_mapping_iter to copy data 43 (43) 2021/09/17 19:21
[PATCH 5.14 000/432] 5.14.6-rc1 review 439 (439) 2021/09/17 17:59
[PATCH AUTOSEL 5.14 001/252] drm/bridge: ti-sn65dsi86: Don't read EDID blob over DDC 278 (278) 2021/09/14 13:44
[PATCH AUTOSEL 5.13 001/219] drm/vmwgfx: Fix subresource updates with new contexts 226 (226) 2021/09/11 14:38
[PATCH AUTOSEL 4.9 01/48] crypto: mxs-dcp - Use sg_mapping_iter to copy data 51 (51) 2021/09/09 13:01
[PATCH AUTOSEL 4.14 01/59] media: dib8000: rewrite the init prbs logic 62 (62) 2021/09/09 13:01
[PATCH AUTOSEL 4.19 01/74] media: dib8000: rewrite the init prbs logic 77 (77) 2021/09/09 13:01
[PATCH AUTOSEL 5.4 001/109] drm/amdgpu: Fix amdgpu_ras_eeprom_init() 112 (112) 2021/09/09 13:00
[PATCH AUTOSEL 5.10 001/176] drm/vc4: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET 180 (180) 2021/09/09 13:00
[PATCH v6 0/6] Bluetooth: fix locking and socket killing in SCO and RFCOMM 14 (14) 2021/09/03 03:17
[RESEND PATCH v5 0/6] Bluetooth: fix locking and socket killing in SCO and RFCOMM 10 (10) 2021/08/09 16:42
[PATCH v5 0/6] Bluetooth: fix locking and socket killing in SCO and RFCOMM 7 (7) 2021/08/04 11:03
[PATCH v2] Bluetooth: skip invalid hci_sync_conn_complete_evt 2 (2) 2021/07/29 11:38
[PATCH] Bluetooth: skip invalid hci_sync_conn_complete_evt 3 (3) 2021/07/28 06:47
[syzbot] BUG: corrupted list in kobject_add_internal (3) 0 (1) 2021/06/22 18:44
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: corrupted list in kobject_add_internal (2) kernel 1 1163d 1159d 0/26 auto-closed as invalid on 2021/05/10 16:34
linux-4.19 BUG: corrupted list in kobject_add_internal C done 2 931d 1178d 1/1 fixed on 2021/09/29 23:05
linux-4.19 BUG: corrupted list in kobject_add_internal (3) 1 542d 542d 0/1 auto-obsoleted due to no activity on 2023/01/21 23:55
linux-4.19 BUG: corrupted list in kobject_add_internal (2) 1 894d 894d 0/1 auto-closed as invalid on 2022/02/03 08:56
upstream BUG: corrupted list in kobject_add_internal (4) bluetooth C error done 4 555d 551d 0/26 auto-obsoleted due to no activity on 2023/05/17 19:00
linux-4.14 BUG: corrupted list in kobject_add_internal 1 1232d 1232d 0/1 auto-closed as invalid on 2021/03/02 15:06
upstream BUG: corrupted list in kobject_add_internal bluetooth C done done 9 1256d 1319d 15/26 fixed on 2020/11/16 12:12
Last patch testing requests (4)
Created Duration User Patch Repo Result
2021/08/04 04:45 18m desmondcheongzx@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master OK
2021/07/19 13:14 19m desmondcheongzx@gmail.com patch upstream OK
2021/07/19 11:14 0m desmondcheongzx@gmail.com patch upstream error OK
2021/06/24 12:58 10m desmondcheongzx@gmail.com patch upstream report log

Sample crash report:
list_add double add: new=ffff88802037a420, prev=ffff88802037a420, next=ffff8881400e1000.
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:29!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8479 Comm: kworker/u5:4 Not tainted 5.13.0-rc2-next-20210518-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: hci5 hci_rx_work
RIP: 0010:__list_add_valid.cold+0x26/0x3c lib/list_debug.c:29
Code: 68 f3 eb fa 4c 89 e1 48 c7 c7 e0 1c e3 89 e8 aa 88 f2 ff 0f 0b 48 89 f2 4c 89 e1 48 89 ee 48 c7 c7 20 1e e3 89 e8 93 88 f2 ff <0f> 0b 48 89 f1 48 c7 c7 a0 1d e3 89 4c 89 e6 e8 7f 88 f2 ff 0f 0b
RSP: 0018:ffffc9000181f7d8 EFLAGS: 00010286
RAX: 0000000000000058 RBX: ffff8881400e1000 RCX: 0000000000000000
RDX: ffff88801f295580 RSI: ffffffff815dbea5 RDI: fffff52000303eed
RBP: ffff88802037a420 R08: 0000000000000058 R09: 0000000000000000
R10: ffffffff815d5cee R11: 0000000000000000 R12: ffff8881400e1000
R13: ffff8880198b1340 R14: ffff88802037a438 R15: ffff88802037a420
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001f16748 CR3: 0000000027b36000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_add include/linux/list.h:67 [inline]
 list_add_tail include/linux/list.h:100 [inline]
 kobj_kset_join lib/kobject.c:196 [inline]
 kobject_add_internal+0x18d/0xa60 lib/kobject.c:246
 kobject_add_varg lib/kobject.c:390 [inline]
 kobject_add+0x150/0x1c0 lib/kobject.c:442
 device_add+0x36a/0x2100 drivers/base/core.c:3253
 hci_conn_add_sysfs+0x97/0x190 net/bluetooth/hci_sysfs.c:53
 hci_sync_conn_complete_evt.isra.0+0x54a/0x810 net/bluetooth/hci_event.c:4390
 hci_event_packet+0xf32/0x7c50 net/bluetooth/hci_event.c:6278
 hci_rx_work+0x4f8/0xd30 net/bluetooth/hci_core.c:5115
 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275
 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421
 kthread+0x3b1/0x4a0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Modules linked in:
---[ end trace 47d0cc8ab1bc8524 ]---
RIP: 0010:__list_add_valid.cold+0x26/0x3c lib/list_debug.c:29
Code: 68 f3 eb fa 4c 89 e1 48 c7 c7 e0 1c e3 89 e8 aa 88 f2 ff 0f 0b 48 89 f2 4c 89 e1 48 89 ee 48 c7 c7 20 1e e3 89 e8 93 88 f2 ff <0f> 0b 48 89 f1 48 c7 c7 a0 1d e3 89 4c 89 e6 e8 7f 88 f2 ff 0f 0b
RSP: 0018:ffffc9000181f7d8 EFLAGS: 00010286
RAX: 0000000000000058 RBX: ffff8881400e1000 RCX: 0000000000000000
RDX: ffff88801f295580 RSI: ffffffff815dbea5 RDI: fffff52000303eed
RBP: ffff88802037a420 R08: 0000000000000058 R09: 0000000000000000
R10: ffffffff815d5cee R11: 0000000000000000 R12: ffff8881400e1000
R13: ffff8880198b1340 R14: ffff88802037a438 R15: ffff88802037a420
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001f16748 CR3: 000000000be8e000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/06/18 18:37 linux-next a1f92694393a aba2b2fb .config console log report syz C ci-upstream-linux-next-kasan-gce-root BUG: corrupted list in kobject_add_internal
2021/10/05 05:56 upstream 84b3e42564ac ce697b49 .config console log report info ci-upstream-kasan-gce-smack-root BUG: corrupted list in kobject_add_internal
2021/07/31 18:51 linux-next 8d4b477da1a8 6c236867 .config console log report info ci-upstream-linux-next-kasan-gce-root BUG: corrupted list in kobject_add_internal
* Struck through repros no longer work on HEAD.