Re: [PATCH v3] Fix error handling in begin_new_exec

From: Kees Cook
Date: Mon Jan 22 2024 - 15:53:44 EST


On Mon, 22 Jan 2024 19:34:21 +0100, Bernd Edlinger wrote:
> 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.
>
>
> [...]

Applied to for-next/execve, thanks!

[1/1] Fix error handling in begin_new_exec
https://git.kernel.org/kees/c/84c39ec57d40

Take care,

--
Kees Cook