kern/61174: patch to bridge.c: range checking for bridge.enable
Bruce Cran
bruce at cran.org.uk
Sat Jan 10 07:20:20 PST 2004
>Number: 61174
>Category: kern
>Synopsis: patch to bridge.c: range checking for bridge.enable
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 10 07:20:16 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Bruce Cran
>Release: FreeBSD 5.2-RC i386
>Organization:
>Environment:
System: FreeBSD box1.cran 5.2-RC FreeBSD 5.2-RC #0: Sat Jan 10 04:45:11 GMT 2004 brucec at box1.cran:/usr/obj/usr/src/sys/MYKERNEL i386
FreeBSD 5.2-RC2 system with bridge module loaded
>Description:
sysctl net.link.ether.bridge.enable accepts any 32-bit value, not just 0 or 1
>How-To-Repeat:
run sysctl net.link.ether.bridge.enable=10000
>Fix:
apply the following patch:
--- /sys/net/bridge.c Fri Oct 31 18:32:08 2003
+++ bridge.c Sat Jan 10 14:59:10 2004
@@ -563,7 +563,10 @@
int error;
error = sysctl_handle_int(oidp, &enable, 0, req);
- BDG_LOCK();
+ if( (enable > 1) || (enable < 0) )
+ return (EINVAL);
+
+ BDG_LOCK();
if (enable != do_bridge) {
do_bridge = enable;
reconfigure_bridge_locked();
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list