- sys_getppid-oopses-on-debug-kernel.patch removed from -mm tree

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

 



The patch titled

     sys_getppid() oopses on debug kernel

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

     sys_getppid-oopses-on-debug-kernel.patch

This patch was dropped because an updated version was merged

------------------------------------------------------
Subject: sys_getppid() oopses on debug kernel
From: Kirill Korotaev <dev@xxxxx>

sys_getppid() optimization can access a freed memory.  On kernels with
DEBUG_SLAB turned ON, this results in Oops.

Signed-off-by: Kirill Korotaev <dev@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/timer.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff -puN kernel/timer.c~sys_getppid-oopses-on-debug-kernel kernel/timer.c
--- a/kernel/timer.c~sys_getppid-oopses-on-debug-kernel
+++ a/kernel/timer.c
@@ -1342,6 +1342,7 @@ asmlinkage long sys_getpid(void)
 asmlinkage long sys_getppid(void)
 {
 	int pid;
+#ifndef CONFIG_DEBUG_SLAB
 	struct task_struct *me = current;
 	struct task_struct *parent;
 
@@ -1364,6 +1365,16 @@ asmlinkage long sys_getppid(void)
 #endif
 		break;
 	}
+#else
+	/*
+	 * ->real_parent could be released before dereference and
+	 * we accessed freed kernel memory, which faults with debugging on.
+	 * Keep it simple and stupid.
+	 */
+	read_lock(&tasklist_lock);
+	pid = current->group_leader->real_parent->tgid;
+	read_unlock(&tasklist_lock);
+#endif
 	return pid;
 }
 
_

Patches currently in -mm which might be from dev@xxxxx are

sys_getppid-oopses-on-debug-kernel.patch
sys_getppid-oopses-on-debug-kernel-v2.patch
fix-unserialized-task-files-changing.patch
ipc-namespace-utils.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