mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: wzt.wzt@gmail.com
Cc: linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org, jmorris@namei.org
Subject: Re: [PATCH] Security: Fix return value of avc_has_perm_noaudit() in security/selinux/avc.c
Date: Wed, 10 Mar 2010 07:57:25 -0500	[thread overview]
Message-ID: <1268225845.2214.6.camel@moss-pluto.epoch.ncsc.mil> (raw)
In-Reply-To: <20100310205348.GA3419@localhost.localdomain>

On Thu, 2010-03-11 at 04:53 +0800, wzt.wzt@gmail.com wrote:
> avc_has_perm_noaudit() is not check the return value of avc_update_node, avc_update_node() delcared as int.
> 
> Signed-off-by: Zhitong Wang <zhitong.wangzt@alibaba-inc.com>

NAK.  Just cast to void instead.  This is on the permissive code path
and failure to update the node is non-fatal (just means we'll try again
next time) and should not cause the permission to be denied.

> 
> ---
>  security/selinux/avc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/security/selinux/avc.c b/security/selinux/avc.c
> index f2dde26..8bbce96 100644
> --- a/security/selinux/avc.c
> +++ b/security/selinux/avc.c
> @@ -763,7 +763,7 @@ int avc_has_perm_noaudit(u32 ssid, u32 tsid,
>  		if (flags & AVC_STRICT)
>  			rc = -EACCES;
>  		else if (!selinux_enforcing || (avd->flags & AVD_FLAGS_PERMISSIVE))
> -			avc_update_node(AVC_CALLBACK_GRANT, requested, ssid,
> +			rc = avc_update_node(AVC_CALLBACK_GRANT, requested, ssid,
>  					tsid, tclass, avd->seqno);
>  		else
>  			rc = -EACCES;
-- 
Stephen Smalley
National Security Agency


      reply	other threads:[~2010-03-10 12:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 20:53 wzt.wzt
2010-03-10 12:57 ` Stephen Smalley [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=1268225845.2214.6.camel@moss-pluto.epoch.ncsc.mil \
    --to=sds@tycho.nsa.gov \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=wzt.wzt@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

all inboxes | Powered by JetHome®