lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 17 May 2024 16:53:27 +0800
From: "chenyuwen" <yuwen.chen@...z.com>
To: <jaegeuk@...nel.org>, <chao@...nel.org>
Cc: <linux-kernel@...r.kernel.org>
Subject: null pointer exception at fscrypt_set_bio_crypt_ctx

Hi jaegeuk & chao:

We are facing an issue on 6.1 kernel while using f2fs filesystem at startup.
The call stack as follows:

[   14.904678][ T1116] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000011
[   14.904986][ T1116]  fscrypt_set_bio_crypt_ctx+0x78/0x1e8
[   14.904988][ T1116]  f2fs_grab_read_bio+0x78/0x208
[   14.904990][ T1116]  f2fs_submit_page_read+0x44/0x154
[   14.904992][ T1116]  f2fs_get_read_data_page+0x288/0x5f4
[   14.904993][ T1116]  f2fs_get_lock_data_page+0x60/0x190
[   14.904995][ T1116]  truncate_partial_data_page+0x108/0x4fc
[   14.904998][ T1116]  f2fs_do_truncate_blocks+0x344/0x5f0
[   14.904999][ T1116]  f2fs_truncate_blocks+0x6c/0x134
[   14.905000][ T1116]  f2fs_truncate+0xd8/0x200
[   14.905002][ T1116]  f2fs_iget+0x20c/0x5ac
[   14.905004][ T1116]  do_garbage_collect+0x5d0/0xf6c
[   14.905005][ T1116]  f2fs_gc+0x22c/0x6a4
[   14.905007][ T1116]  f2fs_disable_checkpoint+0xc8/0x310
[   14.905009][ T1116]  f2fs_fill_super+0x14bc/0x1764
[   14.905011][ T1116]  mount_bdev+0x1b4/0x21c
[   14.905014][ T1116]  f2fs_mount+0x20/0x30
[   14.905016][ T1116]  legacy_get_tree+0x50/0xbc
[   14.905018][ T1116]  vfs_get_tree+0x5c/0x1b0
[   14.905020][ T1116]  do_new_mount+0x298/0x4cc
[   14.905022][ T1116]  path_mount+0x33c/0x5fc
[   14.905024][ T1116]  __arm64_sys_mount+0xcc/0x15c
[   14.905025][ T1116]  invoke_syscall+0x60/0x150
[   14.905028][ T1116]  el0_svc_common+0xb8/0xf8
[   14.905029][ T1116]  do_el0_svc+0x28/0xa0
[   14.905030][ T1116]  el0_svc+0x24/0x84
[   14.905033][ T1116]  el0t_64_sync_handler+0x88/0xec

According to ramdump, we found that inode->i_crypt_info is NULL.
The error occurred in the following function:

bool __fscrypt_inode_uses_inline_crypto(const struct inode *inode)
{                               
        return inode->i_crypt_info->ci_inlinecrypt;
}
EXPORT_SYMBOL_GPL(__fscrypt_inode_uses_inline_crypto);

The inode->i_crypt_info variable was initialized through the fscryptget_encryption_info
function. Can the f2fs_truncate be called at f2fs_iget when opening file encryption?
______________________________________________________________________
本电子邮件仅供预期收件人使用,本邮件及附件中可能包含保密和专有信息。禁止任何未经授权的查阅、使用、披露或分发。如果您不是预期的收件人,请通过回复电子邮件与发件人联系,并销毁原始邮件的所有副本。
This email is for the intended recipient's use only. This email and its attachments may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ