Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp792262ybl; Fri, 30 Aug 2019 07:15:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqzT08+ArXV7Y8tdNNOK17dF0aEVHCDOINQXSFqonxYqi+jMM3vvRtxHSfCGUK3CscNlb/ X-Received: by 2002:a63:e44b:: with SMTP id i11mr12820630pgk.297.1567174551935; Fri, 30 Aug 2019 07:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567174551; cv=none; d=google.com; s=arc-20160816; b=g3Cqh5t6pe5Q2pW6emOLtEDBo0ADXk/U/31MVmeh6tVAX15u8OMtSiGZyXX0qA9t39 dKcBCXk5hX2//6WRX/XMB4tqn7IUF7OLQd6Ktq3w4MPoqHFz/zJVuvmzc9XS77YWBWaN EeC/K1J2KQ0iOZDYNk/OJsFBWbwSom7Fyf1laqOWy4a01WnGgnn4iv1ImD2aKWQnqOO8 gBpA0hyx0CjR690d/zvDJaxFAWuPQnhibZnEtN/XItChMIN+liTXDWp/wHC69Xvoqyyr U6n2ESfT5XmSEIf1h/JfyRlo9g30mMUyBtpY5WuOZrD8JVWiao4D2EwmzSFPZyryzsCs 6HSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=2sVIcaZos982/RSVXTZSBfCpeF8hyszFPNc22rcZlgs=; b=gSQSmLdkh+ABU7nz8PL6ZEhNjW2bPIWVPP7k4XYyoOHuT+QnV0g7+rjceabQKDT7oR 5zSkmTABTeI9GZ3uobnOuVzck11sLKx5MdLKSk5LI7fjt2q5lAIePHl0vYf19Iti0xM8 dLNi37+gf4DcQfo0Ioxp0ZuyY7P7hhnPLi1te9NdeloHuZJYID2wMUzrV362SLoj1qjG dOSQtOciv55UNLZNGiZ9nA9mW6j+VOsquAn/YWKvATcIWLZKzhSx3p/IliEEttPoPKUR CepiflpwQVGm2kEqOkNb3rBm3KBvPbSuOFA9OIt7+gCQPshsOxVIqqZTRuR/e5o8v40A k6GQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x26si5866456pfq.258.2019.08.30.07.15.36; Fri, 30 Aug 2019 07:15:51 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727959AbfH3ONF (ORCPT + 99 others); Fri, 30 Aug 2019 10:13:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61352 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727914AbfH3ONF (ORCPT ); Fri, 30 Aug 2019 10:13:05 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 617ED308620B; Fri, 30 Aug 2019 14:13:05 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-255.rdu2.redhat.com [10.10.120.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 125E11001925; Fri, 30 Aug 2019 14:13:03 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20190830085646.14740-1-hdanton@sina.com> References: <20190830085646.14740-1-hdanton@sina.com> To: Hillf Danton Cc: dhowells@redhat.com, Sachin Sant , linuxppc-dev@ozlabs.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Oops (request_key_auth_describe) while running cve-2016-7042 from LTP MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4383.1567174383.1@warthog.procyon.org.uk> Date: Fri, 30 Aug 2019 15:13:03 +0100 Message-ID: <4384.1567174383@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 30 Aug 2019 14:13:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hillf Danton wrote: > - struct request_key_auth *rka = dereference_key_rcu(key); > + struct request_key_auth *rka; > + > + rcu_read_lock(); > + rka = dereference_key_rcu(key); This shouldn't help as the caller, proc_keys_show(), is holding the RCU read lock across the call. The end of the function reads: if (key->type->describe) key->type->describe(key, m); seq_putc(m, '\n'); rcu_read_unlock(); return 0; } and the documentation says "This method will be called with the RCU read lock held". I suspect the actual bugfix is this bit: > + if (!rka) > + goto out; David