Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932397Ab2BXXAs (ORCPT ); Fri, 24 Feb 2012 18:00:48 -0500 Received: from r00tworld.com ([212.85.137.150]:49194 "EHLO r00tworld.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756034Ab2BXXAr (ORCPT ); Fri, 24 Feb 2012 18:00:47 -0500 From: "PaX Team" To: Nick Bowler , Vasiliy Kulikov Date: Fri, 24 Feb 2012 23:59:47 +0200 MIME-Version: 1.0 Subject: Re: [kernel-hardening] Re: Add overflow protection to kref Reply-to: pageexec@freemail.hu CC: Kees Cook , Greg KH , David Windsor , Roland Dreier , Djalal Harouni , kernel-hardening@lists.openwall.com, Ubuntu security discussion , linux-kernel@vger.kernel.org, spender@grsecurity.net Message-ID: <4F481663.5371.216F475B@pageexec.freemail.hu> In-reply-to: <20120224191300.GA12553@albatros> References: <20120217075945.GA2831@albatros>, <20120224190549.GA8034@elliptictech.com>, <20120224191300.GA12553@albatros> X-mailer: Pegasus Mail for Windows (4.63) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.12 (r00tworld.com [212.85.137.150]); Fri, 24 Feb 2012 23:59:56 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 829 Lines: 18 On 24 Feb 2012 at 23:13, Vasiliy Kulikov wrote: > > But in this case, the principle does not apply because we can recover. > > The reason we cannot recover from the stack protector case is because > > the stack protector is reacting after the fact, which is not the case > > here. Simply peg the reference count at the maximum value, neither > > incrementing it nor decrementing it further. > > ...and simply loose one reference, which leads to use-after-free. saturating the refcount keeps the protected object allocated, so it is a memory leak, but it is not a use-after-free. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/