[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190523175736.GA6222@avx2>
Date: Thu, 23 May 2019 20:57:36 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] elf: fix "start_code" evaluation
Only executable ELF program headers should change ->start_code.
Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
fs/binfmt_elf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1026,7 +1026,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
}
}
k = elf_ppnt->p_vaddr;
- if (k < start_code)
+ if ((elf_ppnt->p_flags & PF_X) && k < start_code)
start_code = k;
if (start_data < k)
start_data = k;
Powered by blists - more mailing lists