freebsd-dev/usr.sbin/fstyp
Jessica Clarke 34fb1c133c Fix intra-object buffer overread for labeled msdosfs volumes
Volume labels, like directory entries, are padded with spaces and so
have no NUL terminator. Whilst the MIN for the dsize argument to strlcpy
ensures that the copy does not overflow the destination, strlcpy is
defined to return the number of characters in the source string,
regardless of the provided dsize, and so keeps reading until it finds a
NUL, which likely exists somewhere within the following fields, but On
CHERI with the subobject bounds enabled in the compiler this buffer
overread will be detected and trap with a bounds violation.

Found by:	CHERI
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D32579
2021-10-27 18:38:37 +01:00
..
tests fstyp: add BeFS support 2021-08-17 18:16:07 +02:00
apfs.c fstyp: bump WARNS to default and work around warnings 2021-09-19 13:52:12 +02:00
befs.c fstyp: add BeFS support 2021-08-17 18:16:07 +02:00
cd9660.c
exfat.c fstyp(8): fix exfat detection 2021-01-17 11:55:06 -08:00
ext2fs.c
fstyp.8 fstyp: add BeFS support 2021-08-17 18:16:07 +02:00
fstyp.c fstyp: bump WARNS to default and work around warnings 2021-09-19 13:52:12 +02:00
fstyp.h fstyp: add BeFS support 2021-08-17 18:16:07 +02:00
geli.c
hammer2_disk.h sbin/fstyp: recgonize Dragonfly's hammer and hammer2. 2019-12-24 19:00:20 +00:00
hammer2.c usr.sbin/fstyp: Fix incorrect pfs_type test in ondisk inode 2020-08-20 05:18:08 +00:00
hammer_disk.h sbin/fstyp: recgonize Dragonfly's hammer and hammer2. 2019-12-24 19:00:20 +00:00
hammer.c fstyp: bump WARNS to default and work around warnings 2021-09-19 13:52:12 +02:00
hfsplus.c fstyp: bump WARNS to default and work around warnings 2021-09-19 13:52:12 +02:00
Makefile fstyp: bump WARNS to default and work around warnings 2021-09-19 13:52:12 +02:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
msdosfs.c Fix intra-object buffer overread for labeled msdosfs volumes 2021-10-27 18:38:37 +01:00
msdosfs.h
ntfs.c Make this compile under external gcc toolchain if WITH_ICONV isn't defined. 2019-12-29 06:59:09 +00:00
ufs.c Move the pointers stored in the superblock into a separate 2020-06-19 01:02:53 +00:00
zfs.c Merge OpenZFS support in to HEAD. 2020-08-25 02:21:27 +00:00