Date: Sat, 10 Jan 2004 15:14:41 GMT From: Bruce Cran <bruce@cran.org.uk> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/61174: patch to bridge.c: range checking for bridge.enable Message-ID: <200401101514.i0AFEfDS036512@box1.cran> Resent-Message-ID: <200401101520.i0AFKGsF038601@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401101514.i0AFEfDS036512>