- selinux-check-for-failed-kmalloc-in-security_sid_to_context.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     selinux: check for failed kmalloc in security_sid_to_context()

has been removed from the -mm tree.  Its filename is

     selinux-check-for-failed-kmalloc-in-security_sid_to_context.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.


From: "Serge E. Hallyn" <serue@xxxxxxxxxx>

Check for NULL kmalloc return value before writing to it.

Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx>
Acked-by: James Morris <jmorris@xxxxxxxxx>
Cc: Stephen Smalley <sds@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 security/selinux/ss/services.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN security/selinux/ss/services.c~selinux-check-for-failed-kmalloc-in-security_sid_to_context security/selinux/ss/services.c
--- devel/security/selinux/ss/services.c~selinux-check-for-failed-kmalloc-in-security_sid_to_context	2006-05-15 09:43:23.000000000 -0700
+++ devel-akpm/security/selinux/ss/services.c	2006-05-15 09:43:23.000000000 -0700
@@ -594,6 +594,10 @@ int security_sid_to_context(u32 sid, cha
 
 			*scontext_len = strlen(initial_sid_to_string[sid]) + 1;
 			scontextp = kmalloc(*scontext_len,GFP_ATOMIC);
+			if (!scontextp) {
+				rc = -ENOMEM;
+				goto out;
+			}
 			strcpy(scontextp, initial_sid_to_string[sid]);
 			*scontext = scontextp;
 			goto out;
_

Patches currently in -mm which might be from serue@xxxxxxxxxx are

origin.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux