From: Luis Chamberlain <mcgrof@kernel.org>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: jeyu@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] module: fix validate_section_offset() overflow bug on 64-bit
Date: Fri, 15 Oct 2021 14:14:31 -0700 [thread overview]
Message-ID: <YWnvN7jHdWHl/05D@bombadil.infradead.org> (raw)
In-Reply-To: <20211015205741.38283-2-skhan@linuxfoundation.org>
On Fri, Oct 15, 2021 at 02:57:41PM -0600, Shuah Khan wrote:
> validate_section_offset() uses unsigned long local variable to
> add/store shdr->sh_offset and shdr->sh_size on all platforms.
> unsigned long is too short when sh_offset is Elf64_Off which
> would be the case on 64bit ELF headers.
>
> Fix the overflow problem using the right size local variable when
> CONFIG_64BIT is defined.
>
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Thanks for doing this! I put this through the 0-day grinder.
In the meantime, since this talks about a fix, can the commit log be a
bit more descriptive about the impact of not applying the fix? In what
situation would not having this patch applied create an issue? Is this
theoretical or can an issue really happen. Has an issue gone
undiscovered for a while, and if so what could the consequences
have been all along?
And it would seem this issue was found through code inspection, not
through a real bug, correct? If this can be clarified on the commit log
as well that would be great!
Luis
next prev parent reply other threads:[~2021-10-15 21:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 20:57 [PATCH v2] module: change to print useful messages from elf_validity_check() Shuah Khan
2021-10-15 20:57 ` [PATCH] module: fix validate_section_offset() overflow bug on 64-bit Shuah Khan
2021-10-15 21:14 ` Luis Chamberlain [this message]
2021-10-18 17:36 ` Shuah Khan
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=YWnvN7jHdWHl/05D@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=jeyu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.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 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®