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-next>] [day] [month] [year] [list]
Message-Id: <e9c3ce47faaef896a30df16e72a9861ee59069dc.1498524386.git.daniel@iogearbox.net>
Date:   Tue, 27 Jun 2017 02:48:36 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     netdev@...r.kernel.org
Cc:     Daniel Borkmann <daniel@...earbox.net>
Subject: [PATCH iproute2] bpf: indicate lderr when bpf_apply_relo_data fails

When LLVM wrongly generates a rodata relo entry (llvm BZ #33599),
then just bail out instead of probing for prog w/o reloc, which
will fail in this case anyway.

Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
---
 lib/bpf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bpf.c b/lib/bpf.c
index ae4d97d..6b5a96d 100644
--- a/lib/bpf.c
+++ b/lib/bpf.c
@@ -1795,8 +1795,10 @@ static int bpf_fetch_prog_relo(struct bpf_elf_ctx *ctx, const char *section,
 		*sseen = true;
 
 		ret = bpf_apply_relo_data(ctx, &data_relo, &data_insn);
-		if (ret < 0)
+		if (ret < 0) {
+			*lderr = true;
 			return ret;
+		}
 
 		memset(&prog, 0, sizeof(prog));
 		prog.type    = ctx->type;
-- 
1.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ