All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tobin C. Harding" <tobin@apporbit.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>,
	Tycho Andersen <tycho@tycho.ws>,
	kernel-hardening@lists.openwall.com
Subject: Re: VLA commit log
Date: Mon, 12 Mar 2018 16:44:50 +1100	[thread overview]
Message-ID: <20180312054450.GF8631@eros> (raw)
In-Reply-To: <861efe7a-e51f-e004-5979-aef0ed9ff1fe@embeddedor.com>

On Mon, Mar 12, 2018 at 12:38:04AM -0500, Gustavo A. R. Silva wrote:
> 
> 
> On 03/12/2018 12:26 AM, Tobin C. Harding wrote:
> >Hi,
> >
> >I got some push back on the commit log we have all started to use
> >(copying Kees' initial commit log).  If we are going to do hundreds of
> >these patches should we write a perfectly correct commit log that can be
> >included as the start of the 'why' of each VLA removal patch?  Here is
> >my attempt, I am quite bad at writing commit logs so would love someone
> >to fix it up.
> >
> 
> The same thing happened to me once and then I wrote this:

I had a feeling this had happened to you but I couldn't find the patch
that made me think that when writing this.

> In preparation to enabling -Wvla, remove VLA and replace it
> with a fixed-length array instead.

---

> From a security viewpoint, the use of Variable Length Arrays can be
> a vector for stack overflow attacks. Also, in general, as the code
> evolves it is easy to lose track of how big a VLA can get. Thus, we
> can end up having segfaults that are hard to debug.
>
> Also, fixed as part of the directive to remove all VLAs from
> the kernel: https://lkml.org/lkml/2018/3/7/621

---

Cool, I like this (between ---).  Kees can you ack this since I'm going
to cut and paste it about 300 times :)

> The maintainer lived happily ever after. :)

lol

> --
> Gustavo

thanks,
Tobin.

  reply	other threads:[~2018-03-12  5:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12  5:26 VLA commit log Tobin C. Harding
2018-03-12  5:38 ` Gustavo A. R. Silva
2018-03-12  5:44   ` Tobin C. Harding [this message]
2018-03-13  4:05     ` Kees Cook
2018-03-12 10:28 ` Salvatore Mesoraca
2018-03-13  4:53   ` Tycho Andersen
2018-03-13  5:46     ` Tobin C. Harding

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=20180312054450.GF8631@eros \
    --to=tobin@apporbit.com \
    --cc=gustavo@embeddedor.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=tycho@tycho.ws \
    /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.