mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chien Tin Tung <chien.tin.tung@intel.com>
To: Colin King <colin.king@canonical.com>
Cc: Faisal Latif <faisal.latif@intel.com>,
	Doug Ledford <dledford@redhat.com>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][V2] RDMA/nes: do not leak uninitialized resp.reserved to userspace Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit
Date: Tue, 5 Sep 2017 09:40:41 -0500	[thread overview]
Message-ID: <20170905144041.GA13068@ctung-MOBL3.amr.corp.intel.com> (raw)
In-Reply-To: <20170904133705.3980-1-colin.king@canonical.com>

On Mon, Sep 04, 2017 at 02:37:05PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> resp.reserved has not been initialized and so the copy_to_user (via
> ib_copy_to_udata) is copying uninitialized data from the stack back
> to user space which is a potential information leak. Fix this by
> initializing all of resp to zero.

Reserved field is not copied as the length of reserved is subtracted
from the size of resp and passed to ib_copy_to_udata.

 if (ib_copy_to_udata(udata, &resp, sizeof resp - sizeof resp.reserved)) {


This patch is not necessary.

Chien

  parent reply	other threads:[~2017-09-05 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 13:37 Colin King
2017-09-04 13:56 ` Leon Romanovsky
2017-09-05 14:40 ` Chien Tin Tung [this message]
2017-09-05 14:45   ` Colin Ian King

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=20170905144041.GA13068@ctung-MOBL3.amr.corp.intel.com \
    --to=chien.tin.tung@intel.com \
    --cc=colin.king@canonical.com \
    --cc=dledford@redhat.com \
    --cc=faisal.latif@intel.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sean.hefty@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®