mbox series

[GIT,PULL] xfs: legacy Irix ioctl housecleaning for 5.17-rc1, part 1

Message ID 20220120184553.GO13540@magnolia (mailing list archive)
State New, archived
Headers show
Series [GIT,PULL] xfs: legacy Irix ioctl housecleaning for 5.17-rc1, part 1 | expand

Pull-request

git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/xfs-5.17-merge-5

Message

Darrick J. Wong Jan. 20, 2022, 6:45 p.m. UTC
Hi Linus,

This is the second of a series of small pull requests that perform some
long overdue housecleaning of XFS ioctls.  This time, we're vacating the
implementation of all variants of the ALLOCSP and FREESP ioctls, which
are holdovers from EFS in Irix, circa 1993.  Roughly equivalent
functionality have been available for both ioctls since 2.6.25 (April
2008):

XFS_IOC_FREESP ftruncates a file.

XFS_IOC_ALLOCSP is the equivalent of fallocate.

As noted in the fix patch for CVE 2021-4155, the ALLOCSP ioctl has been
serving up stale disk blocks since 2000, and in 21 years **nobody**
noticed.  On those grounds I think it's safe to vacate the
implementation.

Note that we lose the ability to preallocate and truncate relative to
the current file position, but as nobody's ever implemented that for the
VFS, I conclude that it's not in high demand.

As usual, I did a test-merge with upstream master as of a few minutes
ago.  There's a single merge conflict due to the fixpatch that we merged
right before 5.16 that can be resolved by deleting the function.  Please
let me know if you encounter any problems.

--D

The following changes since commit 9dec0368b9640c09ef5af48214e097245e57a204:

  xfs: remove the XFS_IOC_FSSETDM definitions (2022-01-17 09:16:40 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/xfs-5.17-merge-5

for you to fetch changes up to 4d1b97f9ce7c0d2af2bb85b12d48e6902172a28e:

  xfs: kill the XFS_IOC_{ALLOC,FREE}SP* ioctls (2022-01-17 09:16:41 -0800)

----------------------------------------------------------------
Remove the XFS_IOC_ALLOCSP* and XFS_IOC_FREESP* ioctl families.

Linux has always used fallocate as the space management system call,
whereas these Irix legacy ioctls only ever worked on XFS, and have been
the cause of recent stale data disclosure vulnerabilities.  As
equivalent functionality is available elsewhere, remove the code.

----------------------------------------------------------------
Darrick J. Wong (1):
      xfs: kill the XFS_IOC_{ALLOC,FREE}SP* ioctls

 fs/xfs/xfs_bmap_util.c |  7 ++--
 fs/xfs/xfs_bmap_util.h |  2 +-
 fs/xfs/xfs_file.c      |  3 +-
 fs/xfs/xfs_ioctl.c     | 92 +++-----------------------------------------------
 fs/xfs/xfs_ioctl.h     |  6 ----
 fs/xfs/xfs_ioctl32.c   | 27 ---------------
 6 files changed, 10 insertions(+), 127 deletions(-)

Comments

pr-tracker-bot@kernel.org Jan. 21, 2022, 6:56 a.m. UTC | #1
The pull request you sent on Thu, 20 Jan 2022 10:45:53 -0800:

> git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/xfs-5.17-merge-5

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/b3bb9413e717b44e4aea833d07f14e90fb91cf97

Thank you!