[lvc-project] [PATCH 6.1 0/1] f2fs: convert to MAX_SBI_FLAG instead of 32 in stat_show()
Fedor Pchelkin
pchelkin at ispras.ru
Sat Sep 28 17:28:32 MSK 2024
On Tue, 24. Sep 05:04, Nikita Zhandarovich wrote:
> This patch addresses an open issue of buffer overflow in
> f2fs function stat_show(). On the off chance that si->sbi->s_flag
Такого шанса текущий код предоставить никак не может. Флаги выставляются
функцией set_sbi_flag(), вызывающейся в f2fs с подходящими флагами из
массива.
Патч является хорошим улучшением надёжности кода для предотвращения
потенциальных ошибок в будущем, но не является материалом для
stable-веток.
Думаю, в Svacer стоит поставить Minor. Severity для предупреждений обычно
рассчитывается исходя из текущего положения дел.
> had one of its bits (on the higher end) set to 1, for_each_set_bit()
> will loop more than s_flag[] can afford, leading in turn to
> erroneous array access.
>
> The issue in question has been fixed in commit 5bb9c111cd98
> ("f2fs: convert to MAX_SBI_FLAG instead of 32 in stat_show()") and
> cherry-picked for 6.1 stable branch.
>
> Modified patch can now be cleanly applied to linux-6.1.y. All of
> the changes made to the patch in order to adapt it are described
> at the end of commit message in [PATCH 6.1 1/1] f2fs: convert to
> MAX_SBI_FLAG instead of 32 in stat_show().
More information about the lvc-project
mailing list