From: Michael Ellerman <mpe@ellerman.id.au>
To: Ondrej Mosnacek <omosnace@redhat.com>
Cc: selinux@vger.kernel.org, linux-next@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, Paul Moore <paul@paul-moore.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: Login broken with old userspace (was Re: [PATCH v2] selinux: introduce an initial SID for early boot processes)
Date: Sat, 29 Jul 2023 18:10:36 +1000 [thread overview]
Message-ID: <875y63dtoj.fsf@mail.lhotse> (raw)
In-Reply-To: <CAFqZXNtsCKsr0YHPCSJJQ5An=RoMhf0dufgr7P_SnAAv7CrLjw@mail.gmail.com>
Ondrej Mosnacek <omosnace@redhat.com> writes:
> On Fri, Jul 28, 2023 at 4:12 AM Michael Ellerman <mpe@ellerman.id.au> wrote:
>>
>> Ondrej Mosnacek <omosnace@redhat.com> writes:
>> > Currently, SELinux doesn't allow distinguishing between kernel threads
>> > and userspace processes that are started before the policy is first
>> > loaded - both get the label corresponding to the kernel SID. The only
>> > way a process that persists from early boot can get a meaningful label
>> > is by doing a voluntary dyntransition or re-executing itself.
>>
>> Hi,
>>
>> This commit breaks login for me when booting linux-next kernels with old
>> userspace, specifically Ubuntu 16.04 on ppc64le. 18.04 is OK.
>>
>> The symptom is that login never accepts the root password, it just
>> always says "Login incorrect".
>>
>> Bisect points to this commit.
>>
>> Reverting this commit on top of next-20230726, fixes the problem
>> (ie. login works again).
>>
>> Booting with selinux=0 also fixes the problem.
>>
>> Is this expected? The change log below suggests backward compatibility
>> was considered, is 16.04 just too old?
>
> Hi Michael,
>
> I can reproduce it on Fedora 38 when I boot with SELINUX=disabled in
> /etc/selinux/config (+ a kernel including that commit), so it likely
> isn't caused by the userspace being old. Can you check what you have
> in /etc/selinux/config (or if it exists at all)?
Not sure if you still need it, but /etc/selinux/config doesn't exist in
the 16.04 image.
cheers
prev parent reply other threads:[~2023-07-29 8:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230620131223.431281-1-omosnace@redhat.com>
2023-07-28 2:11 ` Login broken with old userspace (was Re: [PATCH v2] selinux: introduce an initial SID for early boot processes) Michael Ellerman
2023-07-28 11:02 ` Ondrej Mosnacek
2023-07-28 11:52 ` Stephen Smalley
2023-07-28 13:13 ` Ondrej Mosnacek
2023-07-28 13:23 ` Christian Göttsche
2023-07-28 15:11 ` Paul Moore
2023-08-01 13:24 ` Ondrej Mosnacek
2023-08-01 19:02 ` Paul Moore
2023-07-29 8:10 ` Michael Ellerman [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=875y63dtoj.fsf@mail.lhotse \
--to=mpe@ellerman.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=selinux@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;
as well as URLs for NNTP newsgroup(s).