From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: xfs <linux-xfs@vger.kernel.org>, Brian Foster <bfoster@redhat.com>
Subject: Re: [PATCH] xfs: verify inline directory data forks
Date: Fri, 17 Mar 2017 08:12:56 +1100 [thread overview]
Message-ID: <20170316211255.GU17542@dastard> (raw)
In-Reply-To: <20170315072855.GA5280@birch.djwong.org>
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@fromorbit.com
next prev parent reply other threads:[~2017-03-16 21:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 7:28 [PATCH] xfs: verify inline directory data forks Darrick J. Wong
2017-03-15 15:00 ` Brian Foster
2017-03-15 17:45 ` Darrick J. Wong
2017-03-16 21:12 ` Dave Chinner [this message]
2017-03-27 17:10 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170316211255.GU17542@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.