From: Stephen Smalley <sds@tycho.nsa.gov>
To: Tim Shearer <tim.shearer@overturenetworks.com>,
"selinux@tycho.nsa.gov" <selinux@tycho.nsa.gov>,
Paul Moore <paul@paul-moore.com>
Subject: Re: Kernel error: SELinux: Invalid class 0
Date: Mon, 15 Jun 2015 13:20:52 -0400 [thread overview]
Message-ID: <557F0974.4080109@tycho.nsa.gov> (raw)
In-Reply-To: <557F004B.8090703@tycho.nsa.gov>
On 06/15/2015 12:41 PM, Stephen Smalley wrote:
> On 06/12/2015 01:48 PM, Tim Shearer wrote:
>> Hi all,
>>
>>
>>
>> Environment: CentOS 7, with either stock 3.10 kernel, or custom 3.19 kernel.
>>
>>
>>
>> I’m getting a AVC denial message in the audit logs that corresponds to
>> the opening of a TIPC socket (AF_TIPC). The denial is seems valid, and
>> is triggered by a custom C++ application that hasn’t yet been assigned
>> an appropriate security context. The problem I’m having is that the AVC
>> message is garbled (non-ASCII data in the denied and tclass fields),
>> which makes it difficult to assemble a new policy:
>>
>>
>>
>> ----
>>
>> type=AVC msg=audit(1434126658.487:34500): avc: denied {
>> *garbage_characters* } for pid=292 comm="kworker/u16:5"
>> scontext=system_u:system_r:kernel_t:s0
>> tcontext=system_u:object_r:unlabeled_t:s0 tclass=*garbage_characters*
>> permissive=0
>>
>> ----
>>
>>
>>
>> This corresponds to a kernel error that shows up in the debuglog:
>>
>> SELinux: Invalid class 0
>
> This suggests that the tipc kernel module is creating a socket in some
> manner without initializing its security state.
>
> Can you provide a reproducer program that triggers the error?
Looks to me as if tipc_accept() never calls sock_graft() or
security_sk_clone() so it will never initialize the security state of
the new sock. Kernel bug.
prev parent reply other threads:[~2015-06-15 17:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 17:48 Kernel error: SELinux: Invalid class 0 Tim Shearer
2015-06-15 16:41 ` Stephen Smalley
2015-06-15 17:20 ` Stephen Smalley [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=557F0974.4080109@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=paul@paul-moore.com \
--cc=selinux@tycho.nsa.gov \
--cc=tim.shearer@overturenetworks.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 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.