Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7112908ybi; Thu, 13 Jun 2019 09:46:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUumHLY1zDEhRRFFiKUlIoVbUMhdiyge0bl4GcwGHd7/VZwoM4wRDeqcED8nzNa8vhB/32 X-Received: by 2002:a65:568b:: with SMTP id v11mr12465261pgs.453.1560444380420; Thu, 13 Jun 2019 09:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560444380; cv=none; d=google.com; s=arc-20160816; b=Z6BL/N9i1VOyFdAd9ZhyfpKgul4yy9w9W1LNrtjLHMSJ1noH00hbulPkNubDPG6j2Z 8TLaPeHMNel2MgyvcR71e+pwJXkokrt5o2SRs/ttxCOQvR/q8MyL3lqjA3LKWLAzFNdL XQo6jhAgRUN9WVq6mgwQ68cdVpijtUqVHKZK5BnD9W3Mz6fro6VihSqKFPeEoeTRwys+ rSFi+wI4HN1nHb4QdoKxvrjeaK9CiVaeq5p7Yo5pbXaB9JwDkQtG/WoJu5YobQgNDEab 0oITkV1ShgWb+ovA3/92P94TZLP65cr907MmM+B3q/L9CweV0BSWX1Xl/wqSJRrV3cky CtZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=26aVVdeDYPNWYDFJ8T3iLbBb3W+hnXe2cYeBLZ449Vs=; b=Ylyu3qD29hvUsZM7HcxTLf7FGSrndQ1SuGXoMDFfqrQQ7gYzJ+aLZncFpvrcGkSAcL qH6il8cGKyItGz22RtGv3zxLVBppe/eZIVBfjARGamDxa0Vo5D+CE8CgCmdQT3dkNxrr YDsLTxJWi5NpXBih2nIg4Bk34t5hipxwMYBsyK/tl3/5YVW2ofHBnrmEkurbIXfTF9mj 44TUiMrD/2BwLMLt4F05+m1AxCB3GiSNiPvwLy0dQNWwd28uThxEmq9rL8X8OUhGoFvT iUjMhqher1sb+fOT7zb4gArz+3DnKzstvhixCqzw2wXW/Po1hDLRPtTHKvTsWkS5O537 BZLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ByZS4yI0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si205644pgk.416.2019.06.13.09.46.05; Thu, 13 Jun 2019 09:46:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ByZS4yI0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392976AbfFMQp5 (ORCPT + 99 others); Thu, 13 Jun 2019 12:45:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:48470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbfFMFlk (ORCPT ); Thu, 13 Jun 2019 01:41:40 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 561782053B; Thu, 13 Jun 2019 05:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560404499; bh=8Xh4IPVPSoQJv7GWld73+9V0oaBZe8Mpmmz/mKLN+rQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ByZS4yI0t6Lw+NdGjH9a07AeUUIjvk1cJGDzyfIrJViTGTIERIRZJL73c1qIokMUC kT69jwfWNhHdI09f8E0yIK0aUZ+KzXE4TbSXQvD9JCQDWMDp6umh59lH1N+nTQhdeL M/gOrFkfIXjo0IPpGalbyOsvg9YOy3Os1OrJnBOY= Date: Thu, 13 Jun 2019 07:41:36 +0200 From: Greg KH To: Todd Kjos Cc: tkjos@google.com, arve@android.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, maco@google.com, joel@joelfernandes.org, kernel-team@android.com Subject: Re: [PATCH] binder: fix possible UAF when freeing buffer Message-ID: <20190613054136.GA19717@kroah.com> References: <20190612202927.54518-1-tkjos@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190612202927.54518-1-tkjos@google.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 12, 2019 at 01:29:27PM -0700, Todd Kjos wrote: > There is a race between the binder driver cleaning > up a completed transaction via binder_free_transaction() > and a user calling binder_ioctl(BC_FREE_BUFFER) to > release a buffer. It doesn't matter which is first but > they need to be protected against running concurrently > which can result in a UAF. > > Signed-off-by: Todd Kjos > --- > drivers/android/binder.c | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) Does this also need to go to the stable kernels? thanks, greg k-h