From owner-cvs-src@FreeBSD.ORG Sat Sep 13 09:17:11 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7215B106566B; Sat, 13 Sep 2008 09:17:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF5C8FC0C; Sat, 13 Sep 2008 09:17:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8D9HBLJ017040; Sat, 13 Sep 2008 09:17:11 GMT (envelope-from mav@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8D9HBUJ017039; Sat, 13 Sep 2008 09:17:11 GMT (envelope-from mav@repoman.freebsd.org) Message-Id: <200809130917.m8D9HBUJ017039@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to mav@repoman.freebsd.org using -f From: Alexander Motin Date: Sat, 13 Sep 2008 09:17:02 +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/sys/netgraph ng_base.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 13 Sep 2008 09:17:11 -0000 mav 2008-09-13 09:17:02 UTC FreeBSD src repository Modified files: sys/netgraph ng_base.c Log: SVN rev 182995 on 2008-09-13 09:17:02Z by mav We can't implicitly trust the hook on NGQF_FN/NGQF_FN2 processing in ng_apply_item(). There are possible (and I have got one) use-after-free class panics because of it. If hook is specified, require it to be valid at the apply time. The only exceptions are the internal ng_con_part2(), ng_con_part3() and ng_rmhook_part2() functions which are specially made to work with invalid hooks. Revision Changes Path 1.163 +14 -6 src/sys/netgraph/ng_base.c