lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d154e49-d77e-012a-81df-c1946b669bb4@synopsys.com>
Date:   Thu, 29 Apr 2021 11:39:52 +0000
From:   Shahab Vahedi <Shahab.Vahedi@...opsys.com>
To:     Vineet Gupta <Vineet.Gupta1@...opsys.com>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARC: entry: fix off-by-one error in syscall number
 validation

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
>  
>  	; syscall num shd not exceed the total system calls avail
> -	cmp     r8,  NR_syscalls
> +	cmp     r8,  NR_syscalls - 1
>  	mov.hi  r0, -ENOSYS
>  	bhi     .Lret_from_system_call

Same problem exists in "syscall Tracing" section:

; Do the Sys Call as we normally would.
; Validate the Sys Call number
cmp     r8,  NR_syscalls
mov.hi  r0, -ENOSYS
bhi     tracesys_exit


-- 
Shahab

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ