From owner-cvs-src@FreeBSD.ORG Wed Oct 15 19:00:14 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E0F116A4B3; Wed, 15 Oct 2003 19:00:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3350D43F85; Wed, 15 Oct 2003 19:00:13 -0700 (PDT) (envelope-from mckusick@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9G20DXJ030139; Wed, 15 Oct 2003 19:00:13 -0700 (PDT) (envelope-from mckusick@repoman.freebsd.org) Received: (from mckusick@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9G20CZu030138; Wed, 15 Oct 2003 19:00:12 -0700 (PDT) (envelope-from mckusick) Message-Id: <200310160200.h9G20CZu030138@repoman.freebsd.org> From: Kirk McKusick Date: Wed, 15 Oct 2003 19:00:12 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netinet ip_fw2.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2003 02:00:14 -0000 mckusick 2003/10/15 19:00:12 PDT FreeBSD src repository Modified files: sys/netinet ip_fw2.c Log: Malloc buckets of size 128 have been having their 64-byte offset trashed after being freed. This has caused several panics including kern/42277 related to soft updates. Jim Kuhn tracked the problem down to ipfw limit rule processing. In the expiry of dynamic rules, it is possible for an O_LIMIT_PARENT rule to be removed when it still has live children. When the children eventually do expire, a pointer to the (long gone) parent is dereferenced and a count decremented. Since this memory can, and is, allocated for other purposes (in the case of kern/42277 an inodedep structure), chaos ensues. The offset in question in inodedep is the offset of the 16 bit count field in the ipfw2 ipfw_dyn_rule. Submitted by: Jim Kuhn Reviewed by: "Evgueni V. Gavrilov" Reviewed by: Ben Pfountz MFC after: 1 week Revision Changes Path 1.40 +7 -4 src/sys/netinet/ip_fw2.c