1. 27 Aug, 2009 1 commit
    • Eric Paris's avatar
      IMA: iint put in ima_counts_get and put · 53a7197a
      Eric Paris authored
      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: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      53a7197a
  2. 22 Aug, 2009 4 commits
  3. 21 Aug, 2009 9 commits
  4. 20 Aug, 2009 8 commits
  5. 19 Aug, 2009 14 commits
  6. 18 Aug, 2009 4 commits