mirror-linux/fs/zonefs
Johannes Thumshirn 3a8389d42b zonefs: handle integer overflow in zonefs_fname_to_fno
In zonefs the file name in one of the two directories corresponds to the
zone number.

Here Alexey reported a possible integer overflow in zonefs_fname_to_fno(),
where the parsing of the zone number from the file name can overflow the
'long' data type.

Add a check for integer overflows and if the fno 'long' did overflow
return -ENOENT.

Reported-by: Alexey Dobriyan <adobriyan@gmail.com>
Fixes: d207794aba ("zonefs: Dynamically create file inodes when needed")
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
2026-05-12 07:53:20 +09:00
..
Kconfig zonefs: select CONFIG_CRC32 2021-01-04 09:06:42 +09:00
Makefile zonefs: Reorganize code 2023-01-23 09:25:50 +09:00
file.c mm: add vma_desc_test_all() and use it 2026-04-05 13:53:18 -07:00
super.c zonefs: handle integer overflow in zonefs_fname_to_fno 2026-05-12 07:53:20 +09:00
sysfs.c zonefs: add support for FS_IOC_GETFSSYSFSPATH 2024-08-20 17:46:54 +09:00
trace.h zonefs: widen trace event i_ino fields to u64 2026-03-06 14:31:27 +01:00
zonefs.h zonefs: fix synchronous direct writes to sequential files 2023-08-10 12:59:47 +09:00