projects/linux·commit 89edd36f

Merge tag 'xfs-fixes-6.18-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

89edd36f · Linus Torvalds <[email protected]> · 2025-11-22 10:23:34 -08:00

Pull xfs fix from Carlos Maiolino:
 "A single out-of-bounds fix, nothing special"

* tag 'xfs-fixes-6.18-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: fix out of bounds memory read error in symlink repair
Commit
89edd36fd801efdb3d2f38bbf7791a293c24bb45
Parents
7e29f077 · 678e1cc2

Merge commit. Changes below are compared with the first parent: 7e29f077.

Changes

1 files changed · +1 −1

FileStatusAddDelContent
fs/xfs/scrub/symlink_repair.cmodified+1−1View file

fs/xfs/scrub/symlink_repair.c

View file
diff --git a/fs/xfs/scrub/symlink_repair.c b/fs/xfs/scrub/symlink_repair.c
index 5902398..df62989 100644
--- a/fs/xfs/scrub/symlink_repair.c
+++ b/fs/xfs/scrub/symlink_repair.c
@@ -184,7 +184,7 @@ xrep_symlink_salvage_inline(
sc->ip->i_disk_size == 1 && old_target[0] == '?')
return 0;
- nr = min(XFS_SYMLINK_MAXLEN, xfs_inode_data_fork_size(ip));
+ nr = min(XFS_SYMLINK_MAXLEN, ifp->if_bytes);
memcpy(target_buf, ifp->if_data, nr);
return nr;
}