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: <4e303892-5bee-76ca-a5c9-05cd53ffb945@fb.com>
Date:   Tue, 15 Feb 2022 07:50:27 -0800
From:   Yonghong Song <yhs@...com>
To:     Hou Tao <houtao1@...wei.com>, Alexei Starovoitov <ast@...nel.org>
CC:     Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Song Liu <songliubraving@...com>,
        KP Singh <kpsingh@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        <netdev@...r.kernel.org>, <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next v4] bpf: reject kfunc calls that overflow
 insn->imm



On 2/14/22 10:57 PM, Hou Tao wrote:
> Now kfunc call uses s32 to represent the offset between the address of
> kfunc and __bpf_call_base, but it doesn't check whether or not s32 will
> be overflowed. The overflow is possible when kfunc is in module and the
> offset between module and kernel is greater than 2GB. Take arm64 as an
> example, before commit b2eed9b58811 ("arm64/kernel: kaslr: reduce module
> randomization range to 2 GB"), the offset between module symbol and
> __bpf_call_base will in 4GB range due to KASLR and may overflow s32.
> 
> So add an extra checking to reject these invalid kfunc calls.
> 
> Signed-off-by: Hou Tao <houtao1@...wei.com>

Acked-by: Yonghong Song <yhs@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ