From 021de38b112f36c73a2e0ef775808b11714c249a Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 26 May 2018 11:16:02 +0100 Subject: [PATCH] execve: check for binaries too low to load This got broken when the changes were added to allow high address binaries to be loaded into big memory windows. The real fix is to go to relocatable binaries of course --- Kernel/syscall_exec16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/syscall_exec16.c b/Kernel/syscall_exec16.c index d76eaf0f..64144248 100644 --- a/Kernel/syscall_exec16.c +++ b/Kernel/syscall_exec16.c @@ -105,7 +105,7 @@ arg_t _execve(void) /* FIXME: review overflows */ bin_size = ino->c_node.i_size; progptr = bin_size + 1024 + bss; - if (top - progload < progptr || progptr < bin_size) { + if (progload < PROGLOAD || top - progload < progptr || progptr < bin_size) { udata.u_error = ENOMEM; goto nogood2; } -- 2.34.1