# git rev-parse -q --verify 5e46d1b78a03d52306f21f77a4e4a144b6d31486^{commit} 5e46d1b78a03d52306f21f77a4e4a144b6d31486 already have revision, skipping fetch # git checkout -q -f -B kisskb 5e46d1b78a03d52306f21f77a4e4a144b6d31486 # git clean -qxdf # < git log -1 # commit 5e46d1b78a03d52306f21f77a4e4a144b6d31486 # Author: Tetsuo Handa # Date: Sun Mar 21 23:37:49 2021 +0900 # # reiserfs: update reiserfs_xattrs_initialized() condition # # syzbot is reporting NULL pointer dereference at reiserfs_security_init() # [1], for commit ab17c4f02156c4f7 ("reiserfs: fixup xattr_root caching") # is assuming that REISERFS_SB(s)->xattr_root != NULL in # reiserfs_xattr_jcreate_nblocks() despite that commit made # REISERFS_SB(sb)->priv_root != NULL && REISERFS_SB(s)->xattr_root == NULL # case possible. # # I guess that commit 6cb4aff0a77cc0e6 ("reiserfs: fix oops while creating # privroot with selinux enabled") wanted to check xattr_root != NULL # before reiserfs_xattr_jcreate_nblocks(), for the changelog is talking # about the xattr root. # # The issue is that while creating the privroot during mount # reiserfs_security_init calls reiserfs_xattr_jcreate_nblocks which # dereferences the xattr root. The xattr root doesn't exist, so we get # an oops. # # Therefore, update reiserfs_xattrs_initialized() to check both the # privroot and the xattr root. # # Link: https://syzkaller.appspot.com/bug?id=8abaedbdeb32c861dc5340544284167dd0e46cde # [1] # Reported-and-tested-by: syzbot # Signed-off-by: Tetsuo Handa # Fixes: 6cb4aff0a77c ("reiserfs: fix oops while creating privroot with selinux enabled") # Acked-by: Jeff Mahoney # Acked-by: Jan Kara # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 5e46d1b78a03d52306f21f77a4e4a144b6d31486 # < make -s -j 32 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux- defconfig # < make -s -j 32 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux- help # make -s -j 32 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux- olddefconfig # make -s -j 32 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/mips-linux/bin/mips-linux- WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped. FIT description: Linux 5.12.0-rc5-g5e46d1b78a03 Created: Wed Mar 31 11:17:37 2021 Image 0 (kernel@0) Description: Linux 5.12.0-rc5-g5e46d1b78a03 Created: Wed Mar 31 11:17:37 2021 Type: Kernel Image Compression: gzip compressed Data Size: 5242695 Bytes = 5119.82 KiB = 5.00 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x809aab3c Hash algo: sha1 Hash value: 2315f2038abc347a83ab0d111ffcde7964162dfd Image 1 (fdt@boston) Description: img,boston Device Tree Created: Wed Mar 31 11:17:37 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Wed Mar 31 11:17:37 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt@ocelot_pcb123) Description: MSCC Ocelot PCB123 Device Tree Created: Wed Mar 31 11:17:37 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 4659 Bytes = 4.55 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 5bcb6e4f21e8e5372544aa130b3bd097355a9050 Image 4 (fdt@ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Wed Mar 31 11:17:37 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 5418 Bytes = 5.29 KiB = 0.01 MiB Architecture: MIPS Hash algo: sha1 Hash value: 93d882f2009a217e0fa9dab94788535ed2be8476 Image 5 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Wed Mar 31 11:17:37 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 63d058b780f65e22da30f0a183433765f1807f1d Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Configuration 3 (conf@ocelot_pcb123) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb123 Configuration 4 (conf@ocelot_pcb120) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb120 Configuration 5 (conf@xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel@0 FDT: fdt@xilfpga Completed OK # rm -rf /kisskb/build/linus_mips-defconfig_mips-gcc8 # Build took: 0:02:07.645229