From: James Morris <james.l.morris@oracle.com>
To: Paul Moore <pmoore@redhat.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: [PATCH] selinux: ensure the context is NULL terminated in security_context_to_sid_core()
Date: Fri, 1 Dec 2017 11:33:05 +1100 (AEDT) [thread overview]
Message-ID: <alpine.LFD.2.20.1712011132550.31584@localhost> (raw)
In-Reply-To: <151206074183.32567.881282052709289967.stgit@chester>
On Thu, 30 Nov 2017, Paul Moore wrote:
> From: Paul Moore <paul@paul-moore.com>
>
> The syzbot/syzkaller automated tests found a problem in
> security_context_to_sid_core() during early boot (before we load the
> SELinux policy) where we could potentially feed context strings without
> NULL terminators into the strcmp() function.
>
> We already guard against this during normal operation (after the SELinux
> policy has been loaded) by making a copy of the context strings and
> explicitly adding a NULL terminator to the end. The patch extends this
> protection to the early boot case (no loaded policy) by moving the context
> copy earlier in security_context_to_sid_core().
>
> Reported-by: syzbot <syzkaller@googlegroups.com>
> Signed-off-by: Paul Moore <paul@paul-moore.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
--
James Morris
<james.l.morris@oracle.com>
prev parent reply other threads:[~2017-12-01 0:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 16:52 [PATCH] selinux: ensure the context is NULL terminated in security_context_to_sid_core() Paul Moore
2017-11-30 23:44 ` William Roberts
2017-12-01 15:34 ` Paul Moore
2017-12-01 19:20 ` Stephen Smalley
2017-12-01 21:32 ` Paul Moore
2017-12-01 0:33 ` James Morris [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=alpine.LFD.2.20.1712011132550.31584@localhost \
--to=james.l.morris@oracle.com \
--cc=pmoore@redhat.com \
--cc=selinux@tycho.nsa.gov \
/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.