From owner-freebsd-net Mon Apr 30 12:53:19 2001 Delivered-To: freebsd-net@freebsd.org Received: from mailfarm.ipfnet.net (mailfarm.ipfnet.net [195.211.129.222]) by hub.freebsd.org (Postfix) with ESMTP id 13C6037B423 for ; Mon, 30 Apr 2001 12:53:16 -0700 (PDT) (envelope-from ml-freebsd-net@phobgate.de) Received: from [192.168.2.94] (router-195-211-129.ipfnet.net [195.211.129.1]) (authenticated as bsd@phobgate.de) by mailfarm.ipfnet.net (8.11.1/8.10.1) with ESMTP id f3UJrEp47267 for ; Mon, 30 Apr 2001 21:53:14 +0200 (CEST) Date: Mon, 30 Apr 2001 21:51:01 +0200 From: alex Reply-To: alex To: freebsd-net@FreeBSD.ORG Subject: no free() after malloc() in arp (src/usr.sbin/arp/arp.c) Message-ID: <824983177.988667461@[192.168.2.94]> X-Mailer: Mulberry/2.0.8 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org hi there, i don't see a security issue in this, just want to ask if this is ok (or maybe unwanted?): in src/usr.sbin/arp/arp.c in function search() (starts line ~429) i see this (line ~447): if ((buf = malloc(needed)) == NULL) got from: http://www.FreeBSD.org/cgi/cvsweb.cgi/src/usr.sbin/arp/arp.c?rev=1.29&conte nt-type=text/x-cvsweb-markup which should be latest version(?) this allocated memory isn't free'd later in this function. so if arp uses this function over and over again, memory fills up (not much, but it does). i just came to this, because i used this search() function while playing around with ip -> mac translation and my test programm suddenly had ~60MB memory usage :) alex To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message