Re: [f2fs-dev] [PATCH] f2fs: check every cur_*_segno[] entry on readonly images
From: patchwork-bot+f2fs
Date: Tue Oct 13 2026 - 18:31:50 EST
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@xxxxxxxxxx>:
On Sat, 19 Sep 2026 00:55:07 +0800 you wrote:
> sanity_check_ckpt() bounds-checks cur_node_segno[] and cur_data_segno[]
> against main_segs, but on an image with the RO feature the goto that skips
> the duplicate-segno cross-checks also leaves the enclosing loop, so only
> index 0 of each array is ever checked.
>
> An unchecked index reaches __set_sit_entry_type() through build_curseg() ->
> reset_curseg(), which writes se->type through &sit_i->sentries[segno]. With
> segment_count_main 120 and cur_data_segno[1] set to 200, KASAN reports
> three out-of-bounds writes during mount and the mount then succeeds.
>
> [...]
Here is the summary with links:
- [f2fs-dev] f2fs: check every cur_*_segno[] entry on readonly images
https://git.kernel.org/jaegeuk/f2fs/c/9c4ee79190c8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html