remarkable-linux/arch/score/kernel
Dan Rosenberg c25a785d66 score: fix off-by-one index into syscall table
If the provided system call number is equal to __NR_syscalls, the
current check will pass and a function pointer just after the system
call table may be called, since sys_call_table is an array with total
size __NR_syscalls.

Whether or not this is a security bug depends on what the compiler puts
immediately after the system call table.  It's likely that this won't do
anything bad because there is an additional NULL check on the syscall
entry, but if there happens to be a non-NULL value immediately after the
system call table, this may result in local privilege escalation.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: <stable@vger.kernel.org>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Eugene Teo <eugeneteo@kernel.sg>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-23 08:38:49 -08:00
..
asm-offsets.c score: Add support for Sunplus S+core architecture 2009-06-19 11:38:47 +02:00
entry.S score: fix off-by-one index into syscall table 2012-01-23 08:38:49 -08:00
head.S score: Add support for Sunplus S+core architecture 2009-06-19 11:38:47 +02:00
init_task.c Use new __init_task_data macro in arch init_task.c files. 2009-09-21 06:27:08 +02:00
irq.c score: Use generic show_interrupts() 2011-03-28 12:03:35 +08:00
Makefile score: add generic sys_call_table 2009-06-19 14:10:33 +02:00
module.c modules: make arch's use default loader hooks 2011-07-24 22:06:04 +09:30
process.c score: add missing #includes 2009-06-27 15:09:46 +02:00
ptrace.c ptrace: cleanup arch_ptrace() on score 2010-10-27 18:03:12 -07:00
setup.c score: Use HAVE_MEMBLOCK_NODE_MAP 2011-12-08 10:22:09 -08:00
signal.c score: remove unused code, add include files in .c 2009-08-30 12:26:32 +08:00
sys_call_table.c score: add generic sys_call_table 2009-06-19 14:10:33 +02:00
sys_score.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
time.c score: fix function prototypes 2009-06-27 15:14:58 +02:00
traps.c score: update files according to review comments 2009-06-19 11:40:13 +02:00
vmlinux.lds.S score: Cleanup linker script using new macros. 2009-09-23 13:41:15 +08:00