From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 517BC223DD4 for ; Wed, 5 Aug 2026 01:21:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785892912; cv=none; b=T362cMpRD7oFlejGMMThwK5nQAfcxugBBF8RMsLMXA+uhSP1cZU62z3mDPHdTElUGl3vB6qesxwkPjrFiSjKavQO96GLb4a/W/9HCatNF2Yhrw6V+UA3u0vZ+1USg0NP7hiVdzlhaR21mO+wXbn+/hhYMqZjkW9P90QiwRtWsqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785892912; c=relaxed/simple; bh=YqZ95UAMKesF4GnXF0RCUcBpiquelnKZo6a9r+/tHik=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=m+OhYz2G7EVQWHgHDVEWXeor1KS50/agTvkAhNOl+eQcyf6W3lhFhCjfWzpcOyLIAFTcXsO0j4QuQ4ATasNvCaHaKKpHSiu1H8BqzqOmhKl+lfRKYFIsTPChjbsKtVECA6fztt5Jpg+qsZZ07pMq3krZWIEPmI1Buc/9w9NO4Y8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h59CSk32; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h59CSk32" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF1A11F000E9; Wed, 5 Aug 2026 01:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785892910; bh=3Zh/UIvVuYNV5Caa0rgiPiBgHeVOh9x1UVDC5P4FZ4U=; h=Date:Cc:Subject:To:References:From:In-Reply-To; b=h59CSk32+EojnihjpYX/e6qOv+hMYIJ/hm1YpBh2TrxETQ1f3AWe9aXE5xNIF6HyU rXkf86GvIkn/JdI9PAAoNzXoEwtSMsLipv6sYdz07Cfe/09HNZA0TsplaqHwp1hNgq CFWjU1fe24JYnaGXX/+dXh/zaWXW7RyD892lnWIMfuvCfOLsllnEW5j3t+OhImJWLl QzbF1mzZ8oT67p8xoJJ9u5NTKqywFrbRmy6weWwQHYZM85osdR4cv2cPGp8WAFmuhO PMyR8o+HidT34Tmw5dQ52WxBgZqs6WhDisUSvYYtSYsL3cylfuk02ITtsIeAITIF0z x5Z1he4vJkIxw== Message-ID: <9ac3e5ff-9b8f-407d-9ed1-18cb3c23c040@kernel.org> Date: Wed, 5 Aug 2026 09:21:47 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, Daeho Jeong Subject: Re: [f2fs-dev] [PATCH v3] fsck.f2fs: sanitize invalid segment type during block update To: Daeho Jeong , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com References: <20260804171804.28860-1-daeho43@gmail.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20260804171804.28860-1-daeho43@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/5/26 01:18, Daeho Jeong wrote: > From: Daeho Jeong > > If an invalid segment type (type < 0 || type >= NO_CHECK_TYPE) is read > from SIT during block update, update_block() now validates the type, > reports corruption via ASSERT_MSG(), fixes se->type directly, and falls > back to a valid active curseg type based on its SSA summary block type > when fix_on is enabled. find_next_free_block() also validates want_type to > prevent out-of-bounds accesses. > > Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Thanks,