FAILED: patch "[PATCH] xfs: fix buffer overruns in xfs_ioc_attr_list" failed to apply to 6.6-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 0b9081a774ee7b9dff1e9ac3765b73c1d6bba5b2
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026110440-penalize-refocus-9272@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0b9081a774ee7b9dff1e9ac3765b73c1d6bba5b2 Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <[email protected]>
Date: Tue, 22 Sep 2026 22:58:08 -0700
Subject: [PATCH] xfs: fix buffer overruns in xfs_ioc_attr_list
When we converted the al_offset array in struct xfs_attrlist into a VLA, the size of the object shrank by 4 bytes. Unfortunately, the buffer size validation in the attrlist ioctl wasn't updated to notice this, so the al_offset[0] assignment blindly writes off the end of the buffer. LOLLM noticed the omitted check and complained.
fs/xfs/xfs_handle.c +1 -1
@@ -409,7 +409,7 @@ xfs_ioc_attr_list(void *buffer;int error; -if (bufsize <sizeof (struct xfs_attrlist ) || +if (bufsize <struct_size (alist, al_offset,1 ) || bufsize >XFS_XATTR_LIST_MAX )return -EINVAL ;
Sasha Levin
maintainerPATCH 1/1 xfs: fix buffer overruns in xfs_ioc_attr_list
From: "Darrick J. Wong" <[email protected]>
[ Upstream commit 0b9081a774ee7b9dff1e9ac3765b73c1d6bba5b2 ]
When we converted the al_offset array in struct xfs_attrlist into a VLA, the size of the object shrank by 4 bytes. Unfortunately, the buffer size validation in the attrlist ioctl wasn't updated to notice this, so the al_offset[0] assignment blindly writes off the end of the buffer. LOLLM noticed the omitted check and complained.
--- fs/xfs/xfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_ioctl.c +1 -1
@@ -383,7 +383,7 @@ xfs_ioc_attr_list(void *buffer;int error; -if (bufsize <sizeof (struct xfs_attrlist ) || +if (bufsize <struct_size (alist, al_offset,1 ) || bufsize >XFS_XATTR_LIST_MAX )return -EINVAL ;
Signature · 1 line
2.53.0