From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) (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 DD4B43CCA0E; Tue, 17 Mar 2026 13:29:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.113 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773754185; cv=none; b=cX+gnGu9U5ncA9bCs3Uph8L1UJ/g/cPCAYs0LrVGUK6MJoo4zqUQHd/8pzSql2my+LLJCm6DS/Jv1/odkltEsaLe5XhjoJp1tz9+1fwqs27qvL3JuvJDuO9OjafEbVevosnj/25FavI669eodgdE9t6GZQq5LgrXYpsxrfxpXMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773754185; c=relaxed/simple; bh=k2fln6WHEFb2hd+ZDL3tV+EuLNFC1N3n1qeZ1Av0mH8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OS27ph4XAszBYcDwjqmCyZZ1atUUcMNOa5vmMzGcem2qGHbmf53b4mYTW43tVjBCcGjnocV67N2j/zUSu3MjVsX8dJDYlUAhC+yGNrpYOsZ5c7NHp6yxug09txAG8fsv3jmeBdTotnIPhY2RmVXoA4vHFIAR7ElDHdgOkLxTCtw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=RvDMt60X; arc=none smtp.client-ip=115.124.30.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="RvDMt60X" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1773754173; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=GoOgYZBq/1s/gphq/ANh1jp5J4i5RkrikJ/DqZVUdIU=; b=RvDMt60XLdavs1ILLtSMpQMlRcGeLDb/9sum6l4i2zFr2ZhUthd4jZSm3SJiGWvrDyyuQPBGb5FbCJ3Haj7j3TIvjS6YJYbhL+/FBp8m0XXnNiq1/kSHR3UQju0bXBVyab6eQV4csdqZnJcYu3fpipR7kCHgzaaumRA5IBjjcUk= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R921e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0X.B94b3_1773754172; Received: from 30.170.14.2(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0X.B94b3_1773754172 cluster:ay36) by smtp.aliyun-inc.com; Tue, 17 Mar 2026 21:29:33 +0800 Message-ID: Date: Tue, 17 Mar 2026 21:29:31 +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 Subject: Re: [PATCH] erofs: harden h_shared_count in erofs_init_inode_xattrs() To: Utkal Singh , linux-erofs@lists.ozlabs.org Cc: xiang@kernel.org, yifan.yfzhao@gmail.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20260317132356.15341-1-singhutkal015@gmail.com> From: Gao Xiang In-Reply-To: <20260317132356.15341-1-singhutkal015@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/3/17 21:23, Utkal Singh wrote: > `u8 h_shared_count` indicates the shared xattr count of an inode. It is > read from the on-disk xattr ibody header, which should be corrupted if > the size of the shared xattr array exceeds the space available in > `xattr_isize`. > > It does not cause harmful consequence (e.g. crashes), since the image is > already considered corrupted, it indeed results in the silent processing > of garbage metadata. > > Let's harden it to report -EFSCORRUPTED earlier. > > Fixes: 47e4937a4a7c ("erofs: move erofs out of staging") > Cc: stable@vger.kernel.org No, please drop the Fixes and Cc since it should not be a bugfix. Thanks, Gao Xiang