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] [day] [month] [year] [list]
Message-ID: <3ec9783f-0331-41bb-9f02-6d35cb25e197@iogearbox.net>
Date: Wed, 18 Dec 2024 13:22:37 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Andrea Righi <arighi@...dia.com>, Alexei Starovoitov <ast@...nel.org>
Cc: John Fastabend <john.fastabend@...il.com>,
 Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau
 <martin.lau@...ux.dev>, Eduard Zingerman <eddyz87@...il.com>,
 Song Liu <song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>,
 KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
 Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
 bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
 Andrii Nakryiko <andrii.nakryiko@...il.com>
Subject: Re: [PATCH v2] bpf: Fix bpf_get_smp_processor_id() on !CONFIG_SMP

On 12/17/24 8:58 PM, Andrea Righi wrote:
> On x86-64 calling bpf_get_smp_processor_id() in a kernel with CONFIG_SMP
> disabled can trigger the following bug, as pcpu_hot is unavailable:
> 
>   [    8.471774] BUG: unable to handle page fault for address: 00000000936a290c
>   [    8.471849] #PF: supervisor read access in kernel mode
>   [    8.471881] #PF: error_code(0x0000) - not-present page
> 
> Fix by inlining a return 0 in the !CONFIG_SMP case.
> 
> Fixes: 1ae6921009e5 ("bpf: inline bpf_get_smp_processor_id() helper")
> Cc: Daniel Borkmann <daniel@...earbox.net>
> Cc: Andrii Nakryiko <andrii.nakryiko@...il.com>
> Signed-off-by: Andrea Righi <arighi@...dia.com>

Acked-by: Daniel Borkmann <daniel@...earbox.net>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ