linux/arch
Jan Beulich 936d087113 x86/mm/xen: Suppress hugetlbfs in PV guests
[ Upstream commit 103f6112f2 ]

Huge pages are not normally available to PV guests. Not suppressing
hugetlbfs use results in an endless loop of page faults when user mode
code tries to access a hugetlbfs mapped area (since the hypervisor
denies such PTEs to be created, but error indications can't be
propagated out of xen_set_pte_at(), just like for various of its
siblings), and - once killed in an oops like this:

  kernel BUG at .../fs/hugetlbfs/inode.c:428!
  invalid opcode: 0000 [#1] SMP
  ...
  RIP: e030:[<ffffffff811c333b>]  [<ffffffff811c333b>] remove_inode_hugepages+0x25b/0x320
  ...
  Call Trace:
   [<ffffffff811c3415>] hugetlbfs_evict_inode+0x15/0x40
   [<ffffffff81167b3d>] evict+0xbd/0x1b0
   [<ffffffff8116514a>] __dentry_kill+0x19a/0x1f0
   [<ffffffff81165b0e>] dput+0x1fe/0x220
   [<ffffffff81150535>] __fput+0x155/0x200
   [<ffffffff81079fc0>] task_work_run+0x60/0xa0
   [<ffffffff81063510>] do_exit+0x160/0x400
   [<ffffffff810637eb>] do_group_exit+0x3b/0xa0
   [<ffffffff8106e8bd>] get_signal+0x1ed/0x470
   [<ffffffff8100f854>] do_signal+0x14/0x110
   [<ffffffff810030e9>] prepare_exit_to_usermode+0xe9/0xf0
   [<ffffffff814178a5>] retint_user+0x8/0x13

This is CVE-2016-3961 / XSA-174.

Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Juergen Gross <JGross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: stable@vger.kernel.org
Cc: xen-devel <xen-devel@lists.xenproject.org>
Link: http://lkml.kernel.org/r/57188ED802000078000E431C@prv-mh.provo.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2016-05-10 12:17:33 -04:00
..
alpha alpha: kernel: osf_sys: Set 'kts.tv_nsec' only when 'tv' has effect 2015-05-26 10:01:51 -07:00
arc ARC: Make ARC bitops "safer" (add anti-optimization) 2015-08-10 12:21:57 -07:00
arm ARM: OMAP2+: hwmod: Fix updating of sysconfig register 2016-04-20 01:03:41 -04:00
arm64 arm64: errata: Add -mpc-relative-literal-loads to build flags 2016-04-18 08:51:10 -04:00
avr32 mmc: atmel-mci: restore dma on AVR32 2016-04-18 08:51:01 -04:00
blackfin blackfin: Fix build error 2015-06-10 10:19:24 -07:00
c6x C6X Fixes for v4.1 2015-04-16 18:48:55 -04:00
cris CRIS changes for 4.1 2015-04-26 13:31:05 -07:00
frv Devicetree updates for 4.1: 2015-04-24 08:46:18 -07:00
hexagon Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
ia64 ia64: make cpu_callin_map non-volatile. 2015-06-02 10:07:03 -07:00
m32r m32r: fix m32104ut_defconfig build fail 2016-02-03 16:23:16 -05:00
m68k m68k: Define asmlinkage_protect 2015-10-22 14:43:25 -07:00
metag Metag architecture changes for v4.1 2015-04-24 07:56:50 -07:00
microblaze microblaze: use asm-generic for seccomp.h 2015-04-17 09:04:10 -04:00
mips MIPS: smp.c: Fix uninitialised temp_foreign_map 2016-04-13 17:14:28 -04:00
mn10300 mn10300: Select CONFIG_HAVE_UID16 to fix build failure 2016-01-31 11:23:40 -08:00
nios2 nios2 update for v4.1-rc1 2015-04-24 07:59:07 -07:00
openrisc openrisc: fix CONFIG_UID16 setting 2015-08-03 09:28:58 -07:00
parisc parisc: Unbreak handling exceptions from kernel modules 2016-04-20 01:08:54 -04:00
powerpc powerpc: Update cpu_user_features2 in scan_features() 2016-05-08 08:09:04 -04:00
s390 s390/hugetlb: add hugepages_supported define 2016-05-10 12:17:33 -04:00
score score: Fix exception handler label 2015-06-10 10:19:47 -07:00
sh lib/decompressors: use real out buf size for gunzip with kernel 2015-09-29 19:26:19 +02:00
sparc sparc64: fix incorrect sign extension in sys_sparc64_personality 2016-02-03 16:23:15 -05:00
tile signal: fix information leak in copy_siginfo_from_user32 2015-08-16 20:52:26 -07:00
um fs/coredump: prevent fsuid=0 dumps into user-controlled directories 2016-04-18 08:51:07 -04:00
unicore32 lib/decompressors: use real out buf size for gunzip with kernel 2015-09-29 19:26:19 +02:00
x86 x86/mm/xen: Suppress hugetlbfs in PV guests 2016-05-10 12:17:33 -04:00
xtensa xtensa: clear all DBREAKC registers on start 2016-04-18 08:50:55 -04:00
.gitignore arch: Ignore arch/i386 and arch/x86_64 2008-01-19 21:29:39 -08:00
Kconfig powerpc updates for 4.1 2015-04-16 13:53:32 -05:00