# git rev-parse -q --verify a68a0262abdaa251e12c53715f48e698a18ef402^{commit} a68a0262abdaa251e12c53715f48e698a18ef402 already have revision, skipping fetch # git checkout -q -f -B kisskb a68a0262abdaa251e12c53715f48e698a18ef402 # git clean -qxdf # < git log -1 # commit a68a0262abdaa251e12c53715f48e698a18ef402 # Author: Minchan Kim # Date: Tue Dec 8 20:57:18 2020 -0800 # # mm/madvise: remove racy mm ownership check # # Jann spotted the security hole due to race of mm ownership check. # # If the task is sharing the mm_struct but goes through execve() before # mm_access(), it could skip process_madvise_behavior_valid check. That # makes *any advice hint* to reach into the remote process. # # This patch removes the mm ownership check. With it, it will lose the # ability that local process could give *any* advice hint with vector # interface for some reason (e.g., performance). Since there is no # concrete example in upstream yet, it would be better to remove the # abiliity at this moment and need to review when such new advice comes # up. # # Fixes: ecb8ac8b1f14 ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API") # Reported-by: Jann Horn # Suggested-by: Jann Horn # Signed-off-by: Minchan Kim # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/ia64-linux/bin/ia64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/ia64-linux/bin/ia64-linux-ld --version # < git log --format=%s --max-count=1 a68a0262abdaa251e12c53715f48e698a18ef402 # < make -s -j 10 ARCH=ia64 O=/kisskb/build/linus_ia64-defconfig_ia64-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/ia64-linux/bin/ia64-linux- defconfig arch/ia64/configs/generic_defconfig:58:warning: override: reassigning to symbol ATA arch/ia64/configs/generic_defconfig:59:warning: override: reassigning to symbol ATA_PIIX # < make -s -j 10 ARCH=ia64 O=/kisskb/build/linus_ia64-defconfig_ia64-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/ia64-linux/bin/ia64-linux- help # make -s -j 10 ARCH=ia64 O=/kisskb/build/linus_ia64-defconfig_ia64-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/ia64-linux/bin/ia64-linux- olddefconfig # make -s -j 10 ARCH=ia64 O=/kisskb/build/linus_ia64-defconfig_ia64-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/ia64-linux/bin/ia64-linux- :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] In file included from /kisskb/src/arch/ia64/include/uapi/asm/intrinsics.h:22:0, from /kisskb/src/arch/ia64/include/asm/intrinsics.h:11, from /kisskb/src/arch/ia64/include/asm/timex.h:14, from /kisskb/src/include/linux/timex.h:65, from /kisskb/src/include/linux/time32.h:13, from /kisskb/src/include/linux/time.h:73, from /kisskb/src/fs/nfs/read.c:11: /kisskb/src/fs/nfs/read.c: In function 'nfs_read_completion': /kisskb/src/arch/ia64/include/uapi/asm/cmpxchg.h:57:2: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)))) ^ /kisskb/src/fs/nfs/read.c:196:5: note: in expansion of macro 'xchg' xchg(&nfs_req_openctx(req)->error, error); ^ /kisskb/src/fs/nfs/read.c: In function 'nfs_readpage': /kisskb/src/arch/ia64/include/uapi/asm/cmpxchg.h:57:2: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)))) ^ /kisskb/src/fs/nfs/read.c:355:2: note: in expansion of macro 'xchg' xchg(&ctx->error, 0); ^ No errors detected in 22334 functions. Completed OK # rm -rf /kisskb/build/linus_ia64-defconfig_ia64-gcc4.9 # Build took: 0:04:33.904150