From: "Günther Noack" <gnoack@google.com>
To: "Mickaël Salaün" <mic@digikod.net>
Cc: "Günther Noack" <gnoack3000@gmail.com>,
linux-security-module@vger.kernel.org,
"Paul Moore" <paul@paul-moore.com>,
"Konstantin Meskhidze" <konstantin.meskhidze@huawei.com>
Subject: Re: [RFC 3/4] selftests/landlock: Test ioctl support
Date: Mon, 7 Aug 2023 15:21:49 +0200 [thread overview]
Message-ID: <ZNDv7Q5ugRMd4YAg@google.com> (raw)
In-Reply-To: <20230807.thiepaW9ooWu@digikod.net>
Hi!
On Mon, Aug 07, 2023 at 11:41:48AM +0200, Mickaël Salaün wrote:
> On Mon, Aug 07, 2023 at 09:39:50AM +0200, Günther Noack wrote:
> > We've already tested the inheritance of access rights across different
> > directories and mount points in other tests. I feel that exercising it in all
> > combinations of access rights and inheritance mechanisms makes the tests harder
> > to understand and maintain, and does not give us much additional confidence on
> > top of what we already have. What balance do you want to find there?
>
> Indeed. It should be notted that this new IOCTL access right will be the
> first one to directly apply to both files and directories. It should
> then have the same scope as LANDLOCK_ACCESS_FS_READ i.e., apply to the
> target directory itself and files/directories beneath it.
>
> We then need to test a directory's IOCTL, for instance using FIOQSIZE.
>
> What about this two rules and related access checks, combined with
> already-opened FD?
> - dir_s1d1: always denied (negative test)
> - file1_s1d1: allowed with a rule (checks ACCESS_FILE)
> - dir_s2d1: allowed with a rule (checks directory right)
Ah, that's an excellent point - I had not realized yet that it is different to
the other access rights in that way, and it makes a lot of sense to test that. 👍
I'll dig up one IOCTL command for regular files and one IOCTL command for
directories like FIOQSIZE, which are both not blanket-permitted, and I'll test
it with that, and will make sure to cover the combinations you listed above.
Thanks!
—Günther
--
Sent using Mutt 🐕 Woof Woof
next prev parent reply other threads:[~2023-08-07 13:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 17:17 [RFC 0/4] Landlock: ioctl support Günther Noack
2023-05-02 17:17 ` [RFC 1/4] landlock: Increment Landlock ABI version to 4 Günther Noack
2023-06-19 14:41 ` Mickaël Salaün
2023-05-02 17:17 ` [RFC 2/4] landlock: Add LANDLOCK_ACCESS_FS_IOCTL access right Günther Noack
2023-06-19 14:42 ` Mickaël Salaün
2023-07-14 12:46 ` Günther Noack
2023-07-31 13:42 ` Mickaël Salaün
2023-05-02 17:17 ` [RFC 3/4] selftests/landlock: Test ioctl support Günther Noack
2023-06-19 14:42 ` Mickaël Salaün
2023-08-07 7:39 ` Günther Noack
2023-08-07 9:41 ` Mickaël Salaün
2023-08-07 13:21 ` Günther Noack [this message]
2023-05-02 17:17 ` [RFC 4/4] samples/landlock: Add support for LANDLOCK_ACCESS_FS_IOCTL Günther Noack
2023-05-04 21:12 ` [RFC 0/4] Landlock: ioctl support Mickaël Salaün
2023-05-10 19:21 ` Günther Noack
2023-05-24 21:43 ` Jeff Xu
2023-06-17 9:48 ` Mickaël Salaün
2023-06-20 23:44 ` Jeff Xu
2023-06-21 9:17 ` Mickaël Salaün
2023-06-17 9:47 ` Mickaël Salaün
2023-06-19 16:21 ` Günther Noack
2023-06-19 18:57 ` Mickaël Salaün
2023-07-12 11:08 ` Günther Noack
2023-07-12 11:38 ` Mickaël Salaün
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=ZNDv7Q5ugRMd4YAg@google.com \
--to=gnoack@google.com \
--cc=gnoack3000@gmail.com \
--cc=konstantin.meskhidze@huawei.com \
--cc=linux-security-module@vger.kernel.org \
--cc=mic@digikod.net \
--cc=paul@paul-moore.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 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.