From owner-svn-src-all@FreeBSD.ORG Tue Oct 21 09:45:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA6EF1065676; Tue, 21 Oct 2008 09:45:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C908E8FC22; Tue, 21 Oct 2008 09:45:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9L9j2aS094715; Tue, 21 Oct 2008 09:45:02 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9L9j2qG094714; Tue, 21 Oct 2008 09:45:02 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810210945.m9L9j2qG094714@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 21 Oct 2008 09:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184117 - in stable/7/sys: . netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 09:45:03 -0000 Author: bz Date: Tue Oct 21 09:45:02 2008 New Revision: 184117 URL: http://svn.freebsd.org/changeset/base/184117 Log: MFC: r183923 Check that the mbuf len is positive (like we do in the v4 case) to avoid possible panics. PR: kern/119123 Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/netinet6/ip6_output.c Modified: stable/7/sys/netinet6/ip6_output.c ============================================================================== --- stable/7/sys/netinet6/ip6_output.c Tue Oct 21 09:30:42 2008 (r184116) +++ stable/7/sys/netinet6/ip6_output.c Tue Oct 21 09:45:02 2008 (r184117) @@ -2814,7 +2814,7 @@ ip6_setpktopts(struct mbuf *control, str if (control->m_next) return (EINVAL); - for (; control->m_len; control->m_data += CMSG_ALIGN(cm->cmsg_len), + for (; control->m_len > 0; control->m_data += CMSG_ALIGN(cm->cmsg_len), control->m_len -= CMSG_ALIGN(cm->cmsg_len)) { int error;