netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: ldv@altlinux.org, xemul@parallels.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] unix_diag: fix incorrect sign extension in unix_lookup_by_ino
Date: Fri, 19 Feb 2016 23:50:00 -0500 (EST)	[thread overview]
Message-ID: <20160219.235000.1109030635629935367.davem@davemloft.net> (raw)
In-Reply-To: <CAM_iQpX4c7v2HbMG7cPi3T=HTHeEGhEQTSNS6CxX0tY=7KA4Uw@mail.gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Fri, 19 Feb 2016 16:21:14 -0800

> On Thu, Feb 18, 2016 at 5:27 PM, Dmitry V. Levin <ldv@altlinux.org> wrote:
>> The value passed by unix_diag_get_exact to unix_lookup_by_ino has type
>> __u32, but unix_lookup_by_ino's argument ino has type int, which is not
>> a problem yet.
>> However, when ino is compared with sock_i_ino return value of type
>> unsigned long, ino is sign extended to signed long, and this results
>> to incorrect comparison on 64-bit architectures for inode numbers
>> greater than INT_MAX.
>>
>> This bug was found by strace test suite.
>>
>> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
>> Cc: <stable@vger.kernel.org>
> 
> Fixes: 5d3cae8bc39d ("unix_diag: Dumping exact socket core")
> Acked-by: Cong Wang <xiyou.wangcong@gmail.com>

Applied and queued up for -stable.

      reply	other threads:[~2016-02-20  4:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19  1:27 [PATCH] unix_diag: fix incorrect sign extension in unix_lookup_by_ino Dmitry V. Levin
2016-02-20  0:21 ` Cong Wang
2016-02-20  4:50   ` David Miller [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=20160219.235000.1109030635629935367.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ldv@altlinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@parallels.com \
    --cc=xiyou.wangcong@gmail.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).