freebsd-dev/sys/ufs/ffs
Mark Johnston ace3d9475c ffs: Avoid out-of-bounds accesses in the fs_active bitmap
We use a bitmap to track which cylinder groups have changed between
snapshot creation and filesystem suspension.  The "legs" of the bitmap
are four bytes wide (see ACTIVESET()) so we must round up the allocation
size to a multiple of four bytes.

I believe this bug is harmless since UMA/kmem_* will both pad the
allocation and zero the full allocation.  Note that malloc() does inline
zeroing when the allocation size is known at compile-time.

Reported by:	pho (using KASAN)
Reviewed by:	kib, mckusick
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27731
2020-12-23 11:16:40 -05:00
..
ffs_alloc.c Add a framework that tracks exclusive vnode lock generation count for UFS. 2020-11-14 05:10:39 +00:00
ffs_balloc.c ffs: do not read full direct blocks if they are going to be overwritten. 2020-11-30 17:03:26 +00:00
ffs_extern.h Handle LoR in flush_pagedep_deps(). 2020-11-14 05:30:10 +00:00
ffs_inode.c Handle LoR in flush_pagedep_deps(). 2020-11-14 05:30:10 +00:00
ffs_rawread.c vmapbuf: don't smuggle address or length in buf 2020-10-21 16:00:15 +00:00
ffs_snapshot.c ffs: Avoid out-of-bounds accesses in the fs_active bitmap 2020-12-23 11:16:40 -05:00
ffs_softdep.c ffs: quiet -Wstrict-prototypes 2020-12-11 22:51:57 +00:00
ffs_subr.c Various new check-hash checks have been added to the UFS filesystem 2020-10-25 00:43:48 +00:00
ffs_suspend.c Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
ffs_tables.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ffs_vfsops.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
ffs_vnops.c Handle LoR in flush_pagedep_deps(). 2020-11-14 05:30:10 +00:00
fs.h Various new check-hash checks have been added to the UFS filesystem 2020-10-25 00:43:48 +00:00
softdep.h This commit enables a UFS filesystem to do a forcible unmount when 2020-05-25 23:47:31 +00:00