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>] [day] [month] [year] [list]
Message-ID: <tencent_44BC4B6295D557A6D10D444A032D219CAC07@qq.com>
Date: Fri,  6 Dec 2024 09:58:17 +0800
From: Rong Tao <rtoax@...mail.com>
To: andrii.nakryiko@...il.com,
	qmo@...nel.org,
	ast@...nel.org,
	daniel@...earbox.net,
	andrii@...nel.org,
	rongtao@...tc.cn
Cc: Martin KaFai Lau <martin.lau@...ux.dev>,
	Eduard Zingerman <eddyz87@...il.com>,
	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>,
	bpf@...r.kernel.org (open list:BPF [TOOLING] (bpftool)),
	linux-kernel@...r.kernel.org (open list)
Subject: [PATCH bpf-next v4 0/2] libbpf: Fix bpftool gen object segfault

From: Rong Tao <rongtao@...tc.cn>

When the target file is used as input and output at the same time, the
input file will read a null value, resulting in a segmentation fault.

Add judgment conditions in bpftool and libbpf to prevent segmentation
error.

ChangeLog v2 -> v3:
  - argc_cpy and argv_cpy need to be initialised _after_ the call to
    GET_ARG()

ChangeLog v1 -> v2:
  - Compare each output file.

v4: This patchset, double check and fix in libbpf.
v3: https://lore.kernel.org/lkml/tencent_A7A870BF168D6A21BA193408D5645D5D920A@qq.com/
v2: https://lore.kernel.org/lkml/tencent_F62A51AFF6A38188D70664421F5934974008@qq.com/
v1: https://lore.kernel.org/lkml/tencent_410B8166C55CD2AB64BDEA8E92204619180A@qq.com/

Rong Tao (2):
  bpftool: Fix gen object segfault
  libbpf: linker: Avoid using object file as both input and output

 tools/bpf/bpftool/gen.c | 13 +++++++++++++
 tools/lib/bpf/linker.c  |  5 +++++
 2 files changed, 18 insertions(+)

-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ