From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 8 15:24:16 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B0F716A403; Wed, 8 Nov 2006 15:24:16 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FA6043D53; Wed, 8 Nov 2006 15:24:14 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 330EE5C59; Wed, 8 Nov 2006 18:24:13 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 119F05C4F; Wed, 8 Nov 2006 18:24:13 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kA8FOEm3016572; Wed, 8 Nov 2006 18:24:14 +0300 (MSK) (envelope-from ru) Date: Wed, 8 Nov 2006 18:24:14 +0300 From: Ruslan Ermilov To: Jacques Fourie Message-ID: <20061108152414.GA16466@rambler-co.ru> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-hackers@FreeBSD.org, "Christian S.J. Peron" Subject: Re: m_free() in if_bridge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2006 15:24:16 -0000 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 08, 2006 at 04:37:34PM +0200, Jacques Fourie wrote: > While browsing through if_bridge.c I noticed that if the bridge > interface is in monitoring mode, m_free() gets called on the packet > after passing it to BPF. Should this not be m_freem() instead or am I > missing something? The code in question can be found in the > bridge_input() function, line 1877 in if_bridge.c. >=20 It's been fixed already: : revision 1.85 : date: 2006/11/05 17:56:25; author: csjp; state: Exp; lines: +1 -1 : Fix possible leak when bridge is in monitor mode. Use m_freem() which will : free the entire chain, instead of using m_free() which will free just the : mbuf that was passed. :=20 : Discussed with: thompsa : MFC after: 3 days Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFUfaeqRfpzJluFF4RArLGAJ9ylgpqg47ZYDeyVAAr4wXfrrJlbgCcD4Bn kRyptlpZ8+QkuFD+7xufFk8= =TaDj -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--