Re: [PATCH] xfs: verify inline directory data forks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 15, 2017 at 12:28:55AM -0700, Darrick J. Wong wrote:
> When we're reading or writing the data fork of an inline directory,
> check the contents to make sure we're not overflowing buffers or eating
> garbage data.  xfs/348 corrupts an inline symlink into an inline
> directory, triggering a buffer overflow bug.

I think the check is fine, but from a structural point of view they
are in the wrong place. i.e.  the functions xfs_iformat_local() and
xfs_iflush_fork() should not be doing any content specific checks
and verification. All they do is marshall the fork data to and from
in-memory and on-disk formats - the contents of the forks should be
opaque to them.

IOWs, incoming fork contents validity should be checked in
xfs_iformat_fork() after we call xfs_iformat_local(), outgoing fork
validity is checked in xfs_iflush_int() before calling
xfs_iflush_fork().

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux