All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Kenny <darren.kenny@oracle.com>
To: Alec Brown <alec.r.brown@oracle.com>, grub-devel@gnu.org
Cc: daniel.kiper@oracle.com, alec.r.brown@oracle.com
Subject: Re: [PATCH 0/6] Fix coverity bugs and add checks for elf values in grub-core
Date: Mon, 30 May 2022 10:02:29 +0100	[thread overview]
Message-ID: <m2ilpncs0q.fsf@oracle.com> (raw)
In-Reply-To: <1653593392-1932-1-git-send-email-alec.r.brown@oracle.com>

Hi Alec,

All of these look great, so:

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>

Thanks for looking at the Coverity issues,

Darren.

On Thursday, 2022-05-26 at 15:29:46 -04, Alec Brown wrote:
> Coverity identified several untrusted loop bounds and untrusted allocation size
> bugs in grub-core/loader/i386/bsdXX.c and grub-core/loader/multiboot_elfXX.c.
> Upon review of these bugs, I found that specific checks weren't being made to
> various elf header values based on the elf manual page. The first four patches
> in this patch series address the coverity bugs, as well as adds functions to
> check for the correct elf header values. The last two patches adds fixes to 
> previous work done in util/grub-module-verifierXX.c that also relates to making
> checks of elf header values. 
>
> The Coverity bugs being addressed are:
> CID 314018
> CID 314030
> CID 314031
> CID 314039
>
> Alec Brown (6):
>       grub-core/loader/i386/bsdXX.c: Avoid downcasting (char *) to (Elf_Shdr *)
>       elf: Validate number of elf section header table entries
>       elf: Validate elf section header table index for section name string table
>       elf: Validate number of elf program header table entries
>       util/grub-module-verifierXX.c: Add e_shoff check in get_shdr()
>       util/grub-module-verifierXX.c: Changed get_shnum() return type
>
>  grub-core/kern/elf.c               |  18 ++++++++++++++++++
>  grub-core/kern/elfXX.c             | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  grub-core/loader/i386/bsdXX.c      | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------
>  grub-core/loader/multiboot_elfxx.c |  79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
>  include/grub/elf.h                 |  23 +++++++++++++++++++++++
>  util/grub-module-verifierXX.c      |  13 +++++++++----
>  6 files changed, 290 insertions(+), 86 deletions(-)


      parent reply	other threads:[~2022-05-30  9:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 19:29 [PATCH 0/6] Fix coverity bugs and add checks for elf values in grub-core Alec Brown
2022-05-26 19:29 ` [PATCH 1/6] grub-core/loader/i386/bsdXX.c: Avoid downcasting (char *) to (Elf_Shdr *) Alec Brown
2022-05-26 19:29 ` [PATCH 2/6] elf: Validate number of elf section header table entries Alec Brown
2022-05-26 19:29 ` [PATCH 3/6] elf: Validate elf section header table index for section name string table Alec Brown
2022-05-26 19:29 ` [PATCH 4/6] elf: Validate number of elf program header table entries Alec Brown
2022-05-26 19:29 ` [PATCH 5/6] util/grub-module-verifierXX.c: Add e_shoff check in get_shdr() Alec Brown
2022-05-26 19:29 ` [PATCH 6/6] util/grub-module-verifierXX.c: Changed get_shnum() return type Alec Brown
2022-05-27 14:00 ` [PATCH 0/6] Fix coverity bugs and add checks for elf values in grub-core Daniel Kiper
2022-05-30  9:02 ` Darren Kenny [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=m2ilpncs0q.fsf@oracle.com \
    --to=darren.kenny@oracle.com \
    --cc=alec.r.brown@oracle.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.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.