* [PATCH] selinux: Fix send_sigiotask hook
@ 2009-05-04 19:43 Stephen Smalley
2009-05-05 12:47 ` David Howells
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Smalley @ 2009-05-04 19:43 UTC (permalink / raw)
To: James Morris, Eric Paris; +Cc: selinux, David Howells
The CRED patch incorrectly converted the SELinux send_sigiotask hook to
use the current task SID rather than the target task SID in its
permission check, yielding the wrong permission check. This fixes the
hook function. Detected by the ltp selinux testsuite and confirmed to
correct the test failure.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
---
security/selinux/hooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index ba808ef..2fcad7c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3153,7 +3153,7 @@ static int selinux_file_send_sigiotask(struct task_struct *tsk,
struct fown_struct *fown, int signum)
{
struct file *file;
- u32 sid = current_sid();
+ u32 sid = task_sid(tsk);
u32 perm;
struct file_security_struct *fsec;
--
Stephen Smalley
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selinux: Fix send_sigiotask hook
2009-05-04 19:43 [PATCH] selinux: Fix send_sigiotask hook Stephen Smalley
@ 2009-05-05 12:47 ` David Howells
0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2009-05-05 12:47 UTC (permalink / raw)
To: Stephen Smalley; +Cc: dhowells, James Morris, Eric Paris, selinux
Stephen Smalley <sds@tycho.nsa.gov> wrote:
> The CRED patch incorrectly converted the SELinux send_sigiotask hook to
> use the current task SID rather than the target task SID in its
> permission check, yielding the wrong permission check. This fixes the
> hook function. Detected by the ltp selinux testsuite and confirmed to
> correct the test failure.
>
> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: David Howells <dhowells@redhat.com>
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-05 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04 19:43 [PATCH] selinux: Fix send_sigiotask hook Stephen Smalley
2009-05-05 12:47 ` David Howells
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.