2006-09-19 13:47:39

by James Morris

[permalink] [raw]
Subject: [PATCH] SELinux: Fix bug in security_sid_mls_copy

From: Venkat Yekkirala <[email protected]>

The following fixes a bug where random mem is being tampered with in the
non-mls case; encountered by Jashua Brindle on a gentoo box.

Please apply.

Signed-off-by: Venkat Yekkirala <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
Signed-off-by: James Morris <[email protected]>

---

security/selinux/ss/services.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 27ee28c..7eb69a6 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1841,7 +1841,7 @@ int security_sid_mls_copy(u32 sid, u32 m
u32 len;
int rc = 0;

- if (!ss_initialized) {
+ if (!ss_initialized || !selinux_mls_enabled) {
*new_sid = sid;
goto out;
}


2006-09-19 14:03:33

by James Morris

[permalink] [raw]
Subject: Re: [PATCH] SELinux: Fix bug in security_sid_mls_copy

On Tue, 19 Sep 2006, James Morris wrote:

> From: Venkat Yekkirala <[email protected]>
>
> The following fixes a bug where random mem is being tampered with in the
> non-mls case; encountered by Jashua Brindle on a gentoo box.
>
> Please apply.

Actually, don't. It's for the net-2.6.19 tree.


--
James Morris
<[email protected]>

2006-09-19 17:25:09

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] SELinux: Fix bug in security_sid_mls_copy

From: James Morris <[email protected]>
Date: Tue, 19 Sep 2006 10:03:30 -0400 (EDT)

> On Tue, 19 Sep 2006, James Morris wrote:
>
> > From: Venkat Yekkirala <[email protected]>
> >
> > The following fixes a bug where random mem is being tampered with in the
> > non-mls case; encountered by Jashua Brindle on a gentoo box.
> >
> > Please apply.
>
> Actually, don't. It's for the net-2.6.19 tree.

Applied to net-2.6.19, thanks.