public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Morris <james.l.morris@oracle.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: bot+015afdb01dbf2abb6a6bfdd5430b72e5503fca6d@syzkaller.appspotmail.com,
	linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov,
	syzkaller-bugs@googlegroups.com, danielj@mellanox.com,
	dledford@redhat.com, eparis@parisplace.org,
	junil0814.lee@lge.com, kyeongdon.kim@lge.com,
	linux-kernel@vger.kernel.org, mka@chromium.org,
	paul@paul-moore.com, sds@tycho.nsa.gov, serge@hallyn.com
Subject: Re: KASAN: slab-out-of-bounds Read in strcmp
Date: Mon, 4 Dec 2017 11:51:55 +1100 (AEDT)	[thread overview]
Message-ID: <alpine.LFD.2.20.1712041150270.1348@localhost> (raw)
In-Reply-To: <201712032227.JCH90603.HQOOtVFMJOFLSF@I-love.SAKURA.ne.jp>

On Sun, 3 Dec 2017, Tetsuo Handa wrote:

> Tetsuo Handa wrote:
> > which will allow strcmp() to trigger out of bound read when "size" is
> > larger than strlen(initial_sid_to_string[i]).
> 
> Oops. "smaller" than.
> 
> > 
> > Thus, I guess the simplest fix is to use strncmp() instead of strcmp().
> 
> Can somebody test below patch? (My CentOS 7 environment does not support
> enabling SELinux in linux.git . Userspace tool is too old to support?)

You mean enabling KASAN?  Yep, you need gcc 4.9.2 or better.  Recent 
Fedora has it.


-- 
James Morris
<james.l.morris@oracle.com>

  reply	other threads:[~2017-12-04  4:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <001a113f711a721c58055f052200@google.com>
2017-12-01 18:52 ` KASAN: slab-out-of-bounds Read in strcmp syzbot
2017-12-03 11:33   ` Tetsuo Handa
2017-12-03 13:27     ` Tetsuo Handa
2017-12-04  0:51       ` James Morris [this message]
2017-12-04 10:44         ` Tetsuo Handa
2017-12-04 10:49           ` Tetsuo Handa
2017-12-04  4:53       ` Dmitry Vyukov
2017-12-04 13:43     ` Stephen Smalley
2017-12-04 13:47       ` Dmitry Vyukov
2017-12-04 13:59         ` Paul Moore
2017-12-04 16:29           ` Dmitry Vyukov
2017-12-04 21:10             ` Paul Moore
2017-12-05  9:39               ` Dmitry Vyukov
2017-12-08 17:50               ` Dmitry Vyukov
2017-12-04 16:39           ` Dmitry Vyukov
2017-12-04 17:33             ` Stephen Smalley
2017-12-05 10:00               ` Dmitry Vyukov
2017-12-08 12:22                 ` Dmitry Vyukov
2017-12-04 14:07       ` Tetsuo Handa

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=alpine.LFD.2.20.1712041150270.1348@localhost \
    --to=james.l.morris@oracle.com \
    --cc=bot+015afdb01dbf2abb6a6bfdd5430b72e5503fca6d@syzkaller.appspotmail.com \
    --cc=danielj@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=junil0814.lee@lge.com \
    --cc=kyeongdon.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=paul@paul-moore.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=serge@hallyn.com \
    --cc=syzkaller-bugs@googlegroups.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