Date: Monday, January 23, 2012 @ 08:30:56 Author: pierre Revision: 147149
Use the patch that was actually meant for the 3.0 series Modified: linux-lts/trunk/CVE-2012-0056.patch linux-lts/trunk/PKGBUILD ---------------------+ CVE-2012-0056.patch | 41 +++++++++++++++++++++-------------------- PKGBUILD | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) Modified: CVE-2012-0056.patch =================================================================== --- CVE-2012-0056.patch 2012-01-23 13:13:39 UTC (rev 147148) +++ CVE-2012-0056.patch 2012-01-23 13:30:56 UTC (rev 147149) @@ -1,12 +1,16 @@ From e268337dfe26dfc7efd422a804dbb27977a3cccc Mon Sep 17 00:00:00 2001 From: Linus Torvalds <[email protected]> Date: Tue, 17 Jan 2012 15:21:19 -0800 -Subject: [PATCH] proc: clean up and fix /proc/<pid>/mem handling +Subject: proc: clean up and fix /proc/<pid>/mem handling MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 +Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Jüri Aedla reported that the /proc/<pid>/mem handling really isn't very +From: Linus Torvalds <[email protected]> + +commit e268337dfe26dfc7efd422a804dbb27977a3cccc upstream. + +Jüri Aedla reported that the /proc/<pid>/mem handling really isn't very robust, and it also doesn't match the permission checking of any of the other related files. @@ -25,18 +29,18 @@ actually usefully access the fd across a VM change simply because all the offsets for IO would have changed too. -Reported-by: Jüri Aedla <[email protected]> +Reported-by: Jüri Aedla <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> +Signed-off-by: Greg Kroah-Hartman <[email protected]> + --- - fs/proc/base.c | 145 +++++++++++++++----------------------------------------- - 1 files changed, 39 insertions(+), 106 deletions(-) + fs/proc/base.c | 145 +++++++++++++++------------------------------------------ + 1 file changed, 39 insertions(+), 106 deletions(-) -diff --git a/fs/proc/base.c b/fs/proc/base.c -index 5485a53..662ddf2 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c -@@ -198,65 +198,7 @@ static int proc_root_link(struct dentry *dentry, struct path *path) +@@ -194,65 +194,7 @@ static int proc_root_link(struct inode * return result; } @@ -62,7 +66,7 @@ - if (task_is_stopped_or_traced(task)) { - int match; - rcu_read_lock(); -- match = (ptrace_parent(task) == current); +- match = (tracehook_tracer_task(task) == current); - rcu_read_unlock(); - if (match && ptrace_may_access(task, PTRACE_MODE_ATTACH)) - return mm; @@ -103,7 +107,7 @@ { struct mm_struct *mm; int err; -@@ -267,7 +209,7 @@ struct mm_struct *mm_for_maps(struct task_struct *task) +@@ -263,7 +205,7 @@ struct mm_struct *mm_for_maps(struct tas mm = get_task_mm(task); if (mm && mm != current->mm && @@ -112,7 +116,7 @@ mmput(mm); mm = ERR_PTR(-EACCES); } -@@ -276,6 +218,11 @@ struct mm_struct *mm_for_maps(struct task_struct *task) +@@ -272,6 +214,11 @@ struct mm_struct *mm_for_maps(struct tas return mm; } @@ -124,7 +128,7 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer) { int res = 0; -@@ -752,38 +699,39 @@ static const struct file_operations proc_single_file_operations = { +@@ -816,38 +763,39 @@ static const struct file_operations proc static int mem_open(struct inode* inode, struct file* file) { @@ -182,7 +186,7 @@ ret = 0; -@@ -810,13 +758,7 @@ static ssize_t mem_read(struct file * file, char __user * buf, +@@ -874,13 +822,7 @@ static ssize_t mem_read(struct file * fi } *ppos = src; @@ -196,7 +200,7 @@ return ret; } -@@ -825,27 +767,15 @@ static ssize_t mem_write(struct file * file, const char __user *buf, +@@ -889,27 +831,15 @@ static ssize_t mem_write(struct file * f { int copied; char *page; @@ -228,7 +232,7 @@ copied = 0; while (count > 0) { -@@ -869,13 +799,7 @@ static ssize_t mem_write(struct file * file, const char __user *buf, +@@ -933,13 +863,7 @@ static ssize_t mem_write(struct file * f } *ppos = dst; @@ -242,7 +246,7 @@ return copied; } -@@ -895,11 +819,20 @@ loff_t mem_lseek(struct file *file, loff_t offset, int orig) +@@ -959,11 +883,20 @@ loff_t mem_lseek(struct file *file, loff return file->f_pos; } @@ -263,6 +267,3 @@ }; static ssize_t environ_read(struct file *file, char __user *buf, --- -1.7.6.5 - Modified: PKGBUILD =================================================================== --- PKGBUILD 2012-01-23 13:13:39 UTC (rev 147148) +++ PKGBUILD 2012-01-23 13:30:56 UTC (rev 147149) @@ -30,7 +30,7 @@ '21a33df5fba2da2f56e447fb171f02c0' '9d3c56a4b999c8bfbd4018089a62f662' '263725f20c0b9eb9c353040792d644e5' - 'a050d76e56d2ce0715c8ff663ae7f436') + '31bf249684838cbe024419da94ed5111') build() { cd "${srcdir}/linux-${_basekernel}"
