linux-stable/fs/efivarfs
Ard Biesheuvel cdb46a8aef efivarfs: Move efivarfs list into superblock s_fs_info
syzbot reports issues with concurrent fsopen()/fsconfig() invocations on
efivarfs, which are the result of the fact that the efivarfs list (which
caches the names and GUIDs of existing EFI variables) is a global
structure. In normal use, these issues are unlikely to trigger, even in
the presence of multiple mounts of efivarfs, but the execution pattern
used by the syzkaller reproducer may result in multiple instances of the
superblock that share the global efivarfs list, and this causes list
corruption when the list is reinitialized by one user while another is
traversing it.

So let's move the list head into the superblock s_fs_info field, so that
it will never be shared between distinct instances of the superblock. In
the common case, there will still be a single instance of this list, but
in the artificial syzkaller case, no list corruption can occur any
longer.

Reported-by: syzbot+1902c359bfcaf39c46f2@syzkaller.appspotmail.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2023-12-11 11:19:18 +01:00
..
file.c efivarfs: convert to new timestamp accessors 2023-10-18 13:26:20 +02:00
inode.c efivarfs: Move efivarfs list into superblock s_fs_info 2023-12-11 11:19:18 +01:00
internal.h efivarfs: Move efivarfs list into superblock s_fs_info 2023-12-11 11:19:18 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile efi: vars: Move efivar caching layer into efivarfs 2022-06-24 20:40:19 +02:00
super.c efivarfs: Move efivarfs list into superblock s_fs_info 2023-12-11 11:19:18 +01:00
vars.c efivarfs: Move efivarfs list into superblock s_fs_info 2023-12-11 11:19:18 +01:00