All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: selinux@vger.kernel.org
Subject: Re: [PATCH v2 1/5] selinux: zero-initialize permission name array in masked av dump
Date: Mon, 09 Nov 2026 15:42:38 +0000	[thread overview]
Message-ID: <sashiko-outbox-205168@kernel.org> (raw)
In-Reply-To: <20261109153802.76176-5-cgoettsche@seltendoof.de>

> From: Christian Göttsche <cgzones@googlemail.com>
> 
> security_dump_masked_av() declares an on-stack array
> 
> 	char *permission_names[SEL_VEC_MAX];
> 
> and only fills the entries that correspond to permissions actually
> defined for the target class (and its common) via hashtab_map() and
> dump_masked_av_helper().  It then walks the set bits of the masked
> access vector and logs, for each bit, permission_names[index] or the
> "????" fallback when the slot is NULL.
> 
> The array is never initialized, so any set bit whose index has no
> defined permission for the class reads an uninitialized stack pointer,
> which is then passed to audit_log_format("%s").
> 
> Zero-initialize the array so undefined slots are NULL and are reported
> as "????", exactly as the existing fallback intends.  Rejecting such AV
> rules at load time is deliberately not done here: it would break
> policies that older toolchains legitimately produced.
> 
> Fixes: 44c2d9bdd702 ("Add audit messages on type boundary violations")
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261109153802.76176-5-cgoettsche@seltendoof.de?part=1


  reply	other threads:[~2026-11-09 15:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 15:37 [PATCH v2 2/5] selinux: restore the context string on -ESTALE retry Christian Göttsche
2026-11-09 15:37 ` [PATCH v2 3/5] selinux: prevent stale AVC insertions after policy changes Christian Göttsche
2026-11-09 15:46   ` sashiko-bot
2026-11-09 15:38 ` [PATCH v2 4/5] selinux: keep pending boolean values across policy loads Christian Göttsche
2026-11-09 15:44   ` sashiko-bot
2026-11-09 15:38 ` [PATCH v2 5/5] selinux: do not cache permissive grants after enabling enforcing mode Christian Göttsche
2026-11-09 15:46   ` sashiko-bot
2026-11-09 15:38 ` [PATCH v2 1/5] selinux: zero-initialize permission name array in masked av dump Christian Göttsche
2026-11-09 15:42   ` sashiko-bot [this message]
2026-11-09 17:53   ` Stephen Smalley
2026-11-09 15:43 ` [PATCH v2 2/5] selinux: restore the context string on -ESTALE retry sashiko-bot

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=sashiko-outbox-205168@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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 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.