Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp742114lqb; Wed, 17 Apr 2024 09:23:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUZeLh6D1MEnYMPUbxcCtVU8cILL5BCSOKh027xLvEQ2HDiMl8P0x52ugKzrFYPQoZDHfN9Ngz3xmzHFV9+wiFX4kdPLB3ku1iq7DcLUw== X-Google-Smtp-Source: AGHT+IHK6/MbBMjPTm+3H6+eg11Xom09rX786Bg/vupFeRFUeQuw5qXd3MYJ9K/IEsY9AuT7H9rr X-Received: by 2002:a2e:9b8e:0:b0:2d4:676b:f591 with SMTP id z14-20020a2e9b8e000000b002d4676bf591mr12558194lji.45.1713371027733; Wed, 17 Apr 2024 09:23:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713371027; cv=pass; d=google.com; s=arc-20160816; b=LJ2rOe9mFxjzdsXFAyjUxPzQHw3tcwcfr4tiEEk0Xc5zrWeUd1Tyroj+OWi8zrJDud 4Nv8N1GJhw5NNiLS9/K+seyyPC/xVenCbzqlgDFzxVzABUolKG60ckun30SAFlszITNN GJpYb0xztWR1RCUt5QEnKe0VLmxyaRJdesMvXAr/lVI2pn2SUinL8zT0LQKJJDZi+3kn kK93Yi18A9sLLjYaaixcTDyS1+sleHpyJRq/Q9tYABcZ4LV7tBkuvLY+vIfcGOzkOnPp EiVKZvXb/DwTdTkCfAKphlB2lozZhLIQsuO2758H04WEwavZR0Py/KmuIbWx34DM8wTE s8XA== 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=v2bZbucQ/TyBooEhHWDmInRvUSez8yZiWOijqho0Bm4=; fh=6lI5C7hOtTaZbXUapA3UliHiiDMmeRDXFNCt11MYD9E=; b=g2hZ7vNG0vc695nKEFTy8Nko3w58vNQmxK4LSylv1QrexC5bvTws+UAZuhWzuMqCq9 ukNEd/TviHsj4WuZEtJaExrjEZJv80yd0H//2TgqUjixBMGf5tzWwZjpcBAAJe0ujVTH 6s6XemxBGzPVAOJeGfSbKU4lLSNHgCxP5IzTu0l2Damel9xpHar2OnAIwbbGb9UiR2Xb g1r50S5QxVhAPSa0Bu3ihwzvr7TQ0qhgqLK1I9VtR+2NwTlcYHY0sRnGyOn1mfpZlbnr EnKSLN8FgH3F46aHdsg/p4yDv9/Hz+Fqa1ha0y/jIpm8lWp4uBybxznYgF/bp2WJlYrn 4jfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CjR2UGc2; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-148888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u10-20020a170906b10a00b00a51cba07d6esi6669460ejy.909.2024.04.17.09.23.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 09:23:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148888-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=@linuxfoundation.org header.s=korg header.b=CjR2UGc2; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-148888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148888-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3DBAA1F25F75 for ; Wed, 17 Apr 2024 16:13:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35BA115CD68; Wed, 17 Apr 2024 16:12:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CjR2UGc2" 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 501A2148301; Wed, 17 Apr 2024 16:12:07 +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=1713370327; cv=none; b=nDUdXtO3C85t9puc8Hk2JJlisDNejWe/MFYR5bEiCUkTHV9hAhARoNMs0rEqT9MWdWdxSPZMZavRfyrIV4ctvikA//7rvPvAAi2y359HgeG1VU5uwj0oN+bgmjiLwXEAXEVGwBeLZ3C+QQViKc1NOaYyj53VM2yeP/kdaubaRxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713370327; c=relaxed/simple; bh=jbAl9YGRV+m0s6w3JK8bIOEhkk4DQL0onrbhGATCGow=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZC+IWnbTDMTd13U6tj9gUcZhF0p42dwwsB/vnooNF+Y+QpLpB/kDZOLi/oG1ZzgwTc0vlVrS2Z3OSLgiBkIiXgIRyGrVXIDly/K+96OT8zoYbfLXQz6J3Jw2tVVI+WYyoGbH99vMF+089hzLNu/Nln/h/uwlkrSG1A3KKcCMt0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CjR2UGc2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93EBDC072AA; Wed, 17 Apr 2024 16:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713370327; bh=jbAl9YGRV+m0s6w3JK8bIOEhkk4DQL0onrbhGATCGow=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CjR2UGc2nIYu0UdSHjbiMTBGYEFbbQN8GymUL9EjMFGEmpOXXd61WD8UDm+9VuTAb drfITlhpFu5PtqW3bba6lDIdrCp0G7VRL0OKUfTIw1aTeprVqsnF+Nv1s0K4VdI79c 3593StFBnSW1GvERzNTWmzlBeZVjRbezd6eZXaw8= Date: Wed, 17 Apr 2024 18:12:04 +0200 From: Greg Kroah-Hartman To: Jan Kara Cc: cve@kernel.org, linux-kernel@vger.kernel.org, linux-cve-announce@vger.kernel.org Subject: Re: CVE-2024-26774: ext4: avoid dividing by 0 in mb_update_avg_fragment_size() when block bitmap corrupt Message-ID: <2024041721-reboot-squall-310e@gregkh> References: <2024040308-CVE-2024-26774-52d9@gregkh> <20240417114324.c77wuw5hvjbm6ok5@quack3> <2024041711-chapter-uninstall-b1d3@gregkh> <20240417145446.uh2rqcbxlebnkbfm@quack3> 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: <20240417145446.uh2rqcbxlebnkbfm@quack3> On Wed, Apr 17, 2024 at 04:54:46PM +0200, Jan Kara wrote: > On Wed 17-04-24 15:30:03, Greg Kroah-Hartman wrote: > > On Wed, Apr 17, 2024 at 01:43:24PM +0200, Jan Kara wrote: > > > Hello! > > > > > > On Wed 03-04-24 19:31:41, Greg Kroah-Hartman wrote: > > > > Description > > > > =========== > > > > > > > > In the Linux kernel, the following vulnerability has been resolved: > > > > > > > > ext4: avoid dividing by 0 in mb_update_avg_fragment_size() when block bitmap corrupt > > > > > > > > Determine if bb_fragments is 0 instead of determining bb_free to eliminate > > > > the risk of dividing by zero when the block bitmap is corrupted. > > > > > > > > The Linux kernel CVE team has assigned CVE-2024-26774 to this issue. > > > > > > I'd like to understand what is the imagined security threat fixed by this > > > patch (as multiple patches of similar nature got assigned a CVE). The patch > > > fixes a bug that if a corrupted filesystem is read-write mounted, we can do > > > division-by-zero. Now if you can make the system mount a corrupted > > > filesystem, you can do many interesting things to the system other than > > > create a division by zero... So what is the presumed threat model here? > > > > Exactly what you said, "if you mount a corrupted file system, you will > > get a divide by zero fault." > > > > Many systems auto-mount any filesystem plugged into it. If yours do > > not, then yours does not need to worry about this type of CVE. > > OK, understood. But let me state that with the current state of affairs in > the filesystem land, it will not take a determined attacker long to get > arbitrary code execution out of "maliciously corrupted fs mounted". The > code of most filesystems has simply never been written with the assumption > that it can be presented with malicious data and we have hundreds of > thousands lines of code like that. We have fixed the most glaring problems > but by far not all (partly because of performance and maintenance costs, > partly because they are baked into on-disk formats). I totally agree. It's up to the distros to stop doing this if they wish to stop this problem from happening. thanks, greg k-h