diff options
author | Kees Cook <keescook@chromium.org> | 2020-03-27 07:48:20 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-04-20 19:44:27 +0200 |
commit | 6e0d6ac5f3d9d90271899f6d340872360fe1caee (patch) | |
tree | 3b8a2714c6b4db127d2e3544d12985e0e515f616 /fs/compat_binfmt_elf.c | |
parent | arm32/64/elf: Split READ_IMPLIES_EXEC from executable PT_GNU_STACK (diff) | |
download | linux-6e0d6ac5f3d9d90271899f6d340872360fe1caee.tar.xz linux-6e0d6ac5f3d9d90271899f6d340872360fe1caee.zip |
arm64/elf: Disable automatic READ_IMPLIES_EXEC for 64-bit address spaces
With arm64 64-bit environments, there should never be a need for automatic
READ_IMPLIES_EXEC, as the architecture has always been execute-bit aware
(as in, the default memory protection should be NX unless a region
explicitly requests to be executable).
Suggested-by: Hector Marco-Gisbert <hecmargi@upv.es>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lkml.kernel.org/r/20200327064820.12602-7-keescook@chromium.org
Diffstat (limited to 'fs/compat_binfmt_elf.c')
-rw-r--r-- | fs/compat_binfmt_elf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c index aaad4ca1217e..3068d57436b3 100644 --- a/fs/compat_binfmt_elf.c +++ b/fs/compat_binfmt_elf.c @@ -113,6 +113,11 @@ #define arch_setup_additional_pages compat_arch_setup_additional_pages #endif +#ifdef compat_elf_read_implies_exec +#undef elf_read_implies_exec +#define elf_read_implies_exec compat_elf_read_implies_exec +#endif + /* * Rename a few of the symbols that binfmt_elf.c will define. * These are all local so the names don't really matter, but it |