0ef735f93a
The 'filename' parameter comes from user space and cannot be accessed after calling ret = addrenv_select(binp->addrenv, &binp->oldenv); as it changes the address environment and 'filename' points to who knows where. In this case, calling nxtask_init(filename...) will cause a crash. Solve this by making a local copy before changing address environment IF argv = NULL. Why ? Because argv[0] contains the process name in this case and the argument vector is already copied into kernel memory, thus passing argv[0] to nxtask_init(argv[0]...) is safe. |
||
---|---|---|
.. | ||
libelf | ||
libnxflat | ||
binfmt_copyargv.c | ||
binfmt_coredump.c | ||
binfmt_dumpmodule.c | ||
binfmt_exec.c | ||
binfmt_execmodule.c | ||
binfmt_execsymtab.c | ||
binfmt_exit.c | ||
binfmt_globals.c | ||
binfmt_initialize.c | ||
binfmt_loadmodule.c | ||
binfmt_register.c | ||
binfmt_unloadmodule.c | ||
binfmt_unregister.c | ||
binfmt.h | ||
builtin.c | ||
CMakeLists.txt | ||
elf.c | ||
Kconfig | ||
Makefile | ||
nxflat.c |