linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 1/2] mke2fs: fix project quota creation
Date: Sun, 22 May 2016 20:49:54 -0400	[thread overview]
Message-ID: <20160523004954.GE6720@thunk.org> (raw)
In-Reply-To: <CAP9B-QmbOm2uAs9-m6E7FQVpWW-GXU-VwshSMS++-m3P-f8ygw@mail.gmail.com>

On Sun, May 22, 2016 at 01:34:59PM +0800, Wang Shilong wrote:
> On Sun, May 22, 2016 at 10:19 AM, Theodore Ts'o <tytso@mit.edu> wrote:
> > Creating a file system with project quotas can fail if mke2fs is built
> > using hardening options.  This is because quota_compute_usage() used
> > ext2fs_get_next_inode() instead of ext2fs_get_inode_full(), and a
> > small inode was passed into quota_data_add, when a large inode needs
> > to be used.  As a result get_dq() would end up dereferencing undefined
> > space in the stack.  Without the hardening options, this would be
> > zero, so "mke2fs -t ext4 -O project.quota -I 256 test.img" would work
> > essentially by accident.
> >
> > Fix this by using ext2fs_get_inode_full() so that a large inode is
> > available to quota_data_inodes().
> >
> > Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> 
> I thought Li Xi sent updated e2fsprogs including this fixing parts.
> maybe because you merged early version patches.

There was a separate patch that broke ABI backwards compatibility of
e2fsprogs' shared libraries, which I rejected on those grounds,
perhaps that's what you thinking of?  It wasn't clear that the patch
was in fact fixing a problem, as opposed to just being a clean up.  So
I didn't realize there was a problem that needed fixing.

  	 	       	     	     	  - Ted

      reply	other threads:[~2016-05-23  0:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-22  2:19 [PATCH 1/2] mke2fs: fix project quota creation Theodore Ts'o
2016-05-22  2:19 ` [PATCH 2/2] e2fsck: fix project quota support Theodore Ts'o
2016-05-22  5:38   ` Wang Shilong
2016-05-22  5:34 ` [PATCH 1/2] mke2fs: fix project quota creation Wang Shilong
2016-05-23  0:49   ` Theodore Ts'o [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=20160523004954.GE6720@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=wangshilong1991@gmail.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;
as well as URLs for NNTP newsgroup(s).