Skip to content

fix(vfs): saturate remaining XFS AG-offset and extent end_offset arithmetic#135

Merged
kernalix7 merged 1 commit into
mainfrom
fix/xfs-ag-offset-end-offset
Jun 23, 2026
Merged

fix(vfs): saturate remaining XFS AG-offset and extent end_offset arithmetic#135
kernalix7 merged 1 commit into
mainfrom
fix/xfs-ag-offset-end-offset

Conversation

@kernalix7

Copy link
Copy Markdown
Owner

Sibling sites to #134 (same parsed-byte overflow class, subsystem-wide sweep):

  • xfs.rs read_ag_headers: i * sb_agblocks * sb_blocksize (+ sb_sectsize) — same three-way product of parsed superblock geometry as inode_offset; a crafted superblock overflows it during mount. Saturate so an out-of-range AG offset fails the read instead of panicking.
  • xfs_inode.rs XfsExtent::end_offset: startoff + blockcount mirrors the contains() overflow fixed in fix(vfs): saturate/checked XFS extent and inode-offset arithmetic #134. Use saturating_add.

…hmetic

Sibling sites to #134 (same parsed-byte overflow class, found by a
subsystem-wide sweep):
- xfs.rs read_ag_headers: i * sb_agblocks * sb_blocksize (+ sb_sectsize)
  is the same three-way product of parsed superblock geometry as
  inode_offset; a crafted superblock overflows it during mount. Saturate
  so an out-of-range AG offset fails the read instead of panicking.
- xfs_inode.rs XfsExtent::end_offset: startoff + blockcount mirrors the
  contains() overflow fixed in #134. Use saturating_add.
@kernalix7 kernalix7 merged commit 0d5215a into main Jun 23, 2026
2 checks passed
@kernalix7 kernalix7 deleted the fix/xfs-ag-offset-end-offset branch June 23, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant