From: "H.J. Lu" <hjl.tools@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] fs/binfmt_elf.c: disallow zero entry point address
Date: Sun, 12 Dec 2021 12:43:23 -0800 [thread overview]
Message-ID: <YbZe67Rj2QuxeADn@gmail.com> (raw)
In-Reply-To: <CAHk-=wiKzE-+X7uZHELP-udnULXf75jog=UfO7GQ_gPXycELjw@mail.gmail.com>
On Sun, Dec 12, 2021 at 11:35:56AM -0800, Linus Torvalds wrote:
> [ Crossed emails ]
>
> On Sun, Dec 12, 2021 at 11:30 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Linux, the start of the first PT_LOAD segment is the ELF
> > header and the address 0 points to the ELF magic bytes which
> > isn't a valid code sequence.
>
> Yeah, then I think a much more valid argument (and patch) is _that_ argument.
>
> So that kind of explanation, along with a patch more along the line of that
>
> if (elf_ex->e_entry < header_sizes)
> goto out;
>
> I suggested, and not talking about paper standards that may or may not
> be relevant.
>
> That would be much more palatable to me - it's a _technical_ argument,
> not a "some paper standard that we clearly have never followed"
> argument.
>
> Linus
I sent out the v2 patch with
if (elf_ex->e_entry < sizeof(*elf_ex))
goto out;
H.J.
next prev parent reply other threads:[~2021-12-12 20:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-11 17:34 [PATCH] fs/binfmt_elf.c: disallow zero entry point address H.J. Lu
2021-12-12 7:38 ` Alexey Dobriyan
2021-12-12 13:52 ` H.J. Lu
2021-12-12 18:29 ` Linus Torvalds
2021-12-12 19:05 ` H.J. Lu
2021-12-12 19:15 ` Linus Torvalds
2021-12-12 19:30 ` H.J. Lu
2021-12-12 19:35 ` Linus Torvalds
2021-12-12 20:43 ` H.J. Lu [this message]
2021-12-12 19:33 ` Linus Torvalds
2021-12-13 18:34 ` Alexey Dobriyan
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=YbZe67Rj2QuxeADn@gmail.com \
--to=hjl.tools@gmail.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.