[syzbot] BUG: corrupted list in efivar_entry_remove

25 views
Skip to first unread message

syzbot

unread,
Aug 26, 2022, 7:10:30 AM8/26/22
to ar...@kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 680fb5b009e8 Merge tag 'arm64-upstream' into for-kernelci
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=126f0865080000
kernel config: https://syzkaller.appspot.com/x/.config?x=4557ad2600fc45f4
dashboard link: https://syzkaller.appspot.com/bug?extid=1902c359bfcaf39c46f2
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10039fc3080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16f4ebc3080000

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

list_del corruption. prev->next should be ffff0000c74fd828, but was ffff80000d5c37a0. (prev=ffff80000d5c37a0)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:53!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 3019 Comm: syz-executor150 Not tainted 5.19.0-rc8-syzkaller-01618-g680fb5b009e8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/20/2022
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __list_del_entry_valid+0x94/0xa8 lib/list_debug.c:51
lr : __list_del_entry_valid+0x94/0xa8 lib/list_debug.c:51
sp : ffff80001317bc40
x29: ffff80001317bc40 x28: ffff0000c65f0000 x27: 0000000000000000
x26: 00000000000000c0 x25: ffff0000cae01828 x24: ffff0000c74fd000
x23: ffff80000d309368 x22: ffff8000093f7a24 x21: ffff80000d5c37a0
x20: 0000000000000000 x19: ffff0000c74fd000 x18: 0000000000000265
x17: ffff80000bfed6bc x16: ffff80000db3b658 x15: ffff0000c65f0000
x14: 0000000000000021 x13: 00000000ffffffff x12: ffff0000c65f0000
x11: ff808000081bf324 x10: 0000000000000000 x9 : bdc8aea51905dc00
x8 : bdc8aea51905dc00 x7 : ffff800008160c98 x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000
x2 : ffff0001fefbecd0 x1 : 0000000100000000 x0 : 000000000000006d
Call trace:
__list_del_entry_valid+0x94/0xa8 lib/list_debug.c:51
__list_del_entry include/linux/list.h:134 [inline]
list_del include/linux/list.h:148 [inline]
efivar_entry_remove+0x4c/0xa4 drivers/firmware/efi/vars.c:539
efivarfs_destroy+0x20/0x5c fs/efivarfs/super.c:185
__efivar_entry_iter+0x94/0x100 drivers/firmware/efi/vars.c:1089
efivarfs_kill_sb+0x3c/0x4c fs/efivarfs/super.c:249
deactivate_locked_super+0x70/0xd4 fs/super.c:332
deactivate_super+0xb8/0xbc fs/super.c:363
cleanup_mnt+0x1a4/0x1e0 fs/namespace.c:1186
__cleanup_mnt+0x20/0x30 fs/namespace.c:1193
task_work_run+0xc4/0x208 kernel/task_work.c:177
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x174/0x1d0 arch/arm64/kernel/signal.c:1117
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x9c/0x14c arch/arm64/kernel/entry-common.c:625
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:642
el0t_64_sync+0x18c/0x190
Code: 9001b300 912e7000 aa0803e3 94a6ef81 (d4210000)
---[ end trace 0000000000000000 ]---


---
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

Hillf Danton

unread,
Aug 26, 2022, 10:39:54 PM8/26/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Fri, 26 Aug 2022 04:10:29 -0700
> syzbot found the following issue on:
>
> HEAD commit: 680fb5b009e8 Merge tag 'arm64-upstream' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=126f0865080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4557ad2600fc45f4
> dashboard link: https://syzkaller.appspot.com/bug?extid=1902c359bfcaf39c46f2
> compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10039fc3080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16f4ebc3080000

Check double list del.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 680fb5b009e8

--- x/drivers/firmware/efi/vars.c
+++ v/drivers/firmware/efi/vars.c
@@ -536,9 +536,11 @@ int efivar_entry_remove(struct efivar_en
{
if (down_interruptible(&efivars_lock))
return -EINTR;
- list_del(&entry->list);
- up(&efivars_lock);

+ if (!list_empty(&entry->list))
+ list_del_init(&entry->list);
+
+ up(&efivars_lock);
return 0;
}
EXPORT_SYMBOL_GPL(efivar_entry_remove);
--

syzbot

unread,
Aug 26, 2022, 10:41:12 PM8/26/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to checkout kernel repo https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git on commit 680fb5b009e8: failed to run ["git" "checkout" "680fb5b009e8"]: exit status 1
error: pathspec '680fb5b009e8' did not match any file(s) known to git



Tested on:

commit: [unknown
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 680fb5b009e8
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=15835ae7080000

Hillf Danton

unread,
Aug 26, 2022, 11:42:16 PM8/26/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Fri, 26 Aug 2022 04:10:29 -0700
> syzbot found the following issue on:
>
> HEAD commit: 680fb5b009e8 Merge tag 'arm64-upstream' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=126f0865080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4557ad2600fc45f4
> dashboard link: https://syzkaller.appspot.com/bug?extid=1902c359bfcaf39c46f2
> compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10039fc3080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16f4ebc3080000

Check double list del.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 680fb5b009e8

syzbot

unread,
Aug 26, 2022, 11:43:13 PM8/26/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to checkout kernel repo https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git on commit 680fb5b009e8: failed to run ["git" "checkout" "680fb5b009e8"]: exit status 1
error: pathspec '680fb5b009e8' did not match any file(s) known to git



Tested on:

commit: [unknown
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 680fb5b009e8
userspace arch: arm64
patch: https://syzkaller.appspot.com/x/patch.diff?x=105025bd080000

Aleksandr Nogikh

unread,
Apr 3, 2023, 12:07:58 PM4/3/23
to syzbot, syzkall...@googlegroups.com
#syz set subsystems: efi
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/0000000000003dd70305e722f605%40google.com.

syzbot

unread,
Apr 3, 2023, 12:07:58 PM4/3/23
to nog...@google.com, syzkall...@googlegroups.com
> #syz set subsystems: efi

Thank you!

I've successfully updated the bug's subsystems.

Ard Biesheuvel

unread,
Dec 8, 2023, 10:24:30 AM12/8/23
to syzbot, linu...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Fri, 26 Aug 2022 at 13:10, syzbot
<syzbot+1902c3...@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 680fb5b009e8 Merge tag 'arm64-upstream' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=126f0865080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4557ad2600fc45f4
> dashboard link: https://syzkaller.appspot.com/bug?extid=1902c359bfcaf39c46f2
> compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10039fc3080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16f4ebc3080000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1902c3...@syzkaller.appspotmail.com

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
efivarfs-list-corruption-fix

Ard Biesheuvel

unread,
Dec 8, 2023, 10:38:35 AM12/8/23
to syzbot, linu...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Fri, 26 Aug 2022 at 13:10, syzbot
<syzbot+1902c3...@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 680fb5b009e8 Merge tag 'arm64-upstream' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=126f0865080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4557ad2600fc45f4
> dashboard link: https://syzkaller.appspot.com/bug?extid=1902c359bfcaf39c46f2
> compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10039fc3080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16f4ebc3080000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1902c3...@syzkaller.appspotmail.com
>

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
ecbfc830fd039

syzbot

unread,
Dec 8, 2023, 10:38:39 AM12/8/23
to ar...@kernel.org, ar...@kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
want either no args or 2 args (repo, branch), got 1

> ecbfc830fd039

Ard Biesheuvel

unread,
Dec 11, 2023, 5:22:54 AM12/11/23
to syzbot, linu...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Fri, 26 Aug 2022 at 13:10, syzbot
<syzbot+1902c3...@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 680fb5b009e8 Merge tag 'arm64-upstream' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=126f0865080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4557ad2600fc45f4
> dashboard link: https://syzkaller.appspot.com/bug?extid=1902c359bfcaf39c46f2
> compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10039fc3080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16f4ebc3080000
>

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next

syzbot

unread,
Dec 11, 2023, 7:04:07 AM12/11/23
to ar...@kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+1902c3...@syzkaller.appspotmail.com

Tested on:

commit: 94f7f618 efivarfs: automatically update super block flag
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
console output: https://syzkaller.appspot.com/x/log.txt?x=1118cbeee80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ef72ff9ec2bc7165
dashboard link: https://syzkaller.appspot.com/bug?extid=1902c359bfcaf39c46f2
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages