From: Christian Brauner <brauner@kernel.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
Kees Cook <kees@kernel.org>, Paul Burton <paulburton@kernel.org>,
Shuah Khan <shuah@kernel.org>,
Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/2] binfmt_elf: return the real error when program headers cannot be loaded
Date: Wed, 02 Dec 2026 23:20:23 +0100 [thread overview]
Message-ID: <20261202-getreide-trollen-ledig-e3eed802b03f@brauner> (raw)
In-Reply-To: <20261106-b4-prep-vstor-149847-binfmt_elf-enomem-load-elf-phdrs-v2-0-1c8b7b1dae5c@virtuozzo.com>
On Fri, 06 Nov 2026 21:57:36 +0100, Konstantin Khorenko wrote:
> load_elf_phdrs() returns NULL on any failure, and load_elf_binary()
> turns that into -ENOEXEC for the executable and -ELIBBAD for its
> interpreter. A failed allocation or read of the program header table
> then looks like a bad file, and glibc's execvp() runs the ELF with
> /bin/sh.
>
> v2 changes the errno of those two failures and nothing else. Patch 2
> adds a selftest for both what stays and what changes.
>
> [...]
Applied to the kernel-7.5.misc branch of the vfs/vfs.git tree.
Patches in the kernel-7.5.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: kernel-7.5.misc
[1/2] binfmt_elf: return the real error when program headers cannot be loaded
https://git.kernel.org/vfs/vfs/c/296e9bafaab7
[2/2] selftests/exec: check the errors of an unloadable program header table
https://git.kernel.org/vfs/vfs/c/00e3f3e675a4
prev parent reply other threads:[~2026-12-02 22:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 20:57 Konstantin Khorenko
2026-11-06 20:57 ` [PATCH v2 1/2] " Konstantin Khorenko
2026-11-06 20:57 ` [PATCH v2 2/2] selftests/exec: check the errors of an unloadable program header table Konstantin Khorenko
2026-12-02 22:20 ` Christian Brauner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202-getreide-trollen-ledig-e3eed802b03f@brauner \
--to=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=kees@kernel.org \
--cc=khorenko@virtuozzo.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=paulburton@kernel.org \
--cc=shuah@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®