From: james.l.morris@oracle.com (James Morris)
To: linux-security-module@vger.kernel.org
Subject: 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>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
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>
next prev parent reply other threads:[~2017-12-04 0:51 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 6:29 KASAN: slab-out-of-bounds Read in strcmp syzbot
2017-12-01 18:52 ` syzbot
2017-12-03 11:33 ` Tetsuo Handa
2017-12-03 11:33 ` Tetsuo Handa
2017-12-03 13:27 ` Tetsuo Handa
2017-12-03 13:27 ` Tetsuo Handa
2017-12-04 0:51 ` James Morris [this message]
2017-12-04 0:51 ` James Morris
2017-12-04 10:44 ` Tetsuo Handa
2017-12-04 10:44 ` Tetsuo Handa
2017-12-04 10:49 ` Tetsuo Handa
2017-12-04 10:49 ` Tetsuo Handa
2017-12-04 4:53 ` Dmitry Vyukov
2017-12-04 4:53 ` Dmitry Vyukov
2017-12-04 13:43 ` Stephen Smalley
2017-12-04 13:43 ` Stephen Smalley
2017-12-04 13:47 ` Dmitry Vyukov
2017-12-04 13:47 ` Dmitry Vyukov
2017-12-04 13:59 ` Paul Moore
2017-12-04 13:59 ` Paul Moore
2017-12-04 16:29 ` Dmitry Vyukov
2017-12-04 16:29 ` Dmitry Vyukov
2017-12-04 21:10 ` Paul Moore
2017-12-04 21:10 ` Paul Moore
2017-12-05 9:39 ` Dmitry Vyukov
2017-12-05 9:39 ` Dmitry Vyukov
2017-12-08 17:50 ` Dmitry Vyukov
2017-12-08 17:50 ` Dmitry Vyukov
2017-12-04 16:39 ` Dmitry Vyukov
2017-12-04 16:39 ` Dmitry Vyukov
2017-12-04 17:33 ` Stephen Smalley
2017-12-04 17:33 ` Stephen Smalley
2017-12-05 10:00 ` Dmitry Vyukov
2017-12-05 10:00 ` Dmitry Vyukov
2017-12-08 12:22 ` Dmitry Vyukov
2017-12-08 12:22 ` Dmitry Vyukov
2017-12-04 14:07 ` Tetsuo Handa
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=linux-security-module@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.