Module Name:    src
Committed By:   riz
Date:           Sun Jun 13 17:51:11 UTC 2010

Modified Files:
        src/sys/net [netbsd-4]: bpf_filter.c

Log Message:
Pull up following revision(s) (requested by drochner in ticket #1393):
        sys/net/bpf_filter.c: revision 1.36
the correct check for BPF_K is with BPF_SRC for BPF_ALU ops, from
Guy Harris per PR kern/43185
fixes possible division-by-zero crashes by evil filter expressions
like "len / 0 =3D 1"
pullup candidate


To generate a diff of this commit:
cvs rdiff -u -r1.32.2.1 -r1.32.2.2 src/sys/net/bpf_filter.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/bpf_filter.c
diff -u src/sys/net/bpf_filter.c:1.32.2.1 src/sys/net/bpf_filter.c:1.32.2.2
--- src/sys/net/bpf_filter.c:1.32.2.1	Sun Feb  3 00:28:12 2008
+++ src/sys/net/bpf_filter.c	Sun Jun 13 17:51:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf_filter.c,v 1.32.2.1 2008/02/03 00:28:12 riz Exp $	*/
+/*	$NetBSD: bpf_filter.c,v 1.32.2.2 2010/06/13 17:51:11 riz Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.32.2.1 2008/02/03 00:28:12 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.32.2.2 2010/06/13 17:51:11 riz Exp $");
 
 #if 0
 #if !(defined(lint) || defined(KERNEL))
@@ -528,7 +528,7 @@
 				/*
 				 * Check for constant division by 0.
 				 */
-				if (BPF_RVAL(p->code) == BPF_K && p->k == 0)
+				if (BPF_SRC(p->code) == BPF_K && p->k == 0)
 					return 0;
 				break;
 			default:

Reply via email to