Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1429300lqd; Thu, 25 Apr 2024 15:47:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCViJmiKkLvJwC3X7oTDXHas9p4SWb9JNuzCRn4bCxakC64PudhP9G5aF8uj3021csuAj8Q2hujTMTb0zkb9m8y5jOpT9L/OvBINe1GgSQ== X-Google-Smtp-Source: AGHT+IHamGZbHF0jQeJuSXH3uovEW+rbZpAkywS+PgkRTzkQ8ZOH5P329Qcg2uNlIUW9w9xi28av X-Received: by 2002:a05:6e02:1a85:b0:36a:a78:f72f with SMTP id k5-20020a056e021a8500b0036a0a78f72fmr1189192ilv.11.1714085278938; Thu, 25 Apr 2024 15:47:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714085278; cv=pass; d=google.com; s=arc-20160816; b=f1MWIv2/YGxe3odtgsfCY4bXgFdILigduHZVK3rzIOaWkF06506iBx2qlzJ7z8ve33 9UvRMHjwZ+D1pJE/Sa1mOBlPJuJTNn1ufmdST2TpBkScdi84NV3QYvAftD3WgfPRRG0q PYYNh8o2WztF2+3U+aTT6SD0vAzk+01PjTxmh1Iy/AgtuMigSAexaaXtdgcnyIIn906K 6Dg0nzpGvcxDH3uxJ8y700XkKIHJrrGd31G4rEtBUNbQcRFaaT+chI2f+YL3Hnug1/15 EwLa117qeJGNQFl9L+Mt/RPFXHlOHtyuVsXc5hPWXmqmEUCmzSo6saEynqBbpwtVar59 So3Q== 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=ZC3pg5ImZ5cpQcMeqKjqfQ5Go+U+qRekmVjKTp+jCBA=; fh=i0DJg7DXf2sKLz9G/bsjDGkWvRodQAB0S+wj9YaJiGg=; b=bF6hhaOHtI1v0Td65UsfXvbwsV6uz8MtApXRAXgYe02BrOXHq5dG8z0ZMPdycp6Mf2 I2lPKNX6i20KK0f24LBihMGYxjndX9z6PvqVskvUztbXC+L9zzk5ae/+eYj6lg5bz8fK 8f7ln1e7Fk+jzxi7c7E+bLMQoIF93zfkwwoxTj1WSfQIq+HDHY7ZUBIB817n624mQUy+ fmLvwjDEkBDSCa63n22S8J9cQWVrHS+sT5MZ3aXzpcrPk6jq/naDcpJFtIaQBYH5+lhs 6kPH6P6hSVl6mwsZzuoSwz+bmKv/5uyShmwNGAd0XXpNKjVqyafRfdoQdibDRnpQTrq9 WDSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uBf7vaIN; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-158937-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158937-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bf21-20020a656d15000000b005dc4a006ee8si8082679pgb.477.2024.04.25.15.47.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 15:47:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158937-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uBf7vaIN; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-158937-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158937-linux.lists.archive=gmail.com@vger.kernel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 94454B2526A for ; Thu, 25 Apr 2024 17:05:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11D2B14D712; Thu, 25 Apr 2024 17:04:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="uBf7vaIN" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 8451A14D6F1; Thu, 25 Apr 2024 17:04:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714064693; cv=none; b=CFTcy0zGEU2xZDPVDioLqRBUkPKh2jwO3dAji/GOsRCrG0ZI8o8SIzIeO5n5CjeE+2X7UXikoW1dut4rFqATmWGuQCkhvZCDHN0oXgMxO6MyXrUHmYhbZojFXUHbGrgW+KxC7YucghJPFryDnE7bw301Pvhz30uCGOAkI9zxDro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714064693; c=relaxed/simple; bh=4V+nwQ62yoOaniGzfu6EhpUzGiATL26RVF2l6yZTAjk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ktzAzbwZGcPQhWwPpYBITZlClE12LcW/26g9FkUgRP15JEa5Cgs6rYwKjy4zeW0JYG22OCmNUKytPR3HhkqhsjZiNURFlgP15npzVgAeJi+CGkuBiD5MIFYjiB61GnwXmjcKDcgUukoPiFg8T1aZgX42QtlCFhjaRRdMuZJzqoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=uBf7vaIN; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZC3pg5ImZ5cpQcMeqKjqfQ5Go+U+qRekmVjKTp+jCBA=; b=uBf7vaINTqulMQSoR6jlevtP6X t0HEUh+4AuUZ+92586alWwxA8tRgGJ2r6xSv+hQr2zHPA627RNj9nOfQ3uMWHU8uDzB2AfcaMXa1m CiQuKncJo60jXO/7ScXBcZiX0sHLPaXIVDpY2QRjt+mnd4TopPNq9H6yBtUeyNexWX3sZ8uUHHpEI tim9gLbvjUbdk8IQKxxTl33x2qKno+oUXYu7J/PHEf0j+KujYGslbW1ryTFHN1i2ui6PZjqCXfBfy oiP/DFQ8LKwWrFMRFJfLoJAQa/maidtdv4hbK2OqSHbE1iqYzgcM6F+LWjaYVSObBv74B1o/9grs7 tZdCOogw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s02We-00000003R0o-0mco; Thu, 25 Apr 2024 17:04:48 +0000 Date: Thu, 25 Apr 2024 18:04:48 +0100 From: Matthew Wilcox To: Jeongjun Park Cc: brauner@kernel.org, jfs-discussion@lists.sourceforge.net, jlayton@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, shaggy@kernel.org, syzbot+241c815bda521982cb49@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com Subject: Re: [PATCH] jfs: Fix array-index-out-of-bounds in diFree Message-ID: References: <20240425142434.47481-1-aha310510@gmail.com> 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: <20240425142434.47481-1-aha310510@gmail.com> On Thu, Apr 25, 2024 at 11:24:34PM +0900, Jeongjun Park wrote: > Matthew Wilcox wrote: > > It should be checked earlier than this. There's this code in > > dbMount(). Why isn't this catching it? > > This vulnerability occurs because a very large value can be passed > to iagp->agstart. So that code doesn't prevent the vulnerability. In your earlier mail, you said the large value was found in db_agl2size. If the problem is in agstart then diRead() is the right place to check it.