Re: [PATCH] libselinux: selinux_check_access: fail cleanly if avc_open() failed
Stephen Smalley <[email protected]>
| Newsgroups | org.kernel.vger.selinux |
|---|---|
| Message-ID | <CAEjxPJ6=at=wqQjprxsEwg6=8mk1ew+nBDhrtR3z-_Mp0cM3iw@mail.gmail.com> |
On Mon, Aug 17, 2026 at 9:59 AM James Carter <[email protected]> wrote: > > On Thu, Aug 13, 2026 at 2:40 PM Stephen Smalley > <[email protected]> wrote: > > > > avc_init_once() calls avc_open() but discards a failure result, and a > > subsequent selinux_check_access() proceeds to avc_context_to_sid() > > which now hits assert(avc_running) and aborts the caller. > > > > Latch the initializer outcome and have selinux_check_access() return > > -1/EINVAL when the AVC never came up, so callers see an error rather > > than a SIGABRT. > > > > Signed-off-by: Stephen Smalley <[email protected]> > > Acked-by: James Carter <[email protected]> Thanks, merged.