diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-05-17 12:23:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-05-17 12:23:37 -0700 |
commit | b48397cb75ac17a5c6f99b3b41fab0ab1f879826 (patch) | |
tree | e1f12c750831bfae7b90b2e250930fee8234f392 /fs | |
parent | ef0d5b9102c4614c45e04ede10d04e572a165ca8 (diff) | |
parent | f87d1c9559164294040e58f5e3b74a162bf7c6e8 (diff) |
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; |