Skip to contentSkip to conversation

memory leak on SE Linux

DISCUSSION Russell Coker 1 participant 1 message Jul 14, 2003 SELinux security module

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have just done a diff between the LSM patch in my kernel-patch-2.4-lsm Debian package and the latest release. It seems that when merging patches or porting between kernel versions I made an error and caused the pointer to some allocated memory to be cleared incorrectly (thus making it impossible to free the memory).

I am still performing tests on the new kernel, but the results so far suggest that the kernel memory leak I had previously experienced is now solved.

I recall that some other people reported similar problems, if they were using my kernel patch for 2.4.21 then it would be the same thing. If someone is experiencing a kernel memory leak when using a kernel patch from the NSA site then it would be a different issue and should be raised again.

NB my web site and the Debian repository now both contain a good patch for 2.4.21 which solves this problem.

Below is the patch fragment in question.

diff -ruN linux-2.4.21-mine/fs/inode.c linux-2.4.21-nsa/fs/inode.c
- --- linux-2.4.21-mine/fs/inode.c 2003-07-13 12:23:29.000000000 +1000
+++ linux-2.4.21-nsa/fs/inode.c 2003-07-13 12:20:16.000000000 +1000 @@ -125,7 +125,6 @@

                mapping->host = inode;
                mapping->gfp_mask = GFP_HIGHUSER;
                inode->i_mapping = mapping;
- -               inode->i_security = NULL;
        }
        return inode;

}

- --

http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/EqBcwrB5/PXHUlYRAqQQAJ490tCtszUr2Ingm0x9UGgi7im2zwCcDAbs 7WUAkyx/JbdJE5rNqs1QB2k=
=i6yZ
-----END PGP SIGNATURE-----

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.