public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Varun Prakash <varun@chelsio.com>
Cc: linux-kernel@vger.kernel.org,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, Daniel Micay <danielmicay@gmail.com>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] csiostor: Avoid content leaks and casts
Date: Thu, 18 May 2017 21:35:27 -0400	[thread overview]
Message-ID: <yq1pof54oio.fsf@oracle.com> (raw)
In-Reply-To: <20170509223444.GA51314@beast> (Kees Cook's message of "Tue, 9 May 2017 15:34:44 -0700")


Varun,

You weren't CC:ed on this patch. Please review. Thanks!

> When copying attributes, the len argument was padded out and the
> resulting memcpy() would copy beyond the end of the source buffer.
> Avoid this, and use size_t for val_len to avoid all the
> casts. Similarly, avoid source buffer casts and use void *.
>
> Additionally enforces val_len can be represented by u16 and that the
> DMA buffer was not overflowed. Fixes the size of mfa, which is not
> FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN (but it will be padded up to
> 4). This was noticed by the future CONFIG_FORTIFY_SOURCE checks.

https://patchwork.kernel.org/patch/9718995/

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2017-05-19  1:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09 22:34 [PATCH] csiostor: Avoid content leaks and casts Kees Cook
2017-05-19  1:35 ` Martin K. Petersen [this message]
2017-05-22 15:05 ` Varun Prakash
2017-05-22 16:29   ` Kees Cook
2017-05-23  9:30     ` Varun Prakash
2017-05-24  1:46 ` Martin K. Petersen

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=yq1pof54oio.fsf@oracle.com \
    --to=martin.petersen@oracle.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 \
    --cc=varun@chelsio.com \
    /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