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: <87ea129f-a861-5684-8071-cd3390375d3d@fb.com>
Date:   Mon, 1 Nov 2021 16:03:36 -0700
From:   Yonghong Song <yhs@...com>
To:     Alexei Starovoitov <alexei.starovoitov@...il.com>,
        <davem@...emloft.net>
CC:     <daniel@...earbox.net>, <andrii@...nel.org>,
        <netdev@...r.kernel.org>, <bpf@...r.kernel.org>,
        <kernel-team@...com>
Subject: Re: [PATCH v2 bpf-next 2/3] bpf: Fix propagation of signed bounds
 from 64-bit min/max into 32-bit.



On 11/1/21 3:21 PM, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@...nel.org>
> 
> Similar to unsigned bounds propagation fix signed bounds.
> The 'Fixes' tag is a hint. There is no security bug here.
> The verifier was too conservative.
> 
> Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking")
> Signed-off-by: Alexei Starovoitov <ast@...nel.org>

The change looks good. Should a new test_verifier test be added
to exercise the new change?

> ---
>   kernel/bpf/verifier.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index 29671ed49ee8..a4b48bd4e3ca 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -1420,7 +1420,7 @@ static void __reg_combine_32_into_64(struct bpf_reg_state *reg)
>   
>   static bool __reg64_bound_s32(s64 a)
>   {
> -	return a > S32_MIN && a < S32_MAX;
> +	return a >= S32_MIN && a <= S32_MAX;
>   }
>   
>   static bool __reg64_bound_u32(u64 a)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ