We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 354e923 commit aeb7923Copy full SHA for aeb7923
fs/binfmt_elf.c
@@ -1117,11 +1117,11 @@ static int load_elf_binary(struct linux_binprm *bprm)
1117
* independently randomized mmap region (0 load_bias
1118
* without MAP_FIXED nor MAP_FIXED_NOREPLACE).
1119
*/
1120
- alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum);
1121
- if (alignment > ELF_MIN_ALIGN) {
+ if (interpreter) {
1122
load_bias = ELF_ET_DYN_BASE;
1123
if (current->flags & PF_RANDOMIZE)
1124
load_bias += arch_mmap_rnd();
+ alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum);
1125
if (alignment)
1126
load_bias &= ~(alignment - 1);
1127
elf_flags |= MAP_FIXED_NOREPLACE;
0 commit comments