From: Christoph Hellwig <hch@lst.de>
To: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Christoph Hellwig <hch@lst.de>,
David Howells <dhowells@redhat.com>, Al Viro <viro@zeniv.linux>,
linux-fsdevel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] mount: fix mounting of detached mounts onto targets that reside on shared mounts
Date: Fri, 5 Mar 2021 17:22:37 +0100 [thread overview]
Message-ID: <20210305162237.GA24675@lst.de> (raw)
In-Reply-To: <20210304174155.61792-1-christian.brauner@ubuntu.com>
On Thu, Mar 04, 2021 at 06:41:55PM +0100, Christian Brauner wrote:
> Creating a series of detached mounts, attaching them to the filesystem,
> and unmounting them can be used to trigger an integer overflow in
> ns->mounts causing the kernel to block any new mounts in count_mounts()
> and returning ENOSPC because it falsely assumes that the maximum number
> of mounts in the mount namespace has been reached, i.e. it thinks it
> can't fit the new mounts into the mount namespace anymore.
>
> Depending on the number of mounts in your system, this can be reproduced
> on any kernel that supportes open_tree() and move_mount() with the
> following instructions:
>
> 1. Compile the following program "repro.c" via "make repro"
> > cat repro.c
Can you wire this up for xfstests?
The patch itself looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2021-03-05 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 17:41 [PATCH] mount: fix mounting of detached mounts onto targets that reside on shared mounts Christian Brauner
2021-03-04 18:10 ` Christian Brauner
2021-03-05 16:22 ` Christoph Hellwig [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-06 10:10 Christian Brauner
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=20210305162237.GA24675@lst.de \
--to=hch@lst.de \
--cc=christian.brauner@ubuntu.com \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux \
/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.