1. 02 2月, 2016 1 次提交
    • J
      MIPS: Fix buffer overflow in syscall_get_arguments() · f4dce1ff
      James Hogan 提交于
      Since commit 4c21b8fd ("MIPS: seccomp: Handle indirect system calls
      (o32)"), syscall_get_arguments() attempts to handle o32 indirect syscall
      arguments by incrementing both the start argument number and the number
      of arguments to fetch. However only the start argument number needs to
      be incremented. The number of arguments does not change, they're just
      shifted up by one, and in fact the output array is provided by the
      caller and is likely only n entries long, so reading more arguments
      overflows the output buffer.
      
      In the case of seccomp, this results in it fetching 7 arguments starting
      at the 2nd one, which overflows the unsigned long args[6] in
      populate_seccomp_data(). This clobbers the $s0 register from
      syscall_trace_enter() which __seccomp_phase1_filter() saved onto the
      stack, into which syscall_trace_enter() had placed its syscall number
      argument. This caused Chromium to crash.
      
      Credit goes to Milko for tracking it down as far as $s0 being clobbered.
      
      Fixes: 4c21b8fd ("MIPS: seccomp: Handle indirect system calls (o32)")
      Reported-by: NMilko Leporis <milko.leporis@imgtec.com>
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: <stable@vger.kernel.org> # 3.15-
      Patchwork: https://patchwork.linux-mips.org/patch/12213/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f4dce1ff
  2. 04 2月, 2015 1 次提交
  3. 24 9月, 2014 1 次提交
    • E
      ARCH: AUDIT: implement syscall_get_arch for all arches · ce5d1128
      Eric Paris 提交于
      For all arches which support audit implement syscall_get_arch()
      They are all pretty easy and straight forward, stolen from how the call
      to audit_syscall_entry() determines the arch.
      Based-on-patch-by: NRichard Briggs <rgb@redhat.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Cc: linux-ia64@vger.kernel.org
      Cc: microblaze-uclinux@itee.uq.edu.au
      Cc: linux-mips@linux-mips.org
      Cc: linux@lists.openrisc.net
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: sparclinux@vger.kernel.org
      ce5d1128
  4. 26 8月, 2014 1 次提交
  5. 20 8月, 2014 1 次提交
  6. 14 5月, 2014 1 次提交
  7. 27 3月, 2014 3 次提交
  8. 20 3月, 2014 2 次提交
    • E
      audit: use uapi/linux/audit.h for AUDIT_ARCH declarations · 579ec9e1
      Eric Paris 提交于
      The syscall.h headers were including linux/audit.h but really only
      needed the uapi/linux/audit.h to get the requisite defines.  Switch to
      the uapi headers.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-s390@vger.kernel.org
      Cc: x86@kernel.org
      579ec9e1
    • E
      syscall_get_arch: remove useless function arguments · 5e937a9a
      Eric Paris 提交于
      Every caller of syscall_get_arch() uses current for the task and no
      implementors of the function need args.  So just get rid of both of
      those things.  Admittedly, since these are inline functions we aren't
      wasting stack space, but it just makes the prototypes better.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-mips@linux-mips.org
      Cc: linux390@de.ibm.com
      Cc: x86@kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-s390@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      5e937a9a
  9. 17 3月, 2014 2 次提交
  10. 07 3月, 2014 1 次提交
    • R
      MIPS: Fix randconfig build error. · f5179287
      Ralf Baechle 提交于
        CC      arch/mips/kernel/ptrace.o
      In file included from arch/mips/kernel/ptrace.c:42:0:
      arch/mips/kernel/ptrace.c: In function ‘mips_get_syscall_arg’:
      /home/ralf/src/linux/linux-mips/arch/mips/include/asm/syscall.h:60:1: error: control reaches end of non-void function [-Werror=return-type]
      cc1: all warnings being treated as errors
      make[2]: *** [arch/mips/kernel/ptrace.o] Error 1
      make[1]: *** [arch/mips/kernel] Error 2
      make: *** [arch/mips] Error 2
      
      Fixed by marking the end of mips_get_syscall_arg() as unreachable.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f5179287
  11. 23 1月, 2014 1 次提交
  12. 30 10月, 2013 4 次提交