From: James Morris <jmorris@namei.org>
To: Alexander Ivanov <amivanov@fastmail.com>
Cc: linux-security-module@vger.kernel.org
Subject: Re: Denying access from sb_umount issue
Date: Tue, 28 Jan 2020 07:58:17 +1100 (AEDT) [thread overview]
Message-ID: <alpine.LRH.2.21.2001280754180.22715@namei.org> (raw)
In-Reply-To: <9e7ccbf8-e640-49b1-8e9c-ffa330b0feef@www.fastmail.com>
On Mon, 27 Jan 2020, Alexander Ivanov wrote:
> The lsm module implementes sb_umount() hook to disable lazy umounts. When access is denied, all consecutive umounts fail. It looks like mount reference count is messed up when sb_umount() return -EPERM. Is it possible that umount syscall assumes do_umount() touches those references and it calls
>
> dput(path.dentry);
> mntput_no_expire(mnt);
>
> regardless of what do_mount() returns?
You mean do_umount()?
There are several other do_umount() error cases which would have the same
behavior, right after security_sb_umount().
What error codes are you seeing for the consecutive failures?
--
James Morris
<jmorris@namei.org>
next prev parent reply other threads:[~2020-01-27 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 20:34 Denying access from sb_umount issue Alexander Ivanov
2020-01-27 20:58 ` James Morris [this message]
2020-01-27 21:10 ` Alexander Ivanov
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=alpine.LRH.2.21.2001280754180.22715@namei.org \
--to=jmorris@namei.org \
--cc=amivanov@fastmail.com \
--cc=linux-security-module@vger.kernel.org \
/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).