Received: by 10.223.185.116 with SMTP id b49csp829565wrg; Sat, 10 Feb 2018 21:25:02 -0800 (PST) X-Google-Smtp-Source: AH8x225fPE3f/B2DWDVdMqL94HFMH/Vot45GIcAff1k4HxkRFU03Y4fhXdcSRLvtMVTjPomQerbz X-Received: by 2002:a17:902:3f83:: with SMTP id a3-v6mr7127005pld.263.1518326702760; Sat, 10 Feb 2018 21:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518326702; cv=none; d=google.com; s=arc-20160816; b=EdsF7F6jNVbuiV2WgrWLIywsav8mNj7jJstq/j7DTH2E3HpB5FTwKdGIeX1HlyUZAN RYURgbVoY+kvn/BTRdlh8kgw9i7GfgWb76C3CpAPOxgh5REjrlUJF1bYYpnN3RrEjgLa 3Gqs1K5W7uJjaklD9Z+PdE7g0Tp91IPMGy/tLhninypRB/7/Nkee8pAqBD8MSoKmXgfK ZF6+cTJYq4j+uUZpprR49FtY2JYnbhsxY8TD1np/Izf9uvRhgvvv5U0Bh5UjgC7ERFZ0 J7Ckx9f25aFSa+9kwNOHwkfrYeI1gG7+yjTIsGCDH/NGTNbVOZKL8gnozpBy3u+wMtRy bW/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=S5zdOqJAZ7Stn2sni42u84a5hPwiPhztJEXUxk0f9rI=; b=KFwUWNcrIlDiCfT36UorY7JWWan+O42AYvjGHpiRDD+qFGPtoSSLJ4gAB77ZLQSoHA 9YEQdBmickUEYrEZRhpTfLBbV5sHsZPw6iun4CfpMXdrY5aF8b4x4jASbozRuLZxcAZu ieW0zQOz7yHM27XnOfgoHh7EvgcnFj3S6lIU7Qyvf8XSTHgmLd7wJaMpGhzULaRCDID9 x98ZSMBPYD0u0jQcSmcd+qT1jvOsUrbUYgF4sb22VSkioZnGDQWWjcfjZ1//4+Ps1RQu ehz9H7M/nFay38GRJRJHALzbEUu2TRHOUMDqobL1Xv3YwAFcy3bpGNFpv133e7Z8X56p H2TQ== ARC-Authentication-Results: i=1; mx.google.com; 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 k7si1845519pgp.153.2018.02.10.21.24.49; Sat, 10 Feb 2018 21:25:02 -0800 (PST) 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; 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 S1754025AbeBKFRi (ORCPT + 99 others); Sun, 11 Feb 2018 00:17:38 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:41353 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752554AbeBKEdk (ORCPT ); Sat, 10 Feb 2018 23:33:40 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ekjKd-0002hK-0f; Sun, 11 Feb 2018 04:33:39 +0000 Received: from ben by deadeye with local (Exim 4.90) (envelope-from ) id 1ekjKY-0004Wu-Py; Sun, 11 Feb 2018 04:33:34 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Santosh Shilimkar" , "David S. Miller" , "Mohamed Ghannam" Date: Sun, 11 Feb 2018 04:20:06 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.2 68/79] RDS: null pointer dereference in rds_atomic_free_op In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.2.99-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Mohamed Ghannam commit 7d11f77f84b27cef452cee332f4e469503084737 upstream. set rm->atomic.op_active to 0 when rds_pin_pages() fails or the user supplied address is invalid, this prevents a NULL pointer usage in rds_atomic_free_op() Signed-off-by: Mohamed Ghannam Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/rds/rdma.c | 1 + 1 file changed, 1 insertion(+) --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -855,6 +855,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, err: if (page) put_page(page); + rm->atomic.op_active = 0; kfree(rm->atomic.op_notifier); return ret;