# 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-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 5e46d1b78a03d52306f21f77a4e4a144b6d31486 # < make -s -j 10 ARCH=powerpc O=/kisskb/build/linus_ppc6xx_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- ppc6xx_defconfig # < make -s -j 10 ARCH=powerpc O=/kisskb/build/linus_ppc6xx_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 10 ARCH=powerpc O=/kisskb/build/linus_ppc6xx_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 10 ARCH=powerpc O=/kisskb/build/linus_ppc6xx_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/block/genhd.c: In function 'diskstats_show': /kisskb/src/block/genhd.c:1311:1: warning: the frame size of 1160 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc85b98) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:07 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5457941 Bytes = 5330.02 KiB = 5.21 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:07 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5491031 Bytes = 5362.33 KiB = 5.24 MiB Load Address: 00d00000 Entry Point: 00d00294 Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:07 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5491155 Bytes = 5362.46 KiB = 5.24 MiB Load Address: 00d00000 Entry Point: 00d00294 Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:07 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5491762 Bytes = 5363.05 KiB = 5.24 MiB Load Address: 00d00000 Entry Point: 00d00894 Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:07 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5491832 Bytes = 5363.12 KiB = 5.24 MiB Load Address: 00d00000 Entry Point: 00d00894 INFO: Uncompressed kernel (size 0xc961a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:07 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5491305 Bytes = 5362.60 KiB = 5.24 MiB Load Address: 00d00000 Entry Point: 00d00294 INFO: Uncompressed kernel (size 0xc85b98) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:11 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5488889 Bytes = 5360.24 KiB = 5.23 MiB Load Address: 00d00000 Entry Point: 00d00294 Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:11 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5490842 Bytes = 5362.15 KiB = 5.24 MiB Load Address: 00d00000 Entry Point: 00d00294 Image Name: Linux-5.12.0-rc5+ Created: Wed Mar 31 10:11:11 2021 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5491580 Bytes = 5362.87 KiB = 5.24 MiB Load Address: 00d00000 Entry Point: 00d00294 Completed OK # rm -rf /kisskb/build/linus_ppc6xx_defconfig_powerpc-gcc4.9 # Build took: 0:07:22.650278