Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp56970pxy; Wed, 21 Apr 2021 18:23:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2GUe3mLTMKSojDolbgvCBcEcVY9KdjjniY1HVCuUvdPIJAmQECw4K6vre51fdWAR3SGWM X-Received: by 2002:aa7:86c8:0:b029:249:3950:afff with SMTP id h8-20020aa786c80000b02902493950afffmr883875pfo.79.1619054607486; Wed, 21 Apr 2021 18:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619054607; cv=none; d=google.com; s=arc-20160816; b=D8K3z3SwoGqMKFWW1Yky5UbmdLSAb7xvA9ZSZRVpWYVVDjBXXcH4JU6bOm/8Zhichy eZ5/ojfTfywDaFJ+G7G2QOpwQ76/bYIFebOgFi+wD0TvWbQknDwYlEEiWhVcXglcEUx5 1N4oBqRbuRBmxE3Y8ja1hLwGVstq+IwJlQNt7yLjJwNgbdPnaGMZ/OChDObkZgHqtnpY 3H8e9QrrESO/VaEPaY9xemsgccZfSsJHXZ5B4znvFrAWGMc6MkqTlapt720gR9lKanFf mdDEs8ygF0UHAJ3PQltugJTZ+RdfhePrK7LlFaVYEB60n/UwpuHnxtO6f4GgJpZBbdds og3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=O19OVUmKX+OatpTnEx2U4M6GnjJTDDCO8nNhpR1gr+U=; b=lR+aGhj+xLVudXaXWkeQmwqbHf5Q/cJpg0Jun+jUFXWNohE+y1Bvgvdv1Li/9DEVJR 5I7LBXHWWt1xNTfKGXyeF2lum5sWPZLhM8tcT0XBZ+IamMFquiYrxmUHPRzr/t4zzorU 8BxrEeXb25e0u+XLJT9yOOfn3BBhB2Xy+SGaQMG/n/43rGX+KMQi+wBieqtBrN1dh/n7 QCpbAP+RzPZTDd6K0KneeIrkjEtXc0yNCpIrT1+sZZEKZHjA6u+CWCrHr9+Cv6WW2ANQ zF+WaXKPt1S5tRiJIX1lbPq+PNvsKjPqbZL34lhHJ2tuop1KS1fdRVvzFd3m7UjeU/ir boJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HVJpPUul; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1301825pgq.343.2021.04.21.18.23.16; Wed, 21 Apr 2021 18:23:27 -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=@chromium.org header.s=google header.b=HVJpPUul; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245484AbhDUTtw (ORCPT + 99 others); Wed, 21 Apr 2021 15:49:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235545AbhDUTtv (ORCPT ); Wed, 21 Apr 2021 15:49:51 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D459C06174A for ; Wed, 21 Apr 2021 12:49:16 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id m11so29884948pfc.11 for ; Wed, 21 Apr 2021 12:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=O19OVUmKX+OatpTnEx2U4M6GnjJTDDCO8nNhpR1gr+U=; b=HVJpPUulS/cE7FTJFQx951RCIw/OmH6YXIQbR5foiMyGtLNI0cVGjM7U8320d3cV9L JxKLlWe/bDSY/GgFeePkdVPrCV+NZibAEAwS4zsS3KYGfXPgeBTvEVMRJ3RK419Hn/MN sE41F434eXaMq8yFrV8mjgqFlKstFjRqHVFQ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=O19OVUmKX+OatpTnEx2U4M6GnjJTDDCO8nNhpR1gr+U=; b=hxSZVJhOMDiyi6TbirLdNvHCjigVRZdb8f5DPQwO6tkF2j9UL2C2N/OxV/ClRvdpyo mseLgzzNLfzQ5v31eM6dELZdBKzMEw5/eJcB+PoGfHZsd2NWMmVEyDV/CN5t4fr/h/cb fyybgWHrYcEkTXqXxmVtrKmXW3T2hCIlvTvt+BlgeiL9aq7Q9hl1lYlaAfdbBqAIqs3n ujL7gms6Yt9bYhVEKTJpBABX3QQFGPXNIRmDAB3vl0n/rAhmu52jmB/bI8Tyehr4euA+ T5UMqSZwIZURqdPDaDYoa/RpIuqr4jX0jToAtJaH83JfAEqpI1U+/H9J4W4UCvZo78c6 oSBw== X-Gm-Message-State: AOAM532E9+VGbEpxQdDmY/5EQ/KHo3Jj0p9tUQQePC/ou2ZWgcIcjzgd SkeA9vqSLmH8tZHyT6HXhZI34A== X-Received: by 2002:a63:1157:: with SMTP id 23mr12968428pgr.25.1619034556055; Wed, 21 Apr 2021 12:49:16 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id k19sm200050pgl.1.2021.04.21.12.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 12:49:15 -0700 (PDT) Date: Wed, 21 Apr 2021 12:49:14 -0700 From: Kees Cook To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Aditya Pakki , Thomas Gleixner , kjlu@umn.edu, Borislav Petkov , "H. Peter Anvin" , Joe Perches , Nicolai Stange , Roland Dreier Subject: Re: [PATCH 113/190] Revert "x86/hpet: Prevent potential NULL pointer dereference" Message-ID: <202104211245.F5FEC8D15D@keescook> References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> <20210421130105.1226686-114-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210421130105.1226686-114-gregkh@linuxfoundation.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 21, 2021 at 02:59:48PM +0200, Greg Kroah-Hartman wrote: > This reverts commit 2e84f116afca3719c9d0a1a78b47b48f75fd5724. > > Commits from @umn.edu addresses have been found to be submitted in "bad > faith" to try to test the kernel community's ability to review "known > malicious" changes. The result of these submissions can be found in a > paper published at the 42nd IEEE Symposium on Security and Privacy > entitled, "Open Source Insecurity: Stealthily Introducing > Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University > of Minnesota) and Kangjie Lu (University of Minnesota). > > Because of this, all submissions from this group must be reverted from > the kernel tree and will need to be re-reviewed again to determine if > they actually are a valid fix. Until that work is complete, remove this > change to ensure that no problems are being introduced into the > codebase. > > Cc: Aditya Pakki > Cc: Thomas Gleixner > Cc: kjlu@umn.edu > Cc: Borislav Petkov > Cc: "H. Peter Anvin" > Cc: Kees Cook > Cc: Joe Perches > Cc: Nicolai Stange > Cc: Roland Dreier > Cc: https > Signed-off-by: Greg Kroah-Hartman > --- > arch/x86/kernel/hpet.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c > index 08651a4e6aa0..0515a97bf6f5 100644 > --- a/arch/x86/kernel/hpet.c > +++ b/arch/x86/kernel/hpet.c > @@ -930,8 +930,6 @@ int __init hpet_enable(void) > return 0; > > hpet_set_mapping(); > - if (!hpet_virt_address) > - return 0; > > /* Validate that the config register is working */ > if (!hpet_cfg_working()) FWIW, this patch looks harmless. It is checking for a failure in hpet_set_mapping(), and avoids the following code from performing 0-offset reads. hpet_set_mapping() is likely to never fail in real-world situations. *shrug* I think it would make more sense for the check to live in hpet_cfg_working(), though. -- Kees Cook