]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: prevent private clone if bind mount is not allowed
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 9 Aug 2021 08:19:47 +0000 (10:19 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 10 Aug 2021 08:21:31 +0000 (10:21 +0200)
commit62c609c9118d9980bed0140d548a75eb0e5a8d90
tree36a42e8bcacadc0e2ebb4f6abfc44fecc87efbcf
parent6a295e26634aa33809c5db88c2fc823720b28a63
ovl: prevent private clone if bind mount is not allowed

Add the following checks from __do_loopback() to clone_private_mount() as
well:

 - verify that the mount is in the current namespace

 - verify that there are no locked children

Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de>
Fixes: f59653f022c5 ("vfs: introduce clone_private_mount()")
Cc: <stable@vger.kernel.org> # v3.18
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/namespace.c