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] [day] [month] [year] [list]
Message-Id: <1268225845.2214.6.camel@moss-pluto.epoch.ncsc.mil>
Date:	Wed, 10 Mar 2010 07:57:25 -0500
From:	Stephen Smalley <sds@...ho.nsa.gov>
To:	wzt.wzt@...il.com
Cc:	linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org, jmorris@...ei.org
Subject: Re: [PATCH] Security: Fix return value of avc_has_perm_noaudit()
 in security/selinux/avc.c

On Thu, 2010-03-11 at 04:53 +0800, wzt.wzt@...il.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@...baba-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

--
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