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]
Date:	Wed, 12 Aug 2015 15:49:36 +0200
From:	Jiri Pirko <jiri@...nulli.us>
To:	Wei-Chun Chao <weichunc@...mgrid.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net, ast@...mgrid.com,
	xiakaixu@...wei.com
Subject: Re: [PATCH net-next] bpf: fix verifier

I would expect better subject, perhaps something like:
"fix array boundary in check_map_func_compatibility"


Wed, Aug 12, 2015 at 09:39:34AM CEST, weichunc@...mgrid.com wrote:
>Wrong array boundary is used.
>
>Fixes: 35578d798400 bpf: Implement function bpf_perf_event_read())
>Cc: Kaixu Xia <xiakaixu@...wei.com>
>Cc: Alexei Starovoitov <ast@...mgrid.com>
>Signed-off-by: Wei-Chun Chao <weichunc@...mgrid.com>
>---
> 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 48e1c71..ed12e38 100644
>--- a/kernel/bpf/verifier.c
>+++ b/kernel/bpf/verifier.c
>@@ -853,7 +853,7 @@ static int check_map_func_compatibility(struct bpf_map *map, int func_id)
> 	if (!map)
> 		return 0;
> 
>-	for (i = 0; i <= ARRAY_SIZE(func_limit); i++) {
>+	for (i = 0; i < ARRAY_SIZE(func_limit); i++) {
> 		bool_map = (map->map_type == func_limit[i].map_type);
> 		bool_func = (func_id == func_limit[i].func_id);
> 		/* only when map & func pair match it can continue.
>-- 
>1.9.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@...r.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ