* Re: [PATCH] Security: Fix return value of avc_has_perm_noaudit() in security/selinux/avc.c
2010-03-10 20:53 [PATCH] Security: Fix return value of avc_has_perm_noaudit() in security/selinux/avc.c wzt.wzt
@ 2010-03-10 12:57 ` Stephen Smalley
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2010-03-10 12:57 UTC (permalink / raw)
To: wzt.wzt; +Cc: linux-kernel, linux-security-module, jmorris
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Security: Fix return value of avc_has_perm_noaudit() in security/selinux/avc.c
@ 2010-03-10 20:53 wzt.wzt
2010-03-10 12:57 ` Stephen Smalley
0 siblings, 1 reply; 2+ messages in thread
From: wzt.wzt @ 2010-03-10 20:53 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-security-module, sds, jmorris
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>
---
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;
--
1.6.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-10 12:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10 20:53 [PATCH] Security: Fix return value of avc_has_perm_noaudit() in security/selinux/avc.c wzt.wzt
2010-03-10 12:57 ` Stephen Smalley
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.