Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp258284pxx; Wed, 28 Oct 2020 04:18:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU7gyU0/4c1HdD39WfWd3puS3a9kcdwcJ4itGG3MAnlmuRGjbQHV6mcSgecEFO52c6WZfm X-Received: by 2002:a17:906:6a07:: with SMTP id o7mr6848844ejr.454.1603883900409; Wed, 28 Oct 2020 04:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603883900; cv=none; d=google.com; s=arc-20160816; b=PP2T1E7HMcJlo7iDNh9gS9GjeQy5Qysi8QbDT+bOSWDPJGvZF/iKs5dU2n1Iy7YXjg vizc8/9bVEPCHx1dTxnj37w+V58bXtJtQckgec4w2xcw+Y+P5xJxp/QtT6RPHeY/fy9s 50PM+k2IthsAcMqO/xMIEuFemw/94AstyB+7lZ4JRrUWIHk11NtLtEC9Wzz+1KCX5San 6ZUJf1D9FiiPHD9zN9YEDHUsxWkU6ZTtI4ikg31gWFGuwoMweRsdTV6kSpaMs0sw3GXM wqD7972WV91eqAOWX+6cYJ8HckUTtPBUApuhDyrjDOxq5R1gm8rCCOIOFInhjiE3ZcZc FFYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mTkzDsOt2juKbI+Ti+SXyOEqv8qehPwn4zl9hEfkWC0=; b=u3tYdaAN1eNjaY1kxheKtdbbFMu/t9bipJE0q/lbfokffTwUpEnV1j96QcNqk1oEcY 0D5lyVqMwlY7kssSy7ERcZddwAdEs/ZNU+YxxSQVO1OqLuZUGrKIk6frQVFaU3z6pksC cQNkkF9/VOAAyFeFWQy1DoT6CGg71taxDaXJeOQZYcTX/DkNe30EVCHiFzpIvWLtu+YZ U6eSyyPHTKSbkraURaYq2VbqDcfhYVV8nZFL/NX4Iu2UGBtQUQoiWZOc1Yea99ZdP3BI 7oxh5ERaS1Kg/ncmA2fcZyQTcoeMQ1CiXWa5hbCUEh9uhHvSJiA/9zYbumk2JqT7UA5O f2kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l5j+Pn1D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt10si1135660edb.503.2020.10.28.04.17.58; Wed, 28 Oct 2020 04:18:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l5j+Pn1D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1788562AbgJ0PA2 (ORCPT + 99 others); Tue, 27 Oct 2020 11:00:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:57152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1782043AbgJ0O43 (ORCPT ); Tue, 27 Oct 2020 10:56:29 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 7680F2071A; Tue, 27 Oct 2020 14:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810589; bh=5K4mB24GEmt7llTBmAUxj2Pvwn1GRGpPH2zA/89wIcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l5j+Pn1D7AY1HHjtbWNIrUZcc4iQMoHdjEEfiP2QNhPSbaqPbt6FG/zMeeO5/pg7M lTyLBXL3B/frJzj84Dqhv6mTcJUkBtVbj7q7xRSiWOyojQJkT9UxhNHZx+lfddLtel jltuQg0G7J143dSCa/d9MzwvvHZHMXEYKfHG6S60= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+e113a0b970b7b3f394ba@syzkaller.appspotmail.com, Christian Brauner , Todd Kjos , Jann Horn , Sasha Levin Subject: [PATCH 5.8 193/633] binder: Remove bogus warning on failed same-process transaction Date: Tue, 27 Oct 2020 14:48:56 +0100 Message-Id: <20201027135531.729146503@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jann Horn [ Upstream commit e8b8ae7ce32e17a5c29f0289e9e2a39c7dcaa1b8 ] While binder transactions with the same binder_proc as sender and recipient are forbidden, transactions with the same task_struct as sender and recipient are possible (even though currently there is a weird check in binder_transaction() that rejects them in the target==0 case). Therefore, task_struct identities can't be used to distinguish whether the caller is running in the context of the sender or the recipient. Since I see no easy way to make this WARN_ON() useful and correct, let's just remove it. Fixes: 44d8047f1d87 ("binder: use standard functions to allocate fds") Reported-by: syzbot+e113a0b970b7b3f394ba@syzkaller.appspotmail.com Acked-by: Christian Brauner Acked-by: Todd Kjos Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20200806165359.2381483-1-jannh@google.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/android/binder.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index af85d37aef680..adab46ca5dff7 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2324,8 +2324,6 @@ static void binder_transaction_buffer_release(struct binder_proc *proc, * file is done when the transaction is torn * down. */ - WARN_ON(failed_at && - proc->tsk == current->group_leader); } break; case BINDER_TYPE_PTR: /* -- 2.25.1