1. 10 Jun, 2016 37 commits
  2. 08 Jun, 2016 3 commits
    • Kamal Mostafa's avatar
      UBUNTU: Ubuntu-4.4.0-24.43 · dcb49b6b
      Kamal Mostafa authored
      Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
      dcb49b6b
    • Jann Horn's avatar
      UBUNTU: SAUCE: sched: panic on corrupted stack end · 40fafb87
      Jann Horn authored
      BugLink: http://bugs.launchpad.net/bugs/1588871
      
      Until now, hitting this BUG_ON caused a recursive oops (because oops
      handling involves do_exit(), which calls into the scheduler, which in
      turn raises an oops), which caused stuff below the stack to be
      overwritten until a panic happened (e.g. via an oops in interrupt context,
      caused by the overwritten CPU index in the thread_info).
      
      Just panic directly.
      Signed-off-by: default avatarJann Horn <jannh@google.com>
      CVE-2016-1583
      Acked-by: default avatarTyler Hicks <tyhicks@canonical.com>
      Acked-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      40fafb87
    • Jann Horn's avatar
      UBUNTU: SAUCE: ecryptfs: forbid opening files without mmap handler · 51982ff9
      Jann Horn authored
      BugLink: http://bugs.launchpad.net/bugs/1588871
      
      This prevents users from triggering an exploitable stack overflow
      through a recursive invocation of pagefault handling on systems that
      allow unprivileged users to mount ecryptfs. More precisely:
      
      When a file in ecryptfs is mmap()ed, ecryptfs only uses the VFS read
      and write methods of the lower filesystem (using kernel_read() and
      kernel_write()) to interact with the lower file. This means that
      it is possible to mmap() the decrypted view of a lower file that
      normally couldn't be mmap()ed.
      
      One such file is /proc/$pid/environ. If an encrypted ecryptfs file
      is placed in the environment area of a process with PID $pid and
      /proc/$pid is mounted to /tmp/foo, /tmp/foo/environ can then be
      opened and mmap()ed. A pagefault in the memory area to which
      /tmp/foo/environ is mapped will cause a kernel_read() on
      /proc/$pid/environ, which in turn will cause a pagefault in the
      context of the process with PID $pid.
      
      By using a chain of processes in which each process has the
      decrypted view of the next process' environment mapped into its
      environment area, where the environment of the last process in the
      chain is an "ecryptfs matroska" (the result of encrypting some data
      using ecryptfs, then encrypting the result of that and so on), and
      then triggering a pagefault in the environment of the first process
      in the chain, it is possible to cause a recursive pagefault that
      ends up overflowing the stack.
      
      Fix it by disallowing opening anything without an mmap handler
      through ecryptfs.
      
      CVE-2016-1583
      Signed-off-by: default avatarJann Horn <jannh@google.com>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarTyler Hicks <tyhicks@canonical.com>
      Acked-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      51982ff9