Re: [PATCH 4/4] xfs: validate v5 feature fields

Dave Chinner
2022-05-03T21:26:23Z

On Tue, May 03, 2022 at 08:00:48AM -0700, Christoph Hellwig wrote:
> > + /* Now check all the required V4 feature flags are set. */
>
> V5?

It's checking the required v4 feature flags for v5 filesystems are
set. I'll clarify it on commit, something like:

/*
* Check that all the V4 feature flags that V5 filesystems
* require are correctly set.
*/

> Otherwise this looks good modulo the buildbot warning about the missing
> static. A more verbose and decriptive commit log would be nice, though.

*nod*. I was just pissed off at having to waste an entire day on
unplanned fuzzer whack-a-mole for yet more "cannot happen in the
real world without malicious tampering" issues.

This one was caused by a fuzzer setting the version number to 5 and
then clearing the dirv2 bit and recalculating the CRC causing the
xfs_da_mount() to fire an assert that the dirv2 bit wasn't set. The
other fuzzed filesystems also had other v4 features bits cleared.

> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

-Dave.
--
Dave Chinner
david@fromorbit.com