From owner-freebsd-hackers@FreeBSD.ORG Wed May 27 18:03:58 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D83841065674 for ; Wed, 27 May 2009 18:03:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 923A88FC1A for ; Wed, 27 May 2009 18:03:58 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (cm-84.215.252.34.getinternet.no [84.215.252.34]) by smtp.des.no (Postfix) with ESMTP id 8D7E56D41D; Wed, 27 May 2009 20:03:57 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 7D81684491; Wed, 27 May 2009 20:03:57 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: rea-fbsd@codelabs.ru References: <23727599.post@talk.nabble.com> <86prdvipwe.fsf@ds4.des.no> <0vGjPHEq7MqxjtFmBufY+mBxlR4@7oUjtCwN654QcDr16CH+kAk8bJg> <86vdnmiz30.fsf@ds4.des.no> <15QQC+1YeDzOjf35dqyJmioc1ik@XX1fo6zQUfC4h0jjRC6IBz3oNH4> <86prdug1p0.fsf@ds4.des.no> <86vdnmijgs.fsf@ds4.des.no> Date: Wed, 27 May 2009 20:03:57 +0200 In-Reply-To: (Eygene Ryabinkin's message of "Wed, 27 May 2009 21:28:49 +0400") Message-ID: <86ab4yifsi.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Jakub Lach Subject: Re: FYI Lighttpd 1.4.23 /kernel (trailing '/' on regular file symlink) vulnerability X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 18:03:59 -0000 Eygene Ryabinkin writes: > 'if ()' looks suspicious: ISLASTCN is set some lines below so it could > be not yet flagged. Seems like we could omit 'if ()' clause but leave > it's body for the current state of the code -- it will be equivalent to > the mine's check. Yes, I was a little too quick there. You're right, we can just drop the if(). Actually, the reason why I moved this up is that I was considering eliminating the trailing_slash variable entirely. > By the way, I had somewhat extended your regression tests with the > intermediate symlink tests, directory tests and device-as-a-target > tests. Patches are attached. Will they go? I'll take a look at them later. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no