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]
Date: Wed, 21 Feb 2024 13:03:23 +0300
From: Alexander Ofitserov <oficerovas@...linux.org>
To: oficerovas@...linux.org,
	Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	John Fastabend <john.fastabend@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	bpf@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	dutyrok@...linux.org,
	kovalev@...linux.org,
	stable@...r.kernel.org
Subject: [PATCH] bpf: change WARN ro pr_warn in verifier in 5.10 kernels

Change WARN to pr_warn in check_map_prog_compatibility,
because this functionality was added in kernels 6.1 and
because fuzzing kernels with syzkaller while
kernel was started with parameter panic_on_warn
produces false positive crashes.

Signed-off-by: Alexander Ofitserov <oficerovas@...linux.org>
Cc: stable@...r.kernel.org
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 45c50ee9b0370..7a7a6e3087ba2 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -10478,7 +10478,7 @@ static int check_map_prog_compatibility(struct bpf_verifier_env *env,
 			verbose(env, "trace type programs can only use preallocated hash map\n");
 			return -EINVAL;
 		}
-		WARN_ONCE(1, "trace type BPF program uses run-time allocation\n");
+		pr_warn_once("trace type BPF program uses run-time allocation\n");
 		verbose(env, "trace type programs with run-time allocated hash maps are unsafe. Switch to preallocated hash maps.\n");
 	}
 
-- 
2.42.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ