Skip to contentSkip to conversation

f2fs/fscrypt: KASAN: null-ptr-deref in fscrypt_decrypt_pagecache_blocks

f2fs-dev Shuangpeng 1 participant 1 message Mar 29 fscrypt: file system level encryption support

lore
Share & tools
lore

Shuangpeng

author
#0 lore raw

Hi Kernel Maintainers,

I hit the following KASAN report while testing current upstream kernel:

KASAN: null-ptr-deref in fscrypt_decrypt_pagecache_blocks

on commit: bbeb83d3182abe0d245318e274e8531e5dd7a948 (Mar 24 2026)

The reproducer and .config files are here.
https://gist.github.com/shuangpengbai/4bb5d91db54ee2c654b0ca1f1d2a9b47

I’m happy to test debug patches or provide additional information.

[   85.653245][   T53] ==================================================================
[   85.654086][   T53] BUG: KASAN: null-ptr-deref in fscrypt_decrypt_pagecache_blocks (fs/crypto/crypto.c:?)
[   85.654989][   T53] Read of size 1 at addr 0000000000000009 by task kworker/u13:0/53
[   85.655763][   T53]
[   85.656011][   T53] CPU: 1 UID: 0 PID: 53 Comm: kworker/u13:0 Not tainted 7.0.0-rc5-00051-gbbeb83d3182a #38 PREEMPT(full)
[   85.656020][   T53] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
[   85.656026][   T53] Workqueue: f2fs_post_read_wq f2fs_post_read_work
[   85.656039][   T53] Call Trace:
[   85.656044][   T53]  <TASK>
[   85.656047][   T53]  dump_stack_lvl (lib/dump_stack.c:122)
[   85.656057][   T53]  print_report (mm/kasan/report.c:487)
[   85.656095][   T53]  kasan_report (mm/kasan/report.c:597)
[   85.656114][   T53]  fscrypt_decrypt_pagecache_blocks (fs/crypto/crypto.c:?)
[   85.656136][   T53]  fscrypt_decrypt_bio (fs/crypto/bio.c:41)
[   85.656190][   T53]  f2fs_post_read_work (fs/f2fs/data.c:297)
[   85.656197][   T53]  process_scheduled_works (kernel/workqueue.c:3281 kernel/workqueue.c:3359)
[   85.656209][   T53]  worker_thread (kernel/workqueue.c:?)
[   85.656230][   T53]  kthread (kernel/kthread.c:437)
[   85.656243][   T53]  ret_from_fork (arch/x86/kernel/process.c:164)
[   85.656279][   T53]  ret_from_fork_asm (arch/x86/entry/entry_64.S:255)
[   85.656291][   T53]  </TASK>
[   85.656294][   T53] ==================================================================

Best,
Shuangpeng