fsverity.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Alexander Larsson <alexl@redhat.com>
Cc: miklos@szeredi.hu, linux-unionfs@vger.kernel.org,
	amir73il@gmail.com, tytso@mit.edu, fsverity@lists.linux.dev
Subject: Re: [PATCH v2 5/6] ovl: Validate verity xattr when resolving lowerdata
Date: Sun, 14 May 2023 12:16:47 -0700	[thread overview]
Message-ID: <20230514191647.GD9528@sol.localdomain> (raw)
In-Reply-To: <b58e57955e122b5d6c4e087cf2dd6ed664152c7b.1683102959.git.alexl@redhat.com>

On Wed, May 03, 2023 at 10:51:38AM +0200, Alexander Larsson wrote:
> When resolving lowerdata (lazily or non-lazily) we check the
> overlay.verity xattr on the metadata inode, and if set verify that the
> source lowerdata inode matches it (according to the verity options
> enabled).

Keep in mind that the lifetime of an inode's fsverity digest is from when it is
first opened to when the inode is evicted from the inode cache.

If the inode gets evicted from cache and re-instantiated, it could have been
arbitrarily changed.

Given that, does this verification happen in the right place?  I would have
expected it to happen whenever the file is opened, but it seems you do it when
the dentry is looked up instead.  Maybe that works too, but I'd appreciate an
explanation.

- Eric

  parent reply	other threads:[~2023-05-14 19:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03  8:51 [PATCH v2 0/6] ovl: Add support for fs-verity checking of lowerdata Alexander Larsson
2023-05-03  8:51 ` [PATCH v2 1/6] fsverity: Export fsverity_get_digest Alexander Larsson
2023-05-03  8:51 ` [PATCH v2 2/6] ovl: Break out ovl_e_path_real() from ovl_i_path_real() Alexander Larsson
2023-05-03  8:51 ` [PATCH v2 3/6] ovl: Break out ovl_e_path_lowerdata() from ovl_path_lowerdata() Alexander Larsson
2023-05-03  8:51 ` [PATCH v2 4/6] ovl: Add framework for verity support Alexander Larsson
2023-05-03 11:51   ` Amir Goldstein
2023-05-14 19:22   ` Eric Biggers
2023-05-15  5:44     ` Alexander Larsson
2023-05-15  6:00       ` Eric Biggers
2023-05-15  6:46         ` Alexander Larsson
2023-05-03  8:51 ` [PATCH v2 5/6] ovl: Validate verity xattr when resolving lowerdata Alexander Larsson
2023-05-03 15:35   ` Amir Goldstein
2023-05-14 19:16   ` Eric Biggers [this message]
2023-05-14 21:00     ` Amir Goldstein
2023-05-15  6:14       ` Alexander Larsson
2023-06-09 13:03         ` Amir Goldstein
2023-06-10 15:02           ` Alexander Larsson
2023-06-11 11:20             ` Amir Goldstein
2023-06-12 10:32               ` Alexander Larsson
2023-06-16  5:07                 ` Amir Goldstein
2023-06-16  5:24                   ` Eric Biggers
2023-06-16  5:55                     ` Amir Goldstein
2023-06-16  7:50                       ` Alexander Larsson
2023-06-16  8:12                         ` Amir Goldstein
2023-06-16  8:39                           ` Alexander Larsson
2023-06-16  9:27                             ` Amir Goldstein
2023-06-16 11:33                               ` Alexander Larsson
2023-06-16 12:24                                 ` Amir Goldstein
2023-06-16 12:28                                   ` Miklos Szeredi
2023-06-16 13:14                                 ` Gao Xiang
2023-05-15  6:12     ` Alexander Larsson
2023-05-03  8:51 ` [PATCH v2 6/6] ovl: Handle verity during copy-up Alexander Larsson
2023-05-03 15:33   ` Amir Goldstein
2023-05-14 19:09 ` [PATCH v2 0/6] ovl: Add support for fs-verity checking of lowerdata Eric Biggers
2023-05-14 21:25   ` Amir Goldstein
2023-05-14 22:19     ` Gao Xiang
2023-05-15  5:55     ` Alexander Larsson

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=20230514191647.GD9528@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=alexl@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=fsverity@lists.linux.dev \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=tytso@mit.edu \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).