public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf4adfc
)
execve: check for binaries too low to load
author
Alan Cox
<alan@linux.intel.com>
Sat, 26 May 2018 10:16:02 +0000
(11:16 +0100)
committer
Alan Cox
<alan@linux.intel.com>
Sat, 26 May 2018 10:16:02 +0000
(11:16 +0100)
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
patch
|
blob
|
history
diff --git
a/Kernel/syscall_exec16.c
b/Kernel/syscall_exec16.c
index
d76eaf0
..
6414424
100644
(file)
--- 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;
}