# 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-8.1.0-nolibc/nds32le-linux/bin/nds32le-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/nds32le-linux/bin/nds32le-linux-ld --version # < git log --format=%s --max-count=1 a68a0262abdaa251e12c53715f48e698a18ef402 # < make -s -j 10 ARCH=nds32 O=/kisskb/build/linus_nds32-allyesconfig_nds32le-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/nds32le-linux/bin/nds32le-linux- allyesconfig # make -s -j 10 ARCH=nds32 O=/kisskb/build/linus_nds32-allyesconfig_nds32le-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/nds32le-linux/bin/nds32le-linux- :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] /kisskb/src/arch/nds32/kernel/setup.c: In function 'setup_memory': /kisskb/src/arch/nds32/kernel/setup.c:247:26: warning: unused variable 'region' [-Wunused-variable] struct memblock_region *region; ^~~~~~ /kisskb/src/drivers/input/joystick/analog.c:160:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp] #warning Precise timer not defined for this architecture. ^~~~~~~ WARNING: modpost: EXPORT symbol "copy_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: modpost: EXPORT symbol "clear_page" [vmlinux] version generation failed, symbol will not be versioned. Completed OK # rm -rf /kisskb/build/linus_nds32-allyesconfig_nds32le-gcc8 # Build took: 0:17:03.500983