From owner-freebsd-net@FreeBSD.ORG Tue Nov 1 21:51:13 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D768106564A for ; Tue, 1 Nov 2011 21:51:13 +0000 (UTC) (envelope-from prabhakar.lakhera@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id E9B2F8FC0C for ; Tue, 1 Nov 2011 21:51:12 +0000 (UTC) Received: by ggnq2 with SMTP id q2so9961810ggn.13 for ; Tue, 01 Nov 2011 14:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=jH4fivMSByXNNJq/zlpsYGlq4QV+90J0BswKfkwr/+g=; b=hWnToNo0smbIcM3bTV4mcv+duyS3HpMnRJIchSBBPPpMiGPrBU9AQs5LIf4Dr1x/4U BxllCHcLcy1m3SJgD6cRltUX2uJVrrZ54UOqjI81XSF+BxCnZVHrjFq777uWmAYmZrag GuNredLqBY1A0T4eGqzo7R+Thuf/sc2mh2lDU= MIME-Version: 1.0 Received: by 10.101.11.18 with SMTP id o18mr361617ani.86.1320182834015; Tue, 01 Nov 2011 14:27:14 -0700 (PDT) Received: by 10.100.48.17 with HTTP; Tue, 1 Nov 2011 14:27:13 -0700 (PDT) Date: Tue, 1 Nov 2011 14:27:13 -0700 Message-ID: From: prabhakar lakhera To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: mbuf leak in icmp6 code?? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2011 21:51:13 -0000 Hi, In FreeBSD icmp6 code I see function where we are either going to freeit where passed mbuf is freed or we are simply returning. For example: icmp6_input calls icmp6_redirect_input and right after it returns it makes m=NULL. Inside icmp6_redirect_input there are checks for ifp and for the message being short (which probably don't get exercised that often (or at all?)) and for these checks simply return. Looks to be mbuf leak. In other icmp6 functions also we have similar instances. Just wanted to check if these are there undetected or not. This is my first mail to the BSD community so I am not sure if reporting this in the mail the right way. Please let me know. Best, Prabhakar