[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y5Fc8KCMfJ7Yka/x@sol.localdomain>
Date: Wed, 7 Dec 2022 19:41:36 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: Theodore Ts'o <tytso@....edu>
Cc: linux-ext4@...r.kernel.org,
syzbot+ba9dac45bc76c490b7c3@...kaller.appspotmail.com,
linux-fscrypt@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] ext4: don't allow journal inode to have encrypt flag
On Tue, Dec 06, 2022 at 04:01:48PM -0500, Theodore Ts'o wrote:
> On Tue, 1 Nov 2022 22:33:12 -0700, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@...gle.com>
> >
> > Mounting a filesystem whose journal inode has the encrypt flag causes a
> > NULL dereference in fscrypt_limit_io_blocks() when the 'inlinecrypt'
> > mount option is used.
> >
> > The problem is that when jbd2_journal_init_inode() calls bmap(), it
> > eventually finds its way into ext4_iomap_begin(), which calls
> > fscrypt_limit_io_blocks(). fscrypt_limit_io_blocks() requires that if
> > the inode is encrypted, then its encryption key must already be set up.
> > That's not the case here, since the journal inode is never "opened" like
> > a normal file would be. Hence the crash.
> >
> > [...]
>
> Applied, thanks!
>
> [1/1] ext4: don't allow journal inode to have encrypt flag
> commit: 29cef51d8522c4d8953856afaffcaf1b754e4f6c
>
> Best regards,
> --
> Theodore Ts'o <tytso@....edu>
Thanks Ted. Note that I also sent an e2fsprogs patch to make e2fsck fix this
situation: https://lore.kernel.org/r/20221102220551.3940-1-ebiggers@kernel.org
- Eric
Powered by blists - more mailing lists