netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: David Laight <David.Laight@ACULAB.COM>,
	venkat.x.venkatsubra@oracle.com,
	David Miller <davem@davemloft.net>,
	rds-devel@oss.oracle.com, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] net/rds: using strlcpy instead of strncpy
Date: Tue, 05 Mar 2013 10:32:22 +0800	[thread overview]
Message-ID: <51355936.3060307@asianux.com> (raw)
In-Reply-To: <1362422090.2956.18.camel@bwh-desktop.uk.solarflarecom.com>

于 2013年03月05日 02:34, Ben Hutchings 写道:
> On Mon, 2013-03-04 at 18:32 +0000, Ben Hutchings wrote:
>> > On Thu, 2013-02-28 at 09:36 +0000, David Laight wrote:
>>> > > 
>>> > > If the target buffer ends up being copied to userspace that
>>> > > might lead to random kernel memory being leaked.
>> > 
>> > Seems it is.  The last byte of 'name' is not currently initialised and
>> > therefore is already leaked to userland.
>> > 
>> > But it's OK because rds_info_copy() uses memcpy() not __copy_to_user(),
>> > so SMAP will block this leak. :-)
> Or not, as kmap() presumably evades that.

 is this patch ok, or need improving ?

BTW:
  excuse me, maybe my reply will be late during this week.
  the reason:
    my father had a serious heart disease, and is in hospital.
    during these days, most of my time has to be in hospital.
      (God Bless, and thank Jesus Christ, my father is safe, now).
    within my company (Asianux), I also have something to do.


 :-)

-- 
Chen Gang

Asianux Corporation

  reply	other threads:[~2013-03-05  2:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28  8:28 [PATCH] net/rds: using strlcpy instead of strncpy Chen Gang
2013-02-28  9:36 ` David Laight
2013-02-28 10:26   ` Chen Gang
2013-03-04 18:32   ` Ben Hutchings
2013-03-04 18:34     ` Ben Hutchings
2013-03-05  2:32       ` Chen Gang [this message]
2013-03-05  3:16         ` Ben Hutchings
2013-03-05  3:32           ` Chen Gang
2013-03-05  3:37             ` Ben Hutchings
2013-03-05  4:09               ` Chen Gang
2013-03-05 17:00                 ` Ben Hutchings
2013-03-07  4:03                   ` Chen Gang
2013-03-08  3:19                   ` [PATCH] net/rds: zero last byte for strncpy Chen Gang
2013-03-08  5:36                     ` David Miller
2013-03-08  6:13                       ` Chen Gang

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=51355936.3060307@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --cc=venkat.x.venkatsubra@oracle.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;
as well as URLs for NNTP newsgroup(s).