public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Myers <bpm@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: growfs overruns AGFL buffer on V4 filesystems
Date: Thu, 5 Dec 2013 16:20:19 -0600	[thread overview]
Message-ID: <20131205222019.GN1935@sgi.com> (raw)
In-Reply-To: <1385008866-22256-1-git-send-email-david@fromorbit.com>

On Thu, Nov 21, 2013 at 03:41:06PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> This loop in xfs_growfs_data_private() is incorrect for V4
> superblocks filesystems:
> 
> 		for (bucket = 0; bucket < XFS_AGFL_SIZE(mp); bucket++)
> 			agfl->agfl_bno[bucket] = cpu_to_be32(NULLAGBLOCK);
> 
> For V4 filesystems, we don't have a agfl header structure, and so
> XFS_AGFL_SIZE() returns an entire sector's worth of entries, which
> we then index from an offset into the sector. Hence: buffer overrun.
> 
> This problem was introduced in 3.10 by commit 77c95bba ("xfs: add
> CRC checks to the AGFL") which changed the AGFL structure but failed
> to update the growfs code to handle the different structures.
> 
> Fix it by using the correct offset into the buffer for both V4 and
> V5 filesystems.
> 
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

Applied this one.  I'll add it to an upcoming 3.13 pull request as well.

Thanks,
	Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      parent reply	other threads:[~2013-12-05 22:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21  4:41 [PATCH] xfs: growfs overruns AGFL buffer on V4 filesystems Dave Chinner
2013-11-21  5:42 ` Jeff Liu
2013-12-05 22:20 ` Ben Myers [this message]

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=20131205222019.GN1935@sgi.com \
    --to=bpm@sgi.com \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox