Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1354207 > unrolled thread
| Started by | Seth Forshee <seth.forshee@canonical.com> |
|---|---|
| First post | 2016-03-09 16:20 +0100 |
| Last post | 2016-03-09 21:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/2] fs: Allow bind mounts with locked children on permaenetly empty directories Seth Forshee <seth.forshee@canonical.com> - 2016-03-09 16:20 +0100
Re: [PATCH 1/2] fs: Allow bind mounts with locked children on permaenetly empty directories "Serge E. Hallyn" <serge@hallyn.com> - 2016-03-09 21:40 +0100
| From | Seth Forshee <seth.forshee@canonical.com> |
|---|---|
| Date | 2016-03-09 16:20 +0100 |
| Subject | [PATCH 1/2] fs: Allow bind mounts with locked children on permaenetly empty directories |
| Message-ID | <raO41-1aK-1@gated-at.bofh.it> |
Forbidding a bind mount due to a locked child on a permanently
empty directory provides no security benefit since the
directory cannot contain any contents which have been overmounted
for security reasons.
Cc: stable@vger.kernel.org # v4.1+
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
fs/namespace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/namespace.c b/fs/namespace.c
index 4fb1691b4355..930f5557b1d1 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2065,6 +2065,8 @@ static bool has_locked_children(struct mount *mnt, struct dentry *dentry)
list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) {
if (!is_subdir(child->mnt_mountpoint, dentry))
continue;
+ if (is_empty_dir_inode(child->mnt_mountpoint->d_inode))
+ continue;
if (child->mnt.mnt_flags & MNT_LOCKED)
return true;
--
1.9.1
[toc] | [next] | [standalone]
| From | "Serge E. Hallyn" <serge@hallyn.com> |
|---|---|
| Date | 2016-03-09 21:40 +0100 |
| Subject | Re: [PATCH 1/2] fs: Allow bind mounts with locked children on permaenetly empty directories |
| Message-ID | <raT3H-4HV-1@gated-at.bofh.it> |
| In reply to | #1354207 |
Quoting Seth Forshee (seth.forshee@canonical.com):
> Forbidding a bind mount due to a locked child on a permanently
> empty directory provides no security benefit since the
> directory cannot contain any contents which have been overmounted
> for security reasons.
>
> Cc: stable@vger.kernel.org # v4.1+
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> ---
> fs/namespace.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/namespace.c b/fs/namespace.c
> index 4fb1691b4355..930f5557b1d1 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
> @@ -2065,6 +2065,8 @@ static bool has_locked_children(struct mount *mnt, struct dentry *dentry)
> list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) {
> if (!is_subdir(child->mnt_mountpoint, dentry))
> continue;
> + if (is_empty_dir_inode(child->mnt_mountpoint->d_inode))
> + continue;
>
> if (child->mnt.mnt_flags & MNT_LOCKED)
> return true;
> --
> 1.9.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web