Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1606977lqt; Wed, 20 Mar 2024 08:47:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVoV+A8OfgpHLmxOlBMk4CX2mrASXD0rX7a/ruDvXV4OOyEpB9EeOxP5SDmQTiDFQzusYtr5wufyeiI9edic+hQja06lD9kaSTV2+DDlw== X-Google-Smtp-Source: AGHT+IH3Ov8xA9mCUFhF50iDum9lnOEn8TVBBhjL35quAY+5kP48Zq0/zxHBAEQzP6QWFcDK5aik X-Received: by 2002:a17:902:f706:b0:1e0:2cdd:fd83 with SMTP id h6-20020a170902f70600b001e02cddfd83mr9080749plo.28.1710949668919; Wed, 20 Mar 2024 08:47:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710949668; cv=pass; d=google.com; s=arc-20160816; b=FfHDIOJcvrQRwFH7Y789m8+C2ekWHbu6tK67STdemzvsfGdctA2fdSorLsrcN1jllQ l3z0i1RoVbx1Jw5+t6njsEyFcXVjLjx4B4Gv83oGK+nRk8lQmYBGWAvaDBnA/X+jAAtd 8SlCjUiabLWseqA7pIhsHBqxssiZA6ejWxBB0Ta7/z8y8CVcL80YqLSBrOy7nByQxdty KyvMyFryK6ZqKpgfWJhVRftqaKiqasy09qBpXlYVGMUl4zOvHdp95Ld3RhiWcKsEUAgb Oxo1fPAvuIopEfnzg2WUP+/YTo4mz67GhxckpmKcmfjWByFzpNr/sSEeMO5AAPkO3EXq PEDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=j1ka3RFs+eJGSQKMqc8z19YVg/zQqk+K48Rs/S8UElk=; fh=k7IHWndiszun6ZBq18V40+1cfesfCq8XTph/VVkrzYw=; b=BPtyouKVmre/Af7Fv0onXCYFDiiPfAEu1YsJKbdT1rlFYKWtDBL5cndxQCkOTW+gws MDj8tFAKFpWWT125u6UpO7K5CTXQTG6czdwDzAzBJXzTllc96NhJ7x6x2mUbRo0tZbWr m3UFWGzqTL+yoxh6vy7iacYuoUMBYNui4zol5yCzxzhDYkaVib8K8OPKbz33N+fWEbBe a6GgHFjB7yF+fmsSyy8RVfQyAmguaKqg2cv8sS0/SoxI2TX8K8qlu+5I0wKD1nwJHMhk DjnCuR/3PXmwod+3DKEX1kJ1MnMrIzidwYIjv4wWQ1A9J2RKm0BJ3fEtxQnkSs5LTZty WqAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EKvZhIK5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109118-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109118-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z12-20020a170902d54c00b001dff7268b4bsi9506455plf.367.2024.03.20.08.47.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 08:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109118-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EKvZhIK5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109118-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109118-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D1A6DB227DE for ; Wed, 20 Mar 2024 15:47:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CA1E52F7D; Wed, 20 Mar 2024 15:47:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EKvZhIK5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39F2842044 for ; Wed, 20 Mar 2024 15:47:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710949659; cv=none; b=d8XMEn6g48HJae74/mfA6BK18ATfpvUudAc53b2uaw71vUzNkvm2eAXngKDEzY6msmZtnjFwL8hYFHH0+15K/v9IATtlg0S0MzIC9Yk2mEBq7OSs6SoEuvgpx8XKE/nzu/h62ulQ4vRYlInupbG/eF2WkmlIkvEHhfNqYa6FHFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710949659; c=relaxed/simple; bh=mUoJODB1lmpv16ZURDDCEe7Bc4tasw9LwAOQ/nPQyj0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a6t0Sa6aMWqbfT6NPkGz7MpuoZWYeLdROrO0u+B3iT8uuMJJ1fNHV1NBjknZ0weYqgViCkUXjdDk4+jnjROgUWbwR80WsdA49S8Rgz1gLxqmkE08fYSRjC2grx8TRKt6BI9T86bPnPYEJZDAQxsPAFuGHUe3BVyYxaOneass13w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EKvZhIK5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83B1EC433C7; Wed, 20 Mar 2024 15:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710949658; bh=mUoJODB1lmpv16ZURDDCEe7Bc4tasw9LwAOQ/nPQyj0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EKvZhIK50g+QVMysknChhxWDMvb+JMELxCLyxo/ElvdaJIYtX+YHwAyujhnbayAIB dOEWCAMmSBrTTFyCqS6JXvqdzJpSne+L8VThzMsdqOtL9jAJsbL6e+13D8SocaQ6e3 lzoyAmnIhURiIkTB/94YgbTwIBDkEBrbybf8oU/TxEmRd2oi03vRVDaZ1tX4tZF07L iIQ+8HeiF6LEjdem+Bv+ZnfJawlx/WgUAuuGuR1gtUyFLrDxkTSz5Ot76QSEtr7qm9 ZcVjITj8CLOfGNgWHbB11piSLuN6RuWxTBJ8u/i//g63Xi2FU/wD+3ggW375WtNHmj 0age3Ui/fr+HQ== Date: Wed, 20 Mar 2024 15:47:34 +0000 From: Lee Jones To: Michal Hocko Cc: cve@kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Felix Kuehling Subject: Re: CVE-2024-26628: drm/amdkfd: Fix lock dependency warning Message-ID: <20240320154734.GU1522089@google.com> References: <2024030649-CVE-2024-26628-f6ce@gregkh> <20240314110938.GM1522089@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, 20 Mar 2024, Michal Hocko wrote: > On Thu 14-03-24 11:09:38, Lee Jones wrote: > > On Fri, 08 Mar 2024, Michal Hocko wrote: > > > > > On Wed 06-03-24 06:46:11, Greg KH wrote: > > > [...] > > > > Possible unsafe locking scenario: > > > > > > > > CPU0 CPU1 > > > > ---- ---- > > > > lock(&svms->lock); > > > > lock(&mm->mmap_lock); > > > > lock(&svms->lock); > > > > lock((work_completion)(&svm_bo->eviction_work)); > > > > > > > > I believe this cannot really lead to a deadlock in practice, because > > > > svm_range_evict_svm_bo_worker only takes the mmap_read_lock if the BO > > > > refcount is non-0. That means it's impossible that svm_range_bo_release > > > > is running concurrently. However, there is no good way to annotate this. > > > > > > OK, so is this even a bug (not to mention a security/weakness)? > > > > Looks like the patch fixes a warning which can crash some kernels. So > > the CVE appears to be fixing that, rather than the impossible deadlock. > > Are you talking about lockdep warning or anything else? Anything that triggers a BUG() or a WARN() (as per the splat in the commit message). Many in-field kernels are configured to panic on BUG()s and WARN()s, thus triggering them are presently considered local DoS and attract CVE status. -- Lee Jones [李琼斯]