From mboxrd@z Thu Jan 1 00:00:00 1970 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 D0D643F23DD for ; Tue, 17 Mar 2026 16:53:31 +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=1773766411; cv=none; b=ix9bYCTDDfnlRKgn5PAnU+KqW0IpRSz2d5il9TdXMYwVIAes5/b5ujWjLObXgYK1E8L3YfD5HmQSkCN/dFzMjK19TUjNrnGrQCWc2FayCAAmXnTBa1+vPzXLljgYsmcKBUV9fhND0zULAOfxiQ/o93fhNIXq96tWOhsxNOYO7ZE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773766411; c=relaxed/simple; bh=Tcz0AvYDRdBlJGZ9MVIUdG0twLRlMG4315EGYr87UrM=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D/LYDJy1C+V00QDiSTmM/j0TzZux+9lB+XoYtLtOaOQeU8CU04aIAJmqdYwLmJEL1riZf/HoBQ15+jveufWBg1RCeffQUW1VE+1/Y/uI+z9xdQ9iTkGgphVlAP6I5OjotAU1KQX/QSxax/9ih7uMi2a7HY/8zcr574VOUPb6Up0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Bf3Kb1F4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Bf3Kb1F4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B298FC4CEF7; Tue, 17 Mar 2026 16:53:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773766411; bh=Tcz0AvYDRdBlJGZ9MVIUdG0twLRlMG4315EGYr87UrM=; h=Date:From:To:Subject:References:In-Reply-To:From; b=Bf3Kb1F4jEnViJwaDlA2DdJk2ejqyww+PgnWq4jXe7P25IfBTu0XdzhJKhXELuWEu 9PSkmCQ94gG5hebqWCbXurigNadiooqDs36nD/j2zwaykNV77iaNmisuoiC93qZt/D Tm0tVTbGNu7f3hfrj8L5IWaqX1sIQ7nghJFgRIQF3iiEJGhrBHyWhFS8QPmQmbq0Uz eZWAgkx6+r/d7tSqQ/iMYYtcpR6RE7K6OQ9ClIlfM+Aq2EwZA2NCqZ8dG4ecvwkpD7 wsdYKdGKdnOopht5m1NiBGPpeAY7VSHejLZWJlN99g7UF7wvTk3X03S9Yy3zXl3FV3 9FOvf6ArHrm+Q== Date: Wed, 18 Mar 2026 00:53:26 +0800 From: Gao Xiang To: Utkal Singh , linux-erofs@lists.ozlabs.org, xiang@kernel.org, yifan.yfzhao@linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] erofs: validate h_shared_count in erofs_init_inode_xattrs() Message-ID: Mail-Followup-To: Utkal Singh , linux-erofs@lists.ozlabs.org, xiang@kernel.org, yifan.yfzhao@linux.dev, linux-kernel@vger.kernel.org References: <20260317152439.5738-1-singhutkal015@gmail.com> <20260317164135.24892-1-singhutkal015@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=utf-8 Content-Disposition: inline In-Reply-To: On Wed, Mar 18, 2026 at 12:48:52AM +0800, Gao Xiang wrote: > On Tue, Mar 17, 2026 at 04:41:35PM +0000, Utkal Singh wrote: > > A crafted image can set h_shared_count to a value much larger than > > what xattr_isize allows. The loop in erofs_init_inode_xattrs() then > > reads shared xattr IDs far beyond the inode's xattr region, causing > > an out-of-bounds metadata read. > > > > Add a sanity check ensuring: > > > > h_shared_count <= (xattr_isize - sizeof(erofs_xattr_ibody_header)) / 4 > > > > Return -EFSCORRUPTED when the check fails. > > > > Signed-off-by: Utkal Singh > > What happens with your v3? > > What happens with the commit message and the division? > > Could you explain what happened? BTW, if you insist on this (I don't know if you're just an AI), I will never accept patching made just from AI bots and keep failing all the time. Thanks, Gao Xiang