public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Kees Cook <keescook@chromium.org>
Cc: linux-scsi@vger.kernel.org, QLogic-Storage-Upstream@cavium.com,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-kernel@vger.kernel.org,
	Daniel Micay <danielmicay@gmail.com>
Subject: Re: [PATCH] scsi: qedf: Avoid reading past end of buffer
Date: Mon, 08 May 2017 22:08:44 -0400	[thread overview]
Message-ID: <yq1a86msrwz.fsf@oracle.com> (raw)
In-Reply-To: <20170505224255.GA21521@beast> (Kees Cook's message of "Fri, 5 May 2017 15:42:55 -0700")


Kees,

> 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.

Applied to 4.12/scsi-fixes, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2017-05-09  2:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 22:42 [PATCH] scsi: qedf: Avoid reading past end of buffer Kees Cook
2017-05-05 23:01 ` Bart Van Assche
2017-05-05 23:10   ` Kees Cook
2017-05-06 19:00     ` Chad Dupuis
2017-05-09  2:08 ` Martin K. Petersen [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=yq1a86msrwz.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=QLogic-Storage-Upstream@cavium.com \
    --cc=danielmicay@gmail.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox