Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp55423lqs; Thu, 13 Jun 2024 03:49:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQSiSAeN7Gv6KRB7LTbdlposLG7mu4aYovDP2LJ2/6DKDYvuYxvG84+Uc7Wx3F4taiLfTxqtovT5bzwNjv9wKNFL2mzpNw4JO2T00nqA== X-Google-Smtp-Source: AGHT+IGwG72z04Vmv2HCEGut0W8fk0Ri1E/YPqzGzEDpry/P/GFmH9A9s3u6gNE6bEVPIgSc7Xyd X-Received: by 2002:a05:6358:418e:b0:19f:54a7:4f0b with SMTP id e5c5f4694b2df-19f69d553c2mr547163955d.19.1718275756237; Thu, 13 Jun 2024 03:49:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718275756; cv=pass; d=google.com; s=arc-20160816; b=tQxLvdorL27+lSBdUt4jm1VhFXMwNr1qUJlD5jn/zDAvvYSNhwDOFpol9PKQmO9tHg Y2E8p+qErIUZP/KurnDkA5M0tNZXyfDbeCR5uw0XimH4/K2t8pr1dD9E4X0fiS6Em+T7 2je27/5PjNH4iOCgJ9HJWugLxHQ6uqEUrVEV8utQF/Y+Ec3dG1DIbhKgUCtLASIDAApb NAeQtw1pRI/Am7Xz95j8AKxD0Z1HYQ5AnS3ruOb7Gjtp8cht7ENmtoyc7gao5bGk4Ehh q03E3DHQNli1XVS7oIOJ7KS7Hk+sNYURqSVXIEifOzoMyTwbbpJCpwEEk1WqJKDqohGL kByQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RP67djVj+XzQ8JPU/EIY61/D4oV6YgrZg1oyMvN+mVQ=; fh=V2MrS5nBKO6NZyKkSAqWlntXbBhYGIBXHuVNjdGc+Bw=; b=Vc9sPnZE4ifaz4RIIeL4/r9P/BNIRHXtytXHm8cQMo0gTUrbOHCxIhvCpKtWrq7C7b Fvpz++XZuCbag6noTsM0DFM5+D15+4FlgnSHJq877/DZVtArSqaGuRhrCcr4z8QN8BrW jwxdb6ynY9nIWNflxqRE0GlQhCwN1QgZzg1Lpg4GDSqwg5w/0UgSLi+tImM2xc4R+r2y rbrTZy0RYC36xLZ8rxRqDenOQs4KR3iOUzmBtUA2Bjtbxajc68bjWLA3na5ip8xM8wDd t8ITkkGi7GKkbmXVCR5uy50JHpiQdBZLIMuvdy+ky/qC4bpZpplDRD4LfP+kdq3ffYMm AWNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x3fqht00; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-213050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213050-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6feddd91b8csi1070021a12.39.2024.06.13.03.49.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 03:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x3fqht00; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-213050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213050-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2A25D282079 for ; Thu, 13 Jun 2024 10:46:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FF1E142906; Thu, 13 Jun 2024 10:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="x3fqht00" 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 3D84A1411E1 for ; Thu, 13 Jun 2024 10:46:35 +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=1718275596; cv=none; b=bi358ntmuxuVPCTu8igNVFchim6XZarj60AbVzLA12dFQNBQGNCaGOAxXrWJaMz/Ee6U1NHzU3N2x/anjnZh/orzgxVys1EqRh1bCQ+H7c2iHfY2jS9SYfViP10YFpn0alIgh9PevB8aJ+2iOQZzNx6bi3yd+tJ2kHNA5SM/M1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718275596; c=relaxed/simple; bh=zvynH4+/ZKi6EO3xPqDT8KhKU9w/4hcTOIDyS5SoVso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tYUhjLfZewBD9M3jno/ETk53TY8PJfAw1ubdAeJ5/DsnEI7CRyHGmQ+Okl+jlDVBlPeZfKwz2qnluTdqbEDlDn90v/TpxNuEUe/QKVGnGyhClmcsqm+VI2VzQE2FvDKz5mTV8lCQPST3melF3ArsmEJKFk/jsyP2P9T7eBiYuQo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=x3fqht00; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42AA3C2BBFC; Thu, 13 Jun 2024 10:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718275595; bh=zvynH4+/ZKi6EO3xPqDT8KhKU9w/4hcTOIDyS5SoVso=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x3fqht00QKPezzBfAiCoYVWYrvvO3do7G5v+OSlQ+tzyhRAtJ/m/a7+3BlPMb86J9 eiUKrY5u6QHs2fILzIvkTxMSMgupzI0Zc5hXsn/aYEjAf+Et+vuGtMc/ghpTePgL7b eEyqjeX7HEnc1NBC2EBMhsOgIoHUMzB6OUldDlLA= Date: Thu, 13 Jun 2024 12:46:33 +0200 From: Greg Kroah-Hartman To: Pavel Machek Cc: Lee Jones , Michal Hocko , cve@kernel.org, linux-kernel@vger.kernel.org, Felix Kuehling Subject: Re: CVE-2024-26628: drm/amdkfd: Fix lock dependency warning Message-ID: <2024061312-freebee-buffalo-4bd5@gregkh> References: <2024030649-CVE-2024-26628-f6ce@gregkh> <20240314110938.GM1522089@google.com> <20240320154734.GU1522089@google.com> <2024061335-wistful-brownnose-28ea@gregkh> 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=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jun 13, 2024 at 12:40:35PM +0200, Pavel Machek wrote: > On Thu 2024-06-13 12:16:50, Greg Kroah-Hartman wrote: > > On Thu, Jun 13, 2024 at 11:32:41AM +0200, Pavel Machek wrote: > > > On Wed 2024-03-20 15:47:34, Lee Jones wrote: > > > > 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. > > > > > > So... because it is possible to configure machine to reboot on > > > warning, now every warning is a security issue? > > > > > > Lockdep is for debugging, if someone uses it in production with panic > > > on reboot, they are getting exactly what they are asking for. > > > > > > Not a security problem. > > > > And we agree, I don't know what you are arguing about here, please stop. > > So you agree that WARN triggering randomly is not a security problem? > > Following communication did not say so. > > "The splat in the circular lockdep detection code appears to be generated > using some stacked pr_warn() calls, rather than a WARN()." *plonk*