linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Enrico Mioso <mrkiko.rs@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: Bug in mount options handling in EXT4?
Date: Wed, 04 Feb 2015 22:52:59 -0600	[thread overview]
Message-ID: <54D2F72B.2040408@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.03.1502050525310.1476@gmail.com>

On 2/4/15 10:26 PM, Enrico Mioso wrote:
> That's fine - as long as we can say that a possibly very very big of "nobarrier" options could be stored some place in memory and cause damage.
> Thank you for the reply and attention.
> Please - don't remove me from CC as I am not subscribed to any list.
> 
> Enrico

Hm, I see now that every "remount" extends the string, that wasn't quite clear from your first email (I thought you simply specified the same option multiple times):

> sudo mount -t ext4 -o rw,noatime,nobarrier,nobarrier,nobarrier, ... 

On my system, remounting with nobarrier a loop eventually fails with:

[mntent]: line 13 in /etc/mtab is bad; rest of file ignored
mount: can't find mnt in /etc/fstab or /etc/mtab

But that's not super graceful.  Anyway, this has a bit to do with how util-linux
manages /etc/mtab too, I guess.

On a system where /etc/mtab links to /proc/mounts, I don't see that behavior.

I do think that the length of the string copied from the user during mount (which is what's going on here) is properly sanitized in copy_mount_options().

-Eric

      reply	other threads:[~2015-02-05  4:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05  3:22 Bug in mount options handling in EXT4? Enrico Mioso
2015-02-05  3:57 ` Eric Sandeen
2015-02-05  4:26   ` Enrico Mioso
2015-02-05  4:52     ` Eric Sandeen [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=54D2F72B.2040408@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrkiko.rs@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).