[BUG] Extent decoding rejects valid maximum lengths and logical endpoints #18

Closed
opened 2026-10-02 04:10:55 +02:00 by erikinkinen · 1 comment
Owner

Summary

Extent readers misinterpret the valid initialized length 0x8000 as an empty unwritten run. Narrowed exclusive endpoints also reject or omit the final logical block.

Reproduction

Use an otherwise admitted leaf with length bytes 00 80, logical start zero and sufficient original device geometry. Separately, use logical start ff ff ff ff and length 01 00. The first encoding represents 32,768 initialized blocks; the second ends exactly at 2^32.

Expected and actual behavior

Both intervals should remain readable, traversable and reclaimable. The affected decoder masks the first length to zero; endpoint arithmetic rejects or omits the second interval.

Environment and identity

Affected source: bfc4f7a4, Integration graph 668915f4. This finding uses format fixtures through the original mounted inode/device; no boot image or hardware reproduction is claimed. Last known working revision is unknown.

Evidence and prior checks

The extent format defines distinct initialized and unwritten maxima. Independent literal controls cover lookup, external traversal, rebuild, reclamation, fast commits and output canaries.

Tracking

Correction: #47.

## Summary Extent readers misinterpret the valid initialized length `0x8000` as an empty unwritten run. Narrowed exclusive endpoints also reject or omit the final logical block. ## Reproduction Use an otherwise admitted leaf with length bytes `00 80`, logical start zero and sufficient original device geometry. Separately, use logical start `ff ff ff ff` and length `01 00`. The first encoding represents 32,768 initialized blocks; the second ends exactly at `2^32`. ## Expected and actual behavior Both intervals should remain readable, traversable and reclaimable. The affected decoder masks the first length to zero; endpoint arithmetic rejects or omits the second interval. ## Environment and identity Affected source: [bfc4f7a4](https://git.erikinkinen.fi/erix/e2fsd/commit/bfc4f7a40817e064bca80207a68c3d3787ef858a), Integration graph [668915f4](https://git.erikinkinen.fi/erix/integration/commit/668915f432276fcef85ee5f60b9af9f1f7d1bd33). This finding uses format fixtures through the original mounted inode/device; no boot image or hardware reproduction is claimed. Last known working revision is unknown. ## Evidence and prior checks The [extent format](https://www.kernel.org/doc/html/latest/filesystems/ext4/ifork.html) defines distinct initialized and unwritten maxima. Independent literal controls cover lookup, external traversal, rebuild, reclamation, fast commits and output canaries. ## Tracking Correction: [#47](https://git.erikinkinen.fi/erix/e2fsd/pulls/47).
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:47 +01:00
Author
Owner

The correction is ready in #47, including the independent format boundaries and interrupted original-journal controls. The issue remains open until the change is merged.

The correction is ready in [#47](https://git.erikinkinen.fi/erix/e2fsd/pulls/47), including the independent format boundaries and interrupted original-journal controls. The issue remains open until the change is merged.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/e2fsd#18
No description provided.