From owner-cvs-all@FreeBSD.ORG Thu Apr 19 15:41:00 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2AD016A400; Thu, 19 Apr 2007 15:41:00 +0000 (UTC) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id D3FF413C43E; Thu, 19 Apr 2007 15:41:00 +0000 (UTC) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3JFf0X4032447; Thu, 19 Apr 2007 15:41:00 GMT (envelope-from mtm@repoman.freebsd.org) Received: (from mtm@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3JFf040032446; Thu, 19 Apr 2007 15:41:00 GMT (envelope-from mtm) Message-Id: <200704191541.l3JFf040032446@repoman.freebsd.org> From: Mike Makonnen Date: Thu, 19 Apr 2007 15:41:00 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sbin/ping6 ping6.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2007 15:41:01 -0000 mtm 2007-04-19 15:41:00 UTC FreeBSD src repository Modified files: sbin/ping6 ping6.c Log: Correct two issues in ping6: 1. The static buffer that ping6(8) uses to hold the control data it gets from recvmsg(2) is too small in some cases. 2. When it prints the extra header information it doesn't do any checking to make sure the data it's printing is within the bounds of the supplied buffer. Fix this by: o Increasing the buffer to hold extra headers to 10240 bytes (the minimum according to RFC3542 sec. 20.1) and allocate it dynamically. o In verbose mode, specify a warning if any control data from recvmsg(2) was truncated because the buffer was too small. o When printing the extra headers make sure not to overrun the buffer boundaries. Reviewed By: mlaier PR: kern/99425 MFC After: 1 month Revision Changes Path 1.30 +68 -19 src/sbin/ping6/ping6.c