From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796562868; b=PqrO/BMmXOPMw7nmKOr1NtUaPB6Y5rOQ+Z36QU8x64AvT3NCaJtK4Xx/DIIUIgycJa1y crrGqOEa+LctP+w2Oh92YLD8eMT56RXtZ512lybA0/OmwNMoi0eggpij+J3Yy79PUovb0 4cE3XDOG0RDQly/0qhb6dnvzfHZlzXbUpEyhW/YXnNGlqLACNM1u32Sa4bjl9ZCyPBke9 Mt7RMn9sm7e5A7cKu3L0iot28162kUXXcHQUzUy0TmFdHG+Ie5kTnphsfz16EQWvIIs1f ULtYOQjOadcNwXNeujrOGhRsDPiclGtn3xnxYxtTIDc7TVhkOvhpXZggffdXsTutLSg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796562868; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=c8L+V8Ae1c88ft1RdGHhwUS823atnSeH6I3Lk2nUcls=; b=asb4ntdNvm0WNz+XSq1ROMSkqbbXz5UDYFsk9OGq9J9kYV227V7o1Qx0fZ9zxEGcEGtD Aljb7X5yofUG+Q3g8E9rPtKAy/4Pb45Gp/TbOCAwGPldPzthtyRSBXY/qtWprVVs1DLPE Sgqk1NJW+m65kBPBhV9e2WLb4QA3p8xK0tJFokIt3vTN+pfdd3cfdqHOLgOpvdrvZEEkA 8pjfI/ezKxuElxnv+K5zidx9VBsFOV9hksm/MA3965vei1vFalQqhG4xPI/1SydxcD7M5 7pBCo0Aaqkw21/wNRehRNPFlC9/AJTOLD9RnR5xN4ae4M4fs2r3SmHr/LD530NFnEVg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=muoHIj8h; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B93F9606A31F for ; Sun, 6 Dec 2026 13:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=muoHIj8h Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CE931F0092B; Sun, 6 Dec 2026 13:14:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796562868; bh=c8L+V8Ae1c88ft1RdGHhwUS823atnSeH6I3Lk2nUcls=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=muoHIj8hxRnO4hOw7m8muVj0hd7sHa4r1wD992Uk8yGKKIhutlXNYiFujyysaqRWW pJv0b6Jzt1cOR5eTzB7UY7gKMHCCFavxA1U8lDP3N9r2mSCXn4DYySU2CdJu3lqyue HyAYyZU7gesT3MKLszshBX7iCtv2eOzftnRNx0lik630n2vuYKbtoJbvQ/zL6kBQfg Wca6ZZhG0wcWQLjNbQ2NKyCmHuMdZ+sghRW55ucuv1T0q1u0WBd1TH//9J3tBj5lIW IZ84QYnX1f8WjEOrbyPgmjfTVW+Chr4u/q2+zZVA59axRoYq9aUI5w4AgTyGZICIM7 1CvVT6B3sGg5A== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] ext4: bound dot and dotdot of dx_root by the dirent tail Reply-To: sashiko-reviews@lists.linux.dev To: "Piyus Kedia" , linux-ext4@vger.kernel.org Cc: tytso@mit.edu In-Reply-To: <20261206125921.1326009-1-piyus@iiitd.ac.in> References: <20261206125921.1326009-1-piyus@iiitd.ac.in> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 13:14:27 +0000 X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > make_indexed_dir() moves out of block 0 everything between the end of > the '..' entry, which it takes at its fixed offset, and the start of > the dirent tail: >=20 > fde =3D &root->dotdot; > de =3D (struct ext4_dir_entry_2 *)((char *)fde + > ext4_rec_len_from_disk(fde->rec_len, blocksize)); > len =3D ((char *) root) + (blocksize - csum_size) - (char *) de; > ... > memcpy(data2, de, len); > memset(de, 0, len); /* wipe old data */ >=20 > ext4_check_dx_root() only rejects a '..' that reaches the end of the > block. With metadata_csum the entries end csum_size (12) bytes > earlier, so a '..' that ends inside the tail passes, and len, an > [ ... ] > Fixes: b0336e8d2108 ("ext4: calculate and verify checksums of directory l= eaf blocks") > Closes: https://lore.kernel.org/r/ext4-dx-root-dotdot.20261206@iiitd.ac.i= n/ > Cc: stable@vger.kernel.org > Signed-off-by: Kapil Vaswani > Signed-off-by: Piyus Kedia Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261206125921.1326= 009-1-piyus@iiitd.ac.in?part=3D1