Re: [PATCH] ARC: entry: fix off-by-one error in syscall number validation

2021-04-29 Thread Vineet Gupta
On 4/29/21 4:39 AM, Shahab Vahedi wrote: > On 4/23/21 9:52 PM, Vineet Gupta wrote: >> diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S >> index 1743506081da..aea9b558993d 100644 >> --- a/arch/arc/kernel/entry.S >> +++ b/arch/arc/kernel/entry.S >> @@ -255,7 +255,7 @@ ENTRY(EV_Trap) >>

Re: [PATCH] ARC: entry: fix off-by-one error in syscall number validation

2021-04-29 Thread Shahab Vahedi
On 4/23/21 9:52 PM, Vineet Gupta wrote: > diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S > index 1743506081da..aea9b558993d 100644 > --- a/arch/arc/kernel/entry.S > +++ b/arch/arc/kernel/entry.S > @@ -255,7 +255,7 @@ ENTRY(EV_Trap) > ; Normal syscall case > >

[PATCH] ARC: entry: fix off-by-one error in syscall number validation

2021-04-23 Thread Vineet Gupta
We have NR_syscall syscalls from [0 .. NR_syscall-1]. However the check for invalid syscall number is "> NR_syscall". This off-by-one error erronesously allows "NR_syscall" itself as valid and when passed causes out-of-bounds syscall-call table access leading to crash. This problem showed up when