lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFJ0LnHbmx+oyAfLJvigebA3rHxtLhdROq=u2FQ+eFHG7t5+wA@mail.gmail.com>
Date:	Thu, 26 Feb 2015 14:08:31 -0800
From:	Nick Kralevich <nnk@...gle.com>
To:	Jeff Vander Stoep <jeffv@...gle.com>
Cc:	Jeffrey Vander Stoep <jvanderstoep@...il.com>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-security-module@...r.kernel.org,
	James Morris <james.l.morris@...cle.com>,
	Stephen Smalley <sds@...ho.nsa.gov>,
	SELinux <selinux@...ho.nsa.gov>
Subject: Re: [PATCH] avc: remove unnecessary pointer reassignment

Acked-By: Nick Kralevich <nnk@...gle.com>

On Thu, Feb 26, 2015 at 1:54 PM, Jeff Vander Stoep <jeffv@...gle.com> wrote:
> Commit f01e1af445fa ("selinux: don't pass in NULL avd to avc_has_perm_noaudit")
> made this pointer reassignment unnecessary. Avd should continue to reference
> the stack-based copy.
>
> Signed-off-by: Jeff Vander Stoep <jeffv@...gle.com>
> ---
>  security/selinux/avc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/security/selinux/avc.c b/security/selinux/avc.c
> index afcc0ae..3c17dda 100644
> --- a/security/selinux/avc.c
> +++ b/security/selinux/avc.c
> @@ -724,12 +724,10 @@ inline int avc_has_perm_noaudit(u32 ssid, u32 tsid,
>         rcu_read_lock();
>
>         node = avc_lookup(ssid, tsid, tclass);
> -       if (unlikely(!node)) {
> +       if (unlikely(!node))
>                 node = avc_compute_av(ssid, tsid, tclass, avd);
> -       } else {
> +       else
>                 memcpy(avd, &node->ae.avd, sizeof(*avd));
> -               avd = &node->ae.avd;
> -       }
>
>         denied = requested & ~(avd->allowed);
>         if (unlikely(denied))
> --
> 2.2.0.rc0.207.ga3a616c
>
> _______________________________________________
> Selinux mailing list
> Selinux@...ho.nsa.gov
> To unsubscribe, send email to Selinux-leave@...ho.nsa.gov.
> To get help, send an email containing "help" to Selinux-request@...ho.nsa.gov.



-- 
Nick Kralevich | Android Security | nnk@...gle.com | 650.214.4037
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ