[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9a39fe710042c71abb252a38e1ec1bbfbe291e52.camel@gmail.com>
Date: Thu, 25 Jan 2024 15:05:31 +0200
From: Eduard Zingerman <eddyz87@...il.com>
To: Hao Sun <sunhao.th@...il.com>
Cc: bpf@...r.kernel.org, andreimatei1@...il.com, ast@...nel.org,
andrii@...nel.org, daniel@...earbox.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf] bpf: Reject pointer spill with var offset
On Thu, 2024-01-25 at 09:34 +0100, Hao Sun wrote:
[...]
> Testing this case with test_progs/test_verifier is hard because it happens
> when cpu_mitigations_off() is true, but we do not have this setup yet.
> So the mentioned prog is rejected by sanitize_check_bounds() due to ptr
> alu with var_off when adding it to test_progs, and loading as unpriv.
>
> My local test was conducted: (1) booting the kernel with "mitigations=off"
> so that bypass_spec_v1 is true and sanitize_check_bounds() is skipped;
> (2) running the prog without the patch leaks the pointer; (3) loading the
> prog with the patch applied resulting in the expected message.
Thank you for explaining.
I booted VM with "mitigations=off" and tried test as in [1], it passes.
Tested-by: Eduard Zingerman <eddyz87@...il.com>
[1] https://gist.github.com/eddyz87/bb517437767a8f01891cc6e6a847d448
Powered by blists - more mailing lists