Re: [Bug report] ufs: fs_cgsize from the superblock indexes struct ufs_buffer_head.bh[8] unchecked - UBSAN out-of-bounds on the first allocation after remount-rw

From: Christian Brauner

Date: Fri Nov 06 2026 - 04:32:42 EST


On Sat, Oct 31, 2026 at 08:30:00PM +0800, Guikun Yang wrote:
> A natural fix is to validate s_cgsize when the superblock is read:
> reject s_cgsize < s_fsize or (s_cgsize >> s_blocksize_bits) > UFS_MAXFRAG,
> which also covers the zero case. Happy to test a patch.

Please send a patch. ufs has no active maintainer and reports for
orphaned or badly maintained filesystems are low priority. Patches
aren't.

--