All of lore.kernel.org
 help / color / mirror / Atom feed
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" <omosnace@redhat.com>,
	"Christian Göttsche" <cgzones@googlemail.com>
Subject: Re: [PATCH] selinux: always fill AVC decision in  avc_has_perm_noaudit()
Date: Tue, 15 Sep 2026 17:51:29 -0400	[thread overview]
Message-ID: <f3f3f22a56760011aa9bf5c1ab45c95d@paul-moore.com> (raw)
In-Reply-To: <20260903114338.77055-1-cgoettsche@seltendoof.de>

On Sep  3, 2026 =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgoettsche@seltendoof.de> wrote:
> 
> avc_has_perm_noaudit() is documented to return a copy of the access
> decision in @avd, but its early return for an empty requested permission
> set leaves the buffer untouched.  All callers pass an uninitialized
> stack variable and afterwards feed it to avc_audit(), and the inode hook
> even stores it in the per-task decision cache.
> 
> Fill in a deny-all, audit-all decision, similar to avd_init(), so every
> caller receives a defined value at no cost on the hot path.
> 
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> Fixes: e6f2f381e4015386 ("selinux: replace BUG_ONs with WARN_ONs in avc.c")
> Reviewed-by: Stephen Smalley <stephen.smalley.work@gmail.com>
> ---
>  security/selinux/avc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Good catch, thanks Christian.  I'm going to mark this for stable and
merge it via selinux/stable-7.3, if anyone would rather see this go via
the traditional selinux/dev branch please speak up in the next few days.

--
paul-moore.com

      parent reply	other threads:[~2026-09-15 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 11:43 [PATCH] selinux: always fill AVC decision in avc_has_perm_noaudit() Christian Göttsche
2026-09-03 11:51 ` sashiko-bot
2026-09-03 13:19 ` Stephen Smalley
2026-09-15 21:51 ` Paul Moore [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=f3f3f22a56760011aa9bf5c1ab45c95d@paul-moore.com \
    --to=paul@paul-moore.com \
    --cc=cgoettsche@seltendoof.de \
    --cc=cgzones@googlemail.com \
    --cc=omosnace@redhat.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 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.