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 5/6] ovl: Validate verity xattr when resolving lowerdata
Date: Wed, 26 Apr 2023 14:47:43 -0700 [thread overview]
Message-ID: <20230426214743.GA58528@sol.localdomain> (raw)
In-Reply-To: <df41e9dc96ddad9f9e1e684e39c28f4e097e9d9b.1681917551.git.alexl@redhat.com>
On Thu, Apr 20, 2023 at 09:44:04AM +0200, Alexander Larsson wrote:
> + err = fsverity_get_digest(d_inode(datapath->dentry), actual_digest, &verity_algo);
> + if (err < 0) {
> + pr_warn_ratelimited("lower file '%pd' has no fs-verity digest\n", datapath->dentry);
> + return -EIO;
> + }
> +
> + if (digest_len != hash_digest_size[verity_algo] ||
> + memcmp(required_digest, actual_digest, digest_len) != 0) {
> + pr_warn_ratelimited("lower file '%pd' has the wrong fs-verity digest\n",
> + datapath->dentry);
> + return -EIO;
> + }
> +
> + return 0;
This is incorrect because the digest algorithm is not being compared.
- Eric
next prev parent reply other threads:[~2023-04-26 21:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 7:43 [PATCH 0/6] ovl: Add support for fs-verity checking of lowerdata Alexander Larsson
2023-04-20 7:44 ` [PATCH 1/6] fsverity: Export fsverity_get_digest Alexander Larsson
2023-04-20 7:44 ` [PATCH 2/6] ovl: Break out ovl_entry_path_real() from ovl_i_path_real() Alexander Larsson
2023-04-20 12:12 ` Amir Goldstein
2023-04-20 7:44 ` [PATCH 3/6] ovl: Break out ovl_entry_path_lowerdata() from ovl_path_lowerdata() Alexander Larsson
2023-04-20 12:14 ` Amir Goldstein
2023-04-20 7:44 ` [PATCH 4/6] ovl: Add framework for verity support Alexander Larsson
2023-04-20 8:39 ` Amir Goldstein
2023-04-25 11:19 ` Miklos Szeredi
2023-04-25 13:33 ` Alexander Larsson
2023-04-25 19:07 ` Miklos Szeredi
2023-04-20 7:44 ` [PATCH 5/6] ovl: Validate verity xattr when resolving lowerdata Alexander Larsson
2023-04-20 12:06 ` Amir Goldstein
2023-04-27 7:33 ` Alexander Larsson
2023-04-26 21:47 ` Eric Biggers [this message]
2023-04-27 7:22 ` Alexander Larsson
2023-04-27 17:58 ` Eric Biggers
2023-04-20 7:44 ` [PATCH 6/6] ovl: Handle verity during copy-up Alexander Larsson
2023-04-20 12:17 ` Amir Goldstein
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=20230426214743.GA58528@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