Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2519730lqo; Mon, 20 May 2024 08:15:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX7syObCic8id2gbmLMMUg0fOfZgPO/0HVYEGzQQXFt+MQ8qoxlAks9SGqAZcP/TWbWUFewbGExu7b+HubVC8vfjsXBdbw2jiDKmjGZGw== X-Google-Smtp-Source: AGHT+IFzY9cpSuj9I9OMFUzQrP1NNEZoF40Kw15QzRPLR/cLZsJ9J/h0zAWtiZ+5NkRXOKXzBYfh X-Received: by 2002:a2e:a170:0:b0:2d8:5fe6:820d with SMTP id 38308e7fff4ca-2e51fc34054mr245358381fa.11.1716218127639; Mon, 20 May 2024 08:15:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716218127; cv=pass; d=google.com; s=arc-20160816; b=uzTrMup1NbN2odtET1CNw7zlP5N03r2SkOgS4lCtb71G5VH/oHOHo57CqL7VsaoiiL 7nBrmgs9I3h5SAyn0mcJcLU9GTO9PF6uSR50IgjxaNYwkdNClEsCVk2RNp4TbYyARmMm CvVLwwEHcsM3fw2CXHryQVMxePsK1wRs5F97H4TINLKIi6ovCBPg+YQ7Lea/QfwcIwqn cFW/vvpLNFm5Vqr0DhsMQpl3/H+ZHPNSqs7xtuBYlVx0wmjKk61min9nlGMre7GwL/5A loyWoJYCeuEhp3md8Yy1mXkY3vEuCr3VwYHlA71u7qtABZTOzGtb0+GmmjePuIFB7SO1 5ohw== 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:dkim-signature; bh=txH8gRBcmiZ+FPDAMq+kB7RXfbCSffpiS23t4sam29M=; fh=VrddNpw4D8FkZKIPNY9dRNek6Xik8uq3AtIAyyE5qmA=; b=ybhWNGPFnycBQSJTbhsYOEu2cNaOkNWobEiPDEv4iKHxvv8ZXmPwUX+vQpNpARNCwZ gR64UNEyaN4StIpFu0wrLcA1SsFqHTV+0QBe8J2HOkK+c/rrhJzQYd4/oFxvGAcy8h5P cFpnNihL8f3ky4NZPUm77rbVqvPk+VXs52GAA05Pplzl0Ui53MZWcNRY5v0dfDHpPUdt Mxsj6e70aVJKZejn5oA/wB++TLFr65XyGzL9+JJrauLrD4fawebqRyzG63lpNKi9cYXs xiCenVu+BWEXTBwn35+Zc2EnCqrm+xmx5Yt1Wg8KDE1whGn2h7jEG6Dc8RWCBLe5BKfm SOOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=VLevcejG; dkim=pass header.i=@suse.com header.s=susede1 header.b=VLevcejG; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-183891-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5ce0c6607esi544124166b.4.2024.05.20.08.15.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 08:15:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183891-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=VLevcejG; dkim=pass header.i=@suse.com header.s=susede1 header.b=VLevcejG; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-183891-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 30BC11F21CA5 for ; Mon, 20 May 2024 15:15:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 618241369B7; Mon, 20 May 2024 15:15:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="VLevcejG"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="VLevcejG" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A306F136E26; Mon, 20 May 2024 15:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716218103; cv=none; b=fJr0RryyMEZQN8OdpwPxUZv9Bl4fZp8Wh8UJnZGa+6Z/vw9Y+rWj3zNujlq0Ogf9aQIsxxI+tzGfoYE/RwOxvsqe0qCWdtgBvdpIew3DayoJwSgpaxrTOoCCXnAKuY5ESPWjHgD0hsRZYQSNf9VHpt53Rvk9W9M/lhm4wQDm6+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716218103; c=relaxed/simple; bh=BSQq3nH6BbvG3GwwX7KXj9SSGpe+oFenzMH/FHArVAo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ULSn3828PVOyGietuhCl0T6/r67/rvNyGxxps7qc9XhHEyFSXpfFFXKACrA/oj8RRgunlj5sWbbu6n6/UM/fBJnbUC7Tm2wkBx9LLRem9PYKSRJm687JzCX3UU1oVlFTxccjpmt4MSMY4D+Nte5lyjNmx7SEb4mRRw7KmuNRwZk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=VLevcejG; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=VLevcejG; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 96A1B20E0B; Mon, 20 May 2024 15:14:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1716218099; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=txH8gRBcmiZ+FPDAMq+kB7RXfbCSffpiS23t4sam29M=; b=VLevcejGINAYhrq4LcJ2vAGg8pRqCHvTRldomG8OwDpFInxqFfL3EYvwryIgX2JmepIfO4 Zt1IHePJE+Eav9WY/OzvFEr8qyDurbrgaCcXkKOFAHocomCCy4zFiB6QGBBNB0U6WKlYlv Rej9p3mFPN0LBXLYTMPCP1zm1MahUcA= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1716218099; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=txH8gRBcmiZ+FPDAMq+kB7RXfbCSffpiS23t4sam29M=; b=VLevcejGINAYhrq4LcJ2vAGg8pRqCHvTRldomG8OwDpFInxqFfL3EYvwryIgX2JmepIfO4 Zt1IHePJE+Eav9WY/OzvFEr8qyDurbrgaCcXkKOFAHocomCCy4zFiB6QGBBNB0U6WKlYlv Rej9p3mFPN0LBXLYTMPCP1zm1MahUcA= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7849113A6B; Mon, 20 May 2024 15:14:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id jmNjGvNoS2ZaJwAAD6G6ig (envelope-from ); Mon, 20 May 2024 15:14:59 +0000 Date: Mon, 20 May 2024 17:14:58 +0200 From: Michal Hocko To: cve@kernel.org, linux-kernel@vger.kernel.org, Peter Xu Cc: linux-cve-announce@vger.kernel.org, Greg Kroah-Hartman Subject: Re: CVE-2024-36000: mm/hugetlb: fix missing hugetlb_lock for resv uncharge Message-ID: References: <2024052023-CVE-2024-36000-cfc4@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: <2024052023-CVE-2024-36000-cfc4@gregkh> X-Spam-Level: X-Spamd-Result: default: False [-3.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.998]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo] X-Spam-Score: -3.80 X-Spam-Flag: NO Peter, does b76b46902c2d ("mm/hugetlb: fix missing hugetlb_lock for resv uncharge") really have any security implications? I fail to see any but UFFD is not really my area so I might be missing something very easily. On Mon 20-05-24 11:48:36, Greg KH wrote: > Description > =========== > > In the Linux kernel, the following vulnerability has been resolved: > > mm/hugetlb: fix missing hugetlb_lock for resv uncharge > > There is a recent report on UFFDIO_COPY over hugetlb: > > https://lore.kernel.org/all/000000000000ee06de0616177560@google.com/ > > 350: lockdep_assert_held(&hugetlb_lock); > > Should be an issue in hugetlb but triggered in an userfault context, where > it goes into the unlikely path where two threads modifying the resv map > together. Mike has a fix in that path for resv uncharge but it looks like > the locking criteria was overlooked: hugetlb_cgroup_uncharge_folio_rsvd() > will update the cgroup pointer, so it requires to be called with the lock > held. > > The Linux kernel CVE team has assigned CVE-2024-36000 to this issue. > > > Affected and fixed versions > =========================== > > Issue introduced in 5.10 with commit 79aa925bf239 and fixed in 6.1.91 with commit 4c806333efea > Issue introduced in 5.10 with commit 79aa925bf239 and fixed in 6.6.30 with commit f6c5d21db16a > Issue introduced in 5.10 with commit 79aa925bf239 and fixed in 6.8.9 with commit 538faabf31e9 > Issue introduced in 5.10 with commit 79aa925bf239 and fixed in 6.9 with commit b76b46902c2d > Issue introduced in 5.9.7 with commit f87004c0b2bd > > Please see https://www.kernel.org for a full list of currently supported > kernel versions by the kernel community. > > Unaffected versions might change over time as fixes are backported to > older supported kernel versions. The official CVE entry at > https://cve.org/CVERecord/?id=CVE-2024-36000 > will be updated if fixes are backported, please check that for the most > up to date information about this issue. > > > Affected files > ============== > > The file(s) affected by this issue are: > mm/hugetlb.c > > > Mitigation > ========== > > The Linux kernel CVE team recommends that you update to the latest > stable kernel version for this, and many other bugfixes. Individual > changes are never tested alone, but rather are part of a larger kernel > release. Cherry-picking individual commits is not recommended or > supported by the Linux kernel community at all. If however, updating to > the latest release is impossible, the individual changes to resolve this > issue can be found at these commits: > https://git.kernel.org/stable/c/4c806333efea1000a2a9620926f560ad2e1ca7cc > https://git.kernel.org/stable/c/f6c5d21db16a0910152ec8aa9d5a7aed72694505 > https://git.kernel.org/stable/c/538faabf31e9c53d8c870d114846fda958a0de10 > https://git.kernel.org/stable/c/b76b46902c2d0395488c8412e1116c2486cdfcb2 -- Michal Hocko SUSE Labs