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: <13fc0801bf4fd8e561cb35773a4c5f3f22d9d51f.camel@gmail.com>
Date: Thu, 01 May 2025 10:45:39 -0700
From: Eduard Zingerman <eddyz87@...il.com>
To: Luis Gerhorst <luis.gerhorst@....de>, Alexei Starovoitov
 <ast@...nel.org>,  Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko
 <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,  Song Liu
 <song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>, John Fastabend	
 <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>, Stanislav
 Fomichev	 <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa
 <jolsa@...nel.org>,  Puranjay Mohan <puranjay@...nel.org>, Xu Kuohai
 <xukuohai@...weicloud.com>, Catalin Marinas	 <catalin.marinas@....com>,
 Will Deacon <will@...nel.org>, Hari Bathini	 <hbathini@...ux.ibm.com>,
 Christophe Leroy <christophe.leroy@...roup.eu>,  Naveen N Rao
 <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>, Michael
 Ellerman	 <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>, Mykola
 Lysenko	 <mykolal@...com>, Shuah Khan <shuah@...nel.org>, Henriette Herzog	
 <henriette.herzog@....de>, Saket Kumar Bhaskar <skb99@...ux.ibm.com>, 
 Cupertino Miranda <cupertino.miranda@...cle.com>, Jiayuan Chen
 <mrpre@....com>, Matan Shachnai <m.shachnai@...il.com>,  Dimitar Kanaliev
 <dimitar.kanaliev@...eground.com>, Shung-Hsi Yu <shung-hsi.yu@...e.com>,
 Daniel Xu <dxu@...uu.xyz>, 	bpf@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, 	linux-kernel@...r.kernel.org,
 linuxppc-dev@...ts.ozlabs.org, 	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 01/11] selftests/bpf: Fix caps for
 __xlated/jited_unpriv

On Thu, 2025-05-01 at 09:35 +0200, Luis Gerhorst wrote:
> Currently, __xlated_unpriv and __jited_unpriv do not work because the
> BPF syscall will overwrite info.jited_prog_len and info.xlated_prog_len
> with 0 if the process is not bpf_capable(). This bug was not noticed
> before, because there is no test that actually uses
> __xlated_unpriv/__jited_unpriv.
> 
> To resolve this, simply restore the capabilities earlier (but still
> after loading the program). Adding this here unconditionally is fine
> because the function first checks that the capabilities were initialized
> before attempting to restore them.
> 
> This will be important later when we add tests that check whether a
> speculation barrier was inserted in the correct location.
> 
> Signed-off-by: Luis Gerhorst <luis.gerhorst@....de>
> Fixes: 9c9f73391310 ("selftests/bpf: allow checking xlated programs in verifier_* tests")
> Fixes: 7d743e4c759c ("selftests/bpf: __jited test tag to check disassembly after jit")
> ---

My bad, thank you for fixing this omission.

Tested-by: Eduard Zingerman <eddyz87@...il.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ