diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2024-01-22 19:34:21 +0100 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2024-01-22 21:51:31 +0100 |
commit | 84c39ec57d409e803a9bb6e4e85daf1243e0e80b (patch) | |
tree | 04020185fffaae3df4e5269e698eff3a3ddf81f8 /kernel | |
parent | exec: Add do_close_execat() helper (diff) | |
download | linux-84c39ec57d409e803a9bb6e4e85daf1243e0e80b.tar.xz linux-84c39ec57d409e803a9bb6e4e85daf1243e0e80b.zip |
exec: Fix error handling in begin_new_exec()
If get_unused_fd_flags() fails, the error handling is incomplete because
bprm->cred is already set to NULL, and therefore free_bprm will not
unlock the cred_guard_mutex. Note there are two error conditions which
end up here, one before and one after bprm->cred is cleared.
Fixes: b8a61c9e7b4a ("exec: Generic execfd support")
Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Link: https://lore.kernel.org/r/AS8P193MB128517ADB5EFF29E04389EDAE4752@AS8P193MB1285.EURP193.PROD.OUTLOOK.COM
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions