Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1403534rbb; Mon, 26 Feb 2024 08:12:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVafHOJdhnUXZOakGUey2QDGXvpzK7DmHFqKCHYOcTis5mY0V41p6uVpr3y1drrDWi/Tdce/5dI+ebiAOpXTE0AjLeDZ/Vo21f+1XTvxg== X-Google-Smtp-Source: AGHT+IGxh6Po90tInZpRWAvG3F87JyAUphchLk1s/KaA6PUY++TB+16llsyy2YyH2M2AtE7FeeLI X-Received: by 2002:a05:6a20:c991:b0:19e:a45e:3b7e with SMTP id gy17-20020a056a20c99100b0019ea45e3b7emr6450754pzb.53.1708963948759; Mon, 26 Feb 2024 08:12:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708963948; cv=pass; d=google.com; s=arc-20160816; b=zuzitXiweLwIqd26W5kyau2OCOKT3zSFkFMSOOfFEMonsMeLaEPYvvvxEeBR+of4ip 2/9WKpQEV2UKlZk2nx1V5DWPg243RslGczoGipliPldbLEDsY/DMsKepRvmMcJ17IOh2 0J/I8nlpy6VuZhEnLXoEeYTCm6vJ8CTeSwHalJbbsMl0QRNo+u4kl9yAexrgpvO8U/HT Q04rQwWTZSZK/g4UNQKS581OSw2xAoJ82cTkcN24fA9mALrZGUxRWChlS1hZDW/Ce574 m51JsdxgPaPATPcIpSsBFFLZcq5k24ErBx2p++zxClgw39KPIbM79nsKpyFQWTCGp7NY kCOw== 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=ZTrj5btay1m4YbXJx1MLUKBoVZMnRUjId/qcFefQeII=; fh=3ynnNE0lEkjBsJ5xbg51H0hQnqZ5DhcMGpaBecNZL6M=; b=kVmNhKHgx7NdFkESw9LhjXzpig7Il+yOo7fpndyFuo1XcKGIVcoxEnak3R+y7LJrwV ZCYUWjxA63wnurSimpfKNyL7SAVDamzCSkDAg/75QAvfKIciNgO6CST/kp98rlx7/sc0 zhKmu8ocSs1PWtvXom8+9I4+DIXvwEkubeUAYeDTEUT6fFOihsatoFxm7x3VUPu+jAAm dc1tjmGIuI/Zh3JZMebv2V/ImUuE16bXSSgsSXiZSCBaH1Xr5+BywbfJRJ2zhmP3d9g2 ggEejcMhA+8RcpN9J1TmlcZtPyUy3Q+qmGuFBj8QKudQwMIukvPDY0rm77f/Nxw6UHLV mJFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xdo2Rm4v; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-81873-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81873-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. [139.178.88.99]) by mx.google.com with ESMTPS id v4-20020a632f04000000b005dc0e9aefeasi3927075pgv.809.2024.02.26.08.12.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:12:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81873-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xdo2Rm4v; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-81873-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81873-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 741D228948E for ; Mon, 26 Feb 2024 16:12:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 318E712C55C; Mon, 26 Feb 2024 16:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xdo2Rm4v" 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 54CFD12BF1C for ; Mon, 26 Feb 2024 16:12:22 +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=1708963942; cv=none; b=II+k8b2r58G34MIvvEmFENI8DhHzh+OlplqVVTfncmKlfZc1QSkvXS8b94QUqeBntquOPbMAeFfifkJDMyDtclnm7nqp8OlHi1aGqPEMVggNOul0l/vWQRLKVI6/qEtDWSkmEel0GrQuKfakQjAJccEv/7LjHdqft6/GLlcB8AY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708963942; c=relaxed/simple; bh=ExcOlxxD1FEHgyOdbKFwYGAt8XNYsDupzatENSCfXDU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FN1bM8LReQEJLq9czSRClUA53dWCBNQcITnz8V1NeVTzQGd1YSocK91Kt5jQPrtmi6cQC4eprciihxkUqn0FOelubgjWYC+G23bvz6thhGYaypRuErBh3V2eVZz6O7buX+nI/i29ceZDotl3pvljfta/5ml03ocxqXp7VRhsaw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xdo2Rm4v; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62CE4C433C7; Mon, 26 Feb 2024 16:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708963941; bh=ExcOlxxD1FEHgyOdbKFwYGAt8XNYsDupzatENSCfXDU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xdo2Rm4vy7+7SO1RGtVXcdCqXwgxhB7ciDLQzf0r5LgRZO1AKHam7h3ibl37tb6VF kRSNpVXDI5WxW7aFHRmQ0AH0zPrO1j/0LUnBB5bh8nNROdYklr2FxDuGcSosSQwSBV sys57+H/6XzsoDHt+W7u/hROM/+pdhOg7vuieu2I= Date: Mon, 26 Feb 2024 17:12:19 +0100 From: Greg Kroah-Hartman To: Michal Hocko Cc: cve@kernel.org, linux-kernel@vger.kernel.org Subject: Re: CVE-2023-52451: powerpc/pseries/memhp: Fix access beyond end of drmem array Message-ID: <2024022652-defective-fretful-3d13@gregkh> References: <2024022257-CVE-2023-52451-7bdb@gregkh> <2024022639-wronged-grafted-6777@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 Mon, Feb 26, 2024 at 04:25:09PM +0100, Michal Hocko wrote: > On Mon 26-02-24 16:06:51, Greg KH wrote: > > On Mon, Feb 26, 2024 at 03:52:11PM +0100, Michal Hocko wrote: > > > On Thu 22-02-24 17:21:58, Greg KH wrote: > > > > Description > > > > =========== > > > > > > > > In the Linux kernel, the following vulnerability has been resolved: > > > > > > > > powerpc/pseries/memhp: Fix access beyond end of drmem array > > > > > > > > dlpar_memory_remove_by_index() may access beyond the bounds of the > > > > drmem lmb array when the LMB lookup fails to match an entry with the > > > > given DRC index. When the search fails, the cursor is left pointing to > > > > &drmem_info->lmbs[drmem_info->n_lmbs], which is one element past the > > > > last valid entry in the array. The debug message at the end of the > > > > function then dereferences this pointer: > > > > > > > > pr_debug("Failed to hot-remove memory at %llx\n", > > > > lmb->base_addr); > > > > > > While this is a reasonable fix and the stable material it is really > > > unclear to me why it has gained a CVE. Memory hotplug is a privileged > > > operation. Could you clarify please? > > > > As you know, history has shown us that accessing out of your allocated > > memory can cause problems, and we can not assume use-cases, as we don't > > know how everyone uses our codebase, so marking places where we fix > > out-of-bound memory accesses is resolving a weakness in the codebase, > > hence a CVE assignment. > > Does that mean that any potentially incorrect input provided by an admin is > considered CVE now? I guess we would need to ban interfaces like > /dev/mem and many others. If you have your system set up to prevent admins from accessing /dev/mem (isn't there a config option for that), and you can access it, then yes, that would be a CVE-worthy issue. But if you configure your system to allow an admin access to /dev/mem then you wanted that :) > > If your systems are not vulnerable to this specific issue, wonderful, no > > need to take it, but why wouldn't you want to take a fix that resolves a > > known weakness? > > I have explicitly said, the fix is reasonable. I just do not see a point > to mark it as CVE. I fail to see any thread model where this would > matter as it would require untrusted privileged actor to trigger it > AFAICS. I am happy to be proven wrong here. We can not determine threat models when filing CVEs as we do not know what your threat model is. All we can do is determine if this resolves a weakness in the system. A use-after-free is a weakness and this resolves that issue. It is up to others to "grade" the CVEs if they want to. There are loads of other orginizations that do that type of thing, taking into consideration specific threat models by which they wish to enforce. If your orginization thinks this is not relevent to your threat model at all, wonderful, you can ignore it :) thanks, greg k-h