From: Lizhi Xu <lizhi.xu@windriver.com>
To: <ebiggers@kernel.org>
Cc: <coreteam@netfilter.org>, <davem@davemloft.net>, <fw@strlen.de>,
<jaegeuk@kernel.org>, <kadlec@netfilter.org>, <kuba@kernel.org>,
<linux-fscrypt@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<lizhi.xu@windriver.com>, <netdev@vger.kernel.org>,
<netfilter-devel@vger.kernel.org>, <pablo@netfilter.org>,
<syzbot+340581ba9dceb7e06fb3@syzkaller.appspotmail.com>,
<syzkaller-bugs@googlegroups.com>, <tytso@mit.edu>,
<adilger.kernel@dilger.ca>, <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH V2] ext4: add casefolded feature check before setup encrypted info
Date: Fri, 31 May 2024 11:30:44 +0800 [thread overview]
Message-ID: <20240531033044.1335098-1-lizhi.xu@windriver.com> (raw)
In-Reply-To: <20240531010513.GA9629@sol.localdomain>
On Thu, 30 May 2024 20:11:33 -0700, Eric Biggers wrote:
> > Due to the current file system not supporting the casefolded feature, only
> > i_crypt_info was initialized when creating encrypted information, without actually
> > setting the sighash. Therefore, when creating an inode, if the system does not
> > support the casefolded feature, encrypted information will not be created.
> >
> > Reported-by: syzbot+340581ba9dceb7e06fb3@syzkaller.appspotmail.com
> > Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
> > ---
> > fs/ext4/ialloc.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> > index e9bbb1da2d0a..47b75589fdf4 100644
> > --- a/fs/ext4/ialloc.c
> > +++ b/fs/ext4/ialloc.c
> > @@ -983,7 +983,8 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
> > ei->i_projid = make_kprojid(&init_user_ns, EXT4_DEF_PROJID);
> >
> > if (!(i_flags & EXT4_EA_INODE_FL)) {
> > - err = fscrypt_prepare_new_inode(dir, inode, &encrypt);
> > + if (ext4_has_feature_casefold(inode->i_sb))
> > + err = fscrypt_prepare_new_inode(dir, inode, &encrypt);
> > if (err)
> > goto out;
>
> No, this is not correct at all. This just disables encryption on filesystems
> with the casefold feature.
If filesystems not support casefold feature, Why do I need to setup encrypted
information when creating a directory? Can encrypted information not include *hash?
>
> As I said before, please also use the correct mailing lists.
Added.
Lizhi
next parent reply other threads:[~2024-05-31 3:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240531010513.GA9629@sol.localdomain>
2024-05-31 3:30 ` Lizhi Xu [this message]
2024-05-31 3:34 ` [PATCH V2] ext4: add casefolded feature check before setup encrypted info Eric Biggers
2024-05-31 8:56 ` [PATCH V3] ext4: check hash version and filesystem casefolded consistent Lizhi Xu
2024-06-04 9:27 ` Dan Carpenter
2024-06-04 9:36 ` Lizhi Xu
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=20240531033044.1335098-1-lizhi.xu@windriver.com \
--to=lizhi.xu@windriver.com \
--cc=adilger.kernel@dilger.ca \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=ebiggers@kernel.org \
--cc=fw@strlen.de \
--cc=jaegeuk@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=syzbot+340581ba9dceb7e06fb3@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--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