SELinux Archive mirror
 help / color / mirror / Atom feed
From: Ronald Monthero <debug.penguin32@gmail.com>
To: Paul Moore <paul@paul-moore.com>
Cc: selinux@vger.kernel.org, stephen.smalley.work@gmail.com,
	 cgzones@googlemail.com, omosnace@redhat.com
Subject: Re: [PATCH] selinux: Use kfree_sensitive for certain code paths of security
Date: Thu, 8 Feb 2024 08:10:48 +1000	[thread overview]
Message-ID: <CALk6Uxr+WY9ioCtBGvfAZyzSwmYPbcerVaXGa43Z7eTdfn77Cw@mail.gmail.com> (raw)
In-Reply-To: <CAHC9VhSsyOpZuHwT1ZZz3h=kWYXnWoCGfy_pLwEktXAfswkRAQ@mail.gmail.com>

Thanks Paul and Casey for taking the time to review. I'll let that be,
as it may not be needed until further particularity.

BR,
ronald

On Tue, Jan 30, 2024 at 7:58 AM Paul Moore <paul@paul-moore.com> wrote:
>
> On Sun, Jan 28, 2024 at 5:02 AM Ronald Monthero
> <debug.penguin32@gmail.com> wrote:
> >
> > As with kfree_sensitive() it does kfree() and memzero_explicit()
> > internally to clear sensitive data. The patch includes some of
> > the code paths to free data such as keys, hash table and
> > scontext and tcontext of selinux, which would benefit
> > from kfree_sensitive() to replace kfree()
> >
> > Signed-off-by: Ronald Monthero <debug.penguin32@gmail.com>
> > ---
> >  security/selinux/avc.c            |  4 ++--
> >  security/selinux/ima.c            |  2 +-
> >  security/selinux/selinuxfs.c      | 16 ++++++++--------
> >  security/selinux/ss/conditional.c |  4 ++--
> >  security/selinux/ss/hashtab.c     |  2 +-
> >  security/selinux/ss/policydb.c    |  6 +++---
> >  6 files changed, 17 insertions(+), 17 deletions(-)
>
> I agree with Casey's comment, I'm not seeing anything in the SELinux
> code that would warrant the use of kfree_sensitive().
>
> --
> paul-moore.com

      reply	other threads:[~2024-02-07 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28 10:00 [PATCH] selinux: Use kfree_sensitive for certain code paths of security Ronald Monthero
2024-01-28 18:05 ` Casey Schaufler
2024-01-29 21:58 ` Paul Moore
2024-02-07 22:10   ` Ronald Monthero [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=CALk6Uxr+WY9ioCtBGvfAZyzSwmYPbcerVaXGa43Z7eTdfn77Cw@mail.gmail.com \
    --to=debug.penguin32@gmail.com \
    --cc=cgzones@googlemail.com \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).