From 55dffb71b385c1484ed613087049b9c12d0dabbb Mon Sep 17 00:00:00 2001 From: dann frazier Date: Fri, 30 Apr 2010 06:58:07 +0000 Subject: [PATCH] [powerpc] KGDB: don't needlessly skip PAGE_USER test for Fsl booke Note: KGDB is not currently enabled in debian builds (CVE-2010-1446) svn path=/dists/sid/linux-2.6/; revision=15591 --- debian/changelog | 2 + ...ly-skip-PAGE_USER-test-for-Fsl-booke.patch | 42 +++++++++++++++++++ debian/patches/series/12 | 1 + 3 files changed, 45 insertions(+) create mode 100644 debian/patches/bugfix/powerpc/kgdb-dont-needlessly-skip-PAGE_USER-test-for-Fsl-booke.patch diff --git a/debian/changelog b/debian/changelog index 3f91ecc26..947f0f0a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -66,6 +66,8 @@ linux-2.6 (2.6.32-12) UNRELEASED; urgency=low errors (CVE-2010-1173) * [CIFS] Allow null nd (as nfs server uses) on create (CVE-2010-1148) * tipc: Fix oops on send prior to entering networked mode (CVE-2010-1187) + * [powerpc] KGDB: don't needlessly skip PAGE_USER test for Fsl booke + Note: KGDB is not currently enabled in debian builds (CVE-2010-1446) [ Aurelien Jarno ] * [sh4] Add a sh7751r flavour. diff --git a/debian/patches/bugfix/powerpc/kgdb-dont-needlessly-skip-PAGE_USER-test-for-Fsl-booke.patch b/debian/patches/bugfix/powerpc/kgdb-dont-needlessly-skip-PAGE_USER-test-for-Fsl-booke.patch new file mode 100644 index 000000000..a4c1ce058 --- /dev/null +++ b/debian/patches/bugfix/powerpc/kgdb-dont-needlessly-skip-PAGE_USER-test-for-Fsl-booke.patch @@ -0,0 +1,42 @@ +commit 56151e753468e34aeb322af4b0309ab727c97d2e +Author: Wufei +Date: Wed Apr 28 17:42:32 2010 -0400 + + kgdb: don't needlessly skip PAGE_USER test for Fsl booke + + The bypassing of this test is a leftover from 2.4 vintage + kernels, and is no longer appropriate, or even used by KGDB. + Currently KGDB uses probe_kernel_write() for all access to + memory via the KGDB core, so it can simply be deleted. + + This fixes CVE-2010-1446. + + CC: Benjamin Herrenschmidt + CC: Paul Mackerras + CC: Kumar Gala + Signed-off-by: Wufei + Signed-off-by: Jason Wessel + + +Adjusted to apply to Debian's 2.6.32 by dann frazier + + +diff -urpN a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c +--- a/arch/powerpc/mm/fsl_booke_mmu.c 2009-12-02 20:51:21.000000000 -0700 ++++ b/arch/powerpc/mm/fsl_booke_mmu.c 2010-04-30 00:49:04.000000000 -0600 +@@ -131,15 +131,10 @@ void settlbcam(int index, unsigned long + TLBCAM[index].MAS3 = (phys & PAGE_MASK) | MAS3_SX | MAS3_SR; + TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_SW : 0); + +-#ifndef CONFIG_KGDB /* want user access for breakpoints */ + if (flags & _PAGE_USER) { + TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR; + TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0); + } +-#else +- TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR; +- TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0); +-#endif + + tlbcam_addrs[index].start = virt; + tlbcam_addrs[index].limit = virt + size - 1; diff --git a/debian/patches/series/12 b/debian/patches/series/12 index 8672b5670..1f02bcf6a 100644 --- a/debian/patches/series/12 +++ b/debian/patches/series/12 @@ -62,3 +62,4 @@ + bugfix/all/sctp-fix-skb_over_panic-resulting-from-multiple-invalid-parameter-errors.patch + bugfix/all/cifs-allow-null-nd-on-create.patch + bugfix/all/tipc-fix-oops-on-send-prior-to-entering-networked-mode.patch ++ bugfix/powerpc/kgdb-dont-needlessly-skip-PAGE_USER-test-for-Fsl-booke.patch