# 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/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux-gcc --version # < /opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux-ld --version # < git log --format=%s --max-count=1 5e46d1b78a03d52306f21f77a4e4a144b6d31486 # < make -s -j 32 ARCH=arm64 O=/kisskb/build/linus-rand_arm64-randconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- randconfig KCONFIG_SEED=0xA9A9EAA6 # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # < make -s -j 32 ARCH=arm64 O=/kisskb/build/linus-rand_arm64-randconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- help # make -s -j 32 ARCH=arm64 O=/kisskb/build/linus-rand_arm64-randconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- olddefconfig # make -s -j 32 ARCH=arm64 O=/kisskb/build/linus-rand_arm64-randconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- arch/arm64/Makefile:25: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum arch/arm64/Makefile:25: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum /kisskb/src/drivers/firmware/tegra/bpmp.c:861:51: error: 'tegra186_soc' undeclared here (not in a function) { .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc }, ^ make[4]: *** [/kisskb/src/scripts/Makefile.build:271: drivers/firmware/tegra/bpmp.o] Error 1 make[3]: *** [/kisskb/src/scripts/Makefile.build:514: drivers/firmware/tegra] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:514: drivers/firmware] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/kisskb/src/Makefile:1851: drivers] Error 2 make: *** [Makefile:215: __sub-make] Error 2 Command 'make -s -j 32 ARCH=arm64 O=/kisskb/build/linus-rand_arm64-randconfig_arm64-gcc5.4 CROSS_COMPILE=/opt/cross/kisskb/br-aarch64-glibc-2016.08-613-ge98b4dd/bin/aarch64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus-rand_arm64-randconfig_arm64-gcc5.4 # Build took: 0:05:18.502478