kernel-ark/security/integrity/ima
Eric Paris 53a7197aff IMA: iint put in ima_counts_get and put
ima_counts_get() calls ima_iint_find_insert_get() which takes a reference
to the iint in question, but does not put that reference at the end of the
function.  This can lead to a nasty memory leak.  Easy enough to reproduce:

#include <sys/mman.h>
#include <stdio.h>

int main (void)
{
	int i;
	void *ptr;

	for (i=0; i < 100000; i++) {
		ptr = mmap(NULL, 4096, PROT_READ|PROT_WRITE,
			   MAP_SHARED|MAP_ANONYMOUS, -1, 0);
		if (ptr == MAP_FAILED)
			return 2;
		munmap(ptr, 4096);
	}

	return 0;
}

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
2009-08-27 11:01:03 +10:00
..
ima_api.c integrity: audit update 2009-02-12 09:40:14 +11:00
ima_audit.c IMA: use current_cred() instead of current->cred 2009-05-12 11:06:01 +10:00
ima_crypto.c IMA: Add __init notation to ima functions 2009-05-22 09:34:21 +10:00
ima_fs.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 2009-06-11 10:01:41 -07:00
ima_iint.c IMA: Add __init notation to ima functions 2009-05-22 09:34:21 +10:00
ima_init.c IMA: Add __init notation to ima functions 2009-05-22 09:34:21 +10:00
ima_main.c IMA: iint put in ima_counts_get and put 2009-08-27 11:01:03 +10:00
ima_policy.c IMA: Add __init notation to ima functions 2009-05-22 09:34:21 +10:00
ima_queue.c integrity: ima audit hash_exists fix 2009-06-29 08:57:49 +10:00
ima.h integrity: audit update 2009-02-12 09:40:14 +11:00
Kconfig ima: fix build error 2009-02-13 09:27:56 +11:00
Makefile