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
next prev parent reply other threads:[~2017-12-04 0:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <001a113f711a721c58055f052200@google.com>
[not found] ` <089e08259d282c063e055f4bddbd@google.com>
2017-12-03 11:33 ` KASAN: slab-out-of-bounds Read in strcmp 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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox