All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Loic <hackurx@opensec.fr>
Cc: stable@vger.kernel.org, danielmicay@gmail.com,
	keescook@chromium.org, davem@davemloft.net
Subject: Re: [PATCH] bna: ethtool: Avoid reading past end of buffer
Date: Sat, 17 Nov 2018 09:37:12 -0500	[thread overview]
Message-ID: <20181117143712.GN1706@sasha-vm> (raw)
In-Reply-To: <20181109135257.f7e5d75d717c40381c9f3ed8@opensec.fr>

On Fri, Nov 09, 2018 at 01:52:57PM +0100, Loic wrote:
>Hello,
>
>Please picked up this patch for linux 4.4 and 4.9.
>Compiled/tested without problem.
>
>Thank.
>
>[ Upstream commit 4dc69c1c1fff2f587f8e737e70b4a4e7565a5c94 ]
>
>From: Kees Cook <keescook@chromium.org>
>Date: Fri, 5 May 2017 15:30:23 -0700
>Subject: [PATCH] bna: ethtool: Avoid reading past end of buffer
>
>Using memcpy() from a string that is shorter than the length copied means
>the destination buffer is being filled with arbitrary data from the kernel
>rodata segment. Instead, use strncpy() which will fill the trailing bytes
>with zeros.
>
>This was found with the future CONFIG_FORTIFY_SOURCE feature.
>
>Cc: Daniel Micay <danielmicay@gmail.com>
>Signed-off-by: Kees Cook <keescook@chromium.org>
>Signed-off-by: David S. Miller <davem@davemloft.net>

Queued for 4.9 and 4.4, thank you.

--
Thanks,
Sasha

  reply	other threads:[~2018-11-18  0:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 12:52 [PATCH] bna: ethtool: Avoid reading past end of buffer Loic
2018-11-17 14:37 ` Sasha Levin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-05-05 22:30 Kees Cook
2017-05-08 18:42 ` David Miller

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=20181117143712.GN1706@sasha-vm \
    --to=sashal@kernel.org \
    --cc=danielmicay@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hackurx@opensec.fr \
    --cc=keescook@chromium.org \
    --cc=stable@vger.kernel.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.