On Tue, 1 Nov 2022 22:33:12 -0700, Eric Biggers wrote:
From: Eric Biggers ebiggers@google.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,