Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2658759lqo; Tue, 14 May 2024 05:49:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULCuK6JaR+v1yLYESckMWZ4I9jaUgkTW+l47UUyYJ/5B6bA84yJwkJH/hsC3omrY3rPtIksOrbmLv3dWv/tWfINjDML+fPGTY+4mC5Rw== X-Google-Smtp-Source: AGHT+IF4+MdnqgQhRfZgTZjDrcZUn0suNDThTj76GslYsGqg9HDxFV6TJ+d+9/L1YixINp3wuT/O X-Received: by 2002:a05:6214:3bc3:b0:6a0:7e1b:94b2 with SMTP id 6a1803df08f44-6a16815037amr163790556d6.16.1715690995407; Tue, 14 May 2024 05:49:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715690995; cv=pass; d=google.com; s=arc-20160816; b=it02Wq5b3Sg4usbjl9uOwVaofsvgo/g8o2CnEUcd5yaFgKkzSdkcjJNmRlDH4MBGdw pi4SWG+ahNLX8r0wYetuqxwz3bWfRtW8Ba9G8MO9IMIVHy54r4EWrKFQrFMXeqiJ+wYN 87hevAfNHu/80F94NbPVEhcRWUXOEakYFKV7GKNtjpgKragLvPkrqVAP3OUjnI+HVNrX rt7AtiFJG7bwoRpRDeJO9GacioPsCmzf9QoaGj6H4gUFk0QnXyEL+q29nQ7gaOgixcNs PfDvMVRYXtHOjSrqmhJ440dfz02nEHqTLoCMAktooSAI47gOWkWAAEfbPr36X6I/bQ1W Ld3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=0ohSg6YjbgbhC4L4yRgqvJkso+JLgw6lS+f326pBTXE=; fh=u4y/xZbUJ1B2e+Ajaw8SgKo4deB+l2rF8y/fpX2Ukyw=; b=abpoy+TiTnslIVqzdPKFHGXbZUAb2rfdMub3fp5dwEXpQfDUiLCldAqumXYn74sZh9 hbM5HJFW3a0M2bMmG1uNZA99swdQZUGv+tevDy0rBUrBmr1Q7kRUB9loydmKWtuL2w0r n13yX9j2Ngl5dnyuVFvuafSnHY2o1J8yL3oe2maNsqC8IDMQvmfnwq9ZPRUTHjzT68EN HwmCYvKc8a84GHGRZ6BT6CLXOoAuVJRrD+oh86BGsSjA1mU428//qRmyO5abpZGGs+Sg MV8aU29c0Xk53uEgHK9CwxZyrUQf9tVIEIf5ISxEukwEDrEgnQ1H0invW6e1yz/yb2/9 hBcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=jqD3WRqS; dkim=pass header.i=@suse.com header.s=susede1 header.b=jqD3WRqS; 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-178672-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178672-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29aac7si119228716d6.199.2024.05.14.05.49.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 05:49:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178672-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=jqD3WRqS; dkim=pass header.i=@suse.com header.s=susede1 header.b=jqD3WRqS; 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-178672-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178672-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 26BDF1C21BC6 for ; Tue, 14 May 2024 12:49:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C09B76CDC0; Tue, 14 May 2024 12:49:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="jqD3WRqS"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="jqD3WRqS" 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 3AF881879; Tue, 14 May 2024 12:49:46 +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=1715690988; cv=none; b=QBaylyeswS1IZxQ9dMZ6956CVtpmPmt+4qwB+pDwB8/xvXL2gVxauQu/h4tYu4ri+nFWlyak8SdZDRjKURazMx5rf4L7WTSnsN/iYz0SZvpecWmGHR/wahfEGjzRXYt5IJZh+yrJnlwXSzl6KD9RA+xsP5v0/HIX1M1ieN5u33A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715690988; c=relaxed/simple; bh=a6K4hHzuy1MYWwstaaqHLrIevHBlIT/S0Pb5gq4hQF4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FVXvmOm0yYVTM13Dzjpj2KIC9bDt/6S/lvwiUNyFcP+aB27Il6Xw6wrPfgLli6l+3aKAznknplpl2/rh6bZfGFAaiZdYt1UTORM9yO10j9uhPg+8DFbt7Sk994GobMZ+Ks6/weZNAY1RGT2WF/0g3hazgGQLrBD2XijDyd+l3DI= 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=jqD3WRqS; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=jqD3WRqS; 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 kunlun.arch.suse.cz (unknown [10.100.128.76]) by smtp-out2.suse.de (Postfix) with ESMTP id 562E460C24; Tue, 14 May 2024 12:49:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715690984; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0ohSg6YjbgbhC4L4yRgqvJkso+JLgw6lS+f326pBTXE=; b=jqD3WRqSkPoffGUASovsNhfpVpL4MMdIkDxsjGMhaBOV29ootingsvOEEaHnrJCVKBG4Td CwgqZ+2DvSOpPzIC5L/pD3Frua3DVabkhFKudocYUfJsflBFu07oA0JCeMM3njOWiNWFns +pRkOo3vKwKI1jzPkyIi8zLOCrkhaFs= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715690984; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0ohSg6YjbgbhC4L4yRgqvJkso+JLgw6lS+f326pBTXE=; b=jqD3WRqSkPoffGUASovsNhfpVpL4MMdIkDxsjGMhaBOV29ootingsvOEEaHnrJCVKBG4Td CwgqZ+2DvSOpPzIC5L/pD3Frua3DVabkhFKudocYUfJsflBFu07oA0JCeMM3njOWiNWFns +pRkOo3vKwKI1jzPkyIi8zLOCrkhaFs= From: Anthony Iliopoulos To: Greg Kroah-Hartman , Christian Brauner , cve@kernel.org, linux-kernel@vger.kernel.org Cc: linux-cve-announce@vger.kernel.org Subject: Re: CVE-2024-26821: fs: relax mount_setattr() permission checks Date: Tue, 14 May 2024 14:49:39 +0200 Message-ID: <20240514124939.77984-1-ailiop@suse.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <2024041702-CVE-2024-26821-de6b@gregkh> References: <2024041702-CVE-2024-26821-de6b@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Flag: NO X-Spam-Score: -2.80 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.981]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[] On Wed, Apr 17, 2024 at 11:44:04AM +0200, Greg Kroah-Hartman wrote: > Description > =========== > > In the Linux kernel, the following vulnerability has been resolved: > > fs: relax mount_setattr() permission checks > > When we added mount_setattr() I added additional checks compared to the > legacy do_reconfigure_mnt() and do_change_type() helpers used by regular > mount(2). If that mount had a parent then verify that the caller and the > mount namespace the mount is attached to match and if not make sure that > it's an anonymous mount. > > The real rootfs falls into neither category. It is neither an anoymous > mount because it is obviously attached to the initial mount namespace > but it also obviously doesn't have a parent mount. So that means legacy > mount(2) allows changing mount properties on the real rootfs but > mount_setattr(2) blocks this. I never thought much about this but of > course someone on this planet of earth changes properties on the real > rootfs as can be seen in [1]. > > Since util-linux finally switched to the new mount api in 2.39 not so > long ago it also relies on mount_setattr() and that surfaced this issue > when Fedora 39 finally switched to it. Fix this. > > The Linux kernel CVE team has assigned CVE-2024-26821 to this issue. This one probably needs to be disputed as it isn't an actual vulnerability, but rather a fix for the mount_setattr which previously didn't allow reconfiguring the real rootfs similar to what the mount syscall always allowed to do. So it merely brings mount_attr up to par with mount in terms of allowing the real rootfs to be reconfigured. Christian, what do you think ? Regards, Anthony