diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-05-17 21:23:37 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-05-17 21:23:37 +0200 |
commit | b48397cb75ac17a5c6f99b3b41fab0ab1f879826 (patch) | |
tree | e1f12c750831bfae7b90b2e250930fee8234f392 /fs | |
parent | Merge tag 'objtool-urgent-2020-05-17' of git://git.kernel.org/pub/scm/linux/k... (diff) | |
parent | exec: Move would_dump into flush_old_exec (diff) | |
download | linux-b48397cb75ac17a5c6f99b3b41fab0ab1f879826.tar.xz linux-b48397cb75ac17a5c6f99b3b41fab0ab1f879826.zip |
Merge branch 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull execve fix from Eric Biederman:
"While working on my exec cleanups I found a bug in exec that I
introduced by accident a couple of years ago. I apparently missed the
fact that bprm->file can change.
Now I have a very personal motive to clean up exec and make it more
approachable.
The change is just moving woud_dump to where it acts on the final
bprm->file not the initial bprm->file. I have been careful and tested
and verify this fix works"
* 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
exec: Move would_dump into flush_old_exec
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c index 06b4c550af5d..2c465119affc 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1317,6 +1317,8 @@ int flush_old_exec(struct linux_binprm * bprm) */ set_mm_exe_file(bprm->mm, bprm->file); + would_dump(bprm, bprm->file); + /* * Release all of the old mmap stuff */ @@ -1876,8 +1878,6 @@ static int __do_execve_file(int fd, struct filename *filename, if (retval < 0) goto out; - would_dump(bprm, bprm->file); - retval = exec_binprm(bprm); if (retval < 0) goto out; |