Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
binfmt/binfmt_execmodule: Copy filename if CONFIG_BUILD_KERNEL and ar…
…gv=NULL 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.
- Loading branch information