Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2507787rdd; Fri, 12 Jan 2024 11:31:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHntDsK/npP4Pwu/TWNBqI4Uo+GJodVFVjDU2QtzBeBwbHdKATtZtMO4cVhjsiHtPE7xoCu X-Received: by 2002:a2e:9ed9:0:b0:2cd:a2e:fbb4 with SMTP id h25-20020a2e9ed9000000b002cd0a2efbb4mr508755ljk.89.1705087906599; Fri, 12 Jan 2024 11:31:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705087906; cv=none; d=google.com; s=arc-20160816; b=HPhJpbyBZx8bTotaxsimbzYp3ycufwFmBzME1Oj7EgHFEtlocjkonHmcaeO5EcSCe2 xLI+I6JGfUtJbTD65S/58WUfoSU2xot5ui+w6nPyCzUPWFm7E2eARkIUIzOYTXPn9D9V NA3EhC2OaqkvlQCP01Q6+dAoEAuvW9jpUnED+nSsbCabBkoYQY82JX30wJp3W2p1Fe33 WVv/CLDWVgoAjiXEIvFd1Gb7h37JtqSqAOKMh8XyvZYO86PeJdV8oBIhtkyjsdLmAr3I 1jhFjIrnIzVMGu1bvYJm7nWu08BhjYZfPb6FKJocvbZ8gwkI9x3IMPyOHRc2PdzZSuDe adzw== ARC-Message-Signature: i=1; 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=YFQmx/a3iiDm1MzmbUG+dHarXEG4XZFrZQQPcp0hA3w=; fh=1sE6yJqxLsdV0ugb+J53LoyFDihqdZ1SU+P/+paWAic=; b=mwcye1pPKJ2ihCDtiTSLeJR3XJ0RJUecejyM5xjt/JnXD9JDuyfJ7e/T7AWaD04T0K 638besZkHkkmV6VPXh8HyGWzSOfhZ3YYSynxaHGAowDQgV51HsA0ctsndRJv4EgpgX1x GUpnNjF2Uvp62OO8oTnqAzIlTA1LZ6dZ6s+IZlH7122EGHyUmkfutjJYIGyUlu/y9PRU G0RRRH4cp6BUkUY8+Xu2Pw0mCobueg0Lgllm9IKqKMo2hKG4u+K1D07j1h/zPS2h8Ikt EsmpJMu6t770UVvL3NLX8ItujXOmiyv0yFfntgp6ZrIsywxMsWjHyppJHFNcBDQ+hZOH qJhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="hv2Wyt/S"; spf=pass (google.com: domain of linux-kernel+bounces-24999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24999-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g2-20020a056402428200b00553dc96be61si1682843edc.285.2024.01.12.11.31.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 11:31:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="hv2Wyt/S"; spf=pass (google.com: domain of linux-kernel+bounces-24999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24999-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 57A2A1F2465E for ; Fri, 12 Jan 2024 19:31:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A48A15E98; Fri, 12 Jan 2024 19:31:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hv2Wyt/S" 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 8B38614F6D; Fri, 12 Jan 2024 19:31:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C207C433F1; Fri, 12 Jan 2024 19:31:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705087893; bh=FvQJcr9tDVeV5tst8ttPoAR1yrrsKUrGxfwyN8pTbuM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hv2Wyt/S8vaNTb/tchv5D88XUyCfkJBo6JFVkePkT93GwR2Rl9JY2ky40Ld7UulEi 9bivVJUyX7QGDVhUNOqNyzPFkK26QvLlYJFb3UAsENrWVme9bzr+JJyBISw+cTlcft VLwK0VeqxJfHiuSpYUOgL4R2qWQFwxJ5lkc7ljIg= Date: Fri, 12 Jan 2024 20:31:30 +0100 From: Greg Kroah-Hartman To: Mikhail Ukhin Cc: Dave Kleikamp , Christian Brauner , Jens Axboe , Jan Kara , jfs-discussion@lists.sourceforge.net, stable@vger.kernel.org, lvc-project@linuxtesting.org, linux-kernel@vger.kernel.org, Mikhail Ivanov , Pavel Koshutin , Artem Sadovnikov Subject: Re: [PATCH 5.10/5.15] jfs: add check if log->bdev is NULL in lbmStartIO() Message-ID: <2024011216-rubdown-buddhist-6d1e@gregkh> References: <20240112165007.4764-1-mish.uxin2012@yandex.ru> 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: <20240112165007.4764-1-mish.uxin2012@yandex.ru> On Fri, Jan 12, 2024 at 07:50:07PM +0300, Mikhail Ukhin wrote: > Fuzzing of 5.10 stable branch shows NULL pointer dereference happens in > lbmStartIO() on log->bdev pointer. The reason for bdev being NULL is the > JFS_NOINTEGRITY flag is set on mount of this fs. When this flag is enabled, > it results in the open_dummy_log function being called, which initializes a > new dummy_log, but does not assign a value to bdev. > > The error is fixed in 5.18 by commit > 07888c665b405b1cd3577ddebfeb74f4717a84c4. > Backport of this commit is too intrusive, so it is more reasonable to apply > a small patch to fix this issue. > > Found by Linux Verification Center (linuxtesting.org) with syzkaller. > > Signed-off-by: Mikhail Ukhin > Signed-off-by: Mikhail Ivanov > Signed-off-by: Pavel Koshutin > Signed-off-by: Artem Sadovnikov > --- > fs/jfs/jfs_logmgr.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Who is using jfs in 5.10 and 5.15? Why not just mark the filesystem as BROKEN there instead? If you need to access your ancient filesystem image just use a newer kernel. For filesystems that are not used in older kernels, work like this feels odd, especially for something just like a NULL dereference which doesn't do much, right? thanks, greg k-h