forked from luck/tmp_suning_uos_patched
af9e5364c6
commit 3433adc8bd09fc9f29b8baddf33b4ecd1ecd2cdc upstream. We have NR_syscall syscalls from [0 .. NR_syscall-1]. However the check for invalid syscall number is "> NR_syscall" as opposed to >=. This off-by-one error erronesously allows "NR_syscall" to be treated as valid syscall causeing out-of-bounds access into syscall-call table ensuing a crash (holes within syscall table have a invalid-entry handler but this is beyond the array implementing the table). This problem showed up on v5.6 kernel when testing glibc 2.33 (v5.10 kernel capable, includng faccessat2 syscall 439). The v5.6 kernel has NR_syscalls=439 (0 to 438). Due to the bug, 439 passed by glibc was not handled as -ENOSYS but processed leading to a crash. Link: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/48 Reported-by: Shahab Vahedi <shahab@synopsys.com> Cc: <stable@vger.kernel.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
.gitignore | ||
arc_hostlink.c | ||
arcksyms.c | ||
asm-offsets.c | ||
ctx_sw_asm.S | ||
ctx_sw.c | ||
devtree.c | ||
disasm.c | ||
entry-arcv2.S | ||
entry-compact.S | ||
entry.S | ||
fpu.c | ||
head.S | ||
intc-arcv2.c | ||
intc-compact.c | ||
irq.c | ||
jump_label.c | ||
kgdb.c | ||
kprobes.c | ||
Makefile | ||
mcip.c | ||
module.c | ||
perf_event.c | ||
process.c | ||
ptrace.c | ||
reset.c | ||
setup.c | ||
signal.c | ||
smp.c | ||
stacktrace.c | ||
sys.c | ||
traps.c | ||
troubleshoot.c | ||
unaligned.c | ||
unwind.c | ||
vmlinux.lds.S |