From: Paul Moore <paul@paul-moore.com>
To: "Christian Göttsche" <cgoettsche@seltendoof.de>, selinux@vger.kernel.org
Cc: "Stephen Smalley" <stephen.smalley.work@gmail.com>,
"Ondrej Mosnacek" <omosnacek@gmail.com>,
"Christian Göttsche" <cgzones@googlemail.com>
Subject: Re: [PATCH v2 1/3] selinux: bounds-check role and user membership bitmaps at load
Date: Wed, 30 Sep 2026 16:59:36 -0400 [thread overview]
Message-ID: <372d1c5412aba3811d5ee476c00ea095@paul-moore.com> (raw)
In-Reply-To: <20260928165253.2388012-3-cgoettsche@seltendoof.de>
On Sep 28, 2026 =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgoettsche@seltendoof.de> wrote:
>
> role->dominates, role->types and user->roles are read as ebitmaps but
> their set bits are never checked against the role and type symbol
> tables. A bit naming an undefined value is silently accepted, and an
> out-of-range one is used to index those tables later; in particular
> role_bounds_sanity_check() passes such a bit straight to sym_name(),
> reading p->sym_val_to_name[] out of bounds on a crafted bounded role.
>
> Validate the three bitmaps in policydb_index() once every symbol table
> is populated (roles are read before types, so this cannot be done in
> role_read()).
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
> ---
> v2: check each bit instead of just comparing the highest bit against
> nprim
> ---
> security/selinux/ss/policydb.c | 52 ++++++++++++++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
Merged into selinux/dev, thanks!
--
paul-moore.com
next prev parent reply other threads:[~2026-09-30 20:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 16:52 [PATCH v2 2/3] selinux: validate user MLS range and default level at load Christian Göttsche
2026-09-28 16:52 ` [PATCH v2 3/3] selinux: validate permissive and neveraudit map types " Christian Göttsche
2026-09-28 17:07 ` sashiko-bot
2026-09-29 13:11 ` Stephen Smalley
2026-09-30 20:59 ` Paul Moore
2026-09-28 16:52 ` [PATCH v2 1/3] selinux: bounds-check role and user membership bitmaps " Christian Göttsche
2026-09-28 17:03 ` sashiko-bot
2026-09-28 17:49 ` Stephen Smalley
2026-09-28 17:54 ` Stephen Smalley
2026-09-28 18:20 ` Stephen Smalley
2026-09-30 20:59 ` Paul Moore [this message]
2026-09-28 17:01 ` [PATCH v2 2/3] selinux: validate user MLS range and default level " sashiko-bot
2026-09-28 19:48 ` [RFC PATCH 15/32] selinux: make mls_level_isvalid() static Stephen Smalley
2026-09-29 13:11 ` [PATCH v2 2/3] selinux: validate user MLS range and default level at load Stephen Smalley
2026-09-30 20:59 ` Paul Moore
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=372d1c5412aba3811d5ee476c00ea095@paul-moore.com \
--to=paul@paul-moore.com \
--cc=cgoettsche@seltendoof.de \
--cc=cgzones@googlemail.com \
--cc=omosnacek@gmail.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox