Re: [PATCH] semodule-utils: add bad-data tests for link/expand neverallow

Stephen Smalley <[email protected]> Thu, 30 Jul 2026 13:21:10 -0400
Newsgroups org.kernel.vger.selinux
Message-ID <CAEjxPJ5sSW3fqQWF_BZO1VDSAjPu_jWoHUwJCp4MbSY62kz1TQ@mail.gmail.com>
On Thu, Jul 30, 2026 at 9:04=E2=80=AFAM Akhil Kohli <[email protected]> wr=
ote:
>
> Add link/expand bad-data tests for neverallow and neverallowxperm
> enforcement at semodule_expand: cross-module base violations, same-module
> neverallow conflicts, and checkmodule deferral document tests.
>
> Adapt same-module neverallowxperm for libsepol 3.11 (enforced at expand)
> while still passing on older userspace where enforcement is deferred.
> Refactor link/expand helpers through run_link_expand().
>
> Add a cross-module require test: link rejects a consumer module when a
> required type is only declared in a separate provider module.
>
> Signed-off-by: Akhil Kohli <[email protected]>

Acked-by: Stephen Smalley <[email protected]>