Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Chien Tin Tung <chien.tin.tung@intel.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 15:45:09 +0100	[thread overview]
Message-ID: <d999c3dc-6d24-84eb-0321-e5f97f3e7088@canonical.com> (raw)
In-Reply-To: <20170905144041.GA13068@ctung-MOBL3.amr.corp.intel.com>

On 05/09/17 15:40, Chien Tin Tung wrote:
> 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.

Apologies, I completely overlooked that.

> 
> Chien
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 13:37 [PATCH][V2] RDMA/nes: do not leak uninitialized resp.reserved to userspace Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Colin King
2017-09-04 13:56 ` Leon Romanovsky
     [not found] ` <20170904133705.3980-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2017-09-05 14:40   ` Chien Tin Tung
2017-09-05 14:45     ` Colin Ian King [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=d999c3dc-6d24-84eb-0321-e5f97f3e7088@canonical.com \
    --to=colin.king@canonical.com \
    --cc=chien.tin.tung@intel.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