lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 26 Feb 2010 12:46:30 +0900 From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp> To: jmorris@...ei.org Cc: linux-security-module@...r.kernel.org, viro@....linux.org.uk, linux-kernel@...r.kernel.org, oleg@...hat.com, tglx@...utronix.de, akpm@...ux-foundation.org, eparis@...hat.com Subject: [PATCH] audit: Protect find_task_by_vpid() with RCU. [PATCH] audit: Protect find_task_by_vpid() with RCU. Holding tasklist_lock is no longer sufficient for find_task_by_vpid(). Explicit rcu_read_lock() is required. Signed-off-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp> --- kernel/audit.c | 6 ++++++ 1 file changed, 6 insertions(+) --- linux-2.6.33.orig/kernel/audit.c +++ linux-2.6.33/kernel/audit.c @@ -468,7 +468,9 @@ static int audit_prepare_user_tty(pid_t int err; read_lock(&tasklist_lock); + rcu_read_lock(); tsk = find_task_by_vpid(pid); + rcu_read_unlock(); err = -ESRCH; if (!tsk) goto out; @@ -882,7 +884,9 @@ static int audit_receive_msg(struct sk_b struct task_struct *tsk; read_lock(&tasklist_lock); + rcu_read_lock(); tsk = find_task_by_vpid(pid); + rcu_read_unlock(); if (!tsk) err = -ESRCH; else { @@ -905,7 +909,9 @@ static int audit_receive_msg(struct sk_b if (s->enabled != 0 && s->enabled != 1) return -EINVAL; read_lock(&tasklist_lock); + rcu_read_lock(); tsk = find_task_by_vpid(pid); + rcu_read_unlock(); if (!tsk) err = -ESRCH; else { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists