freebsd-dev/sys/geom/label
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
..
g_label_disk_ident.c geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
g_label_ext2fs.c g_label: Handle small sector sizes when tasting 2021-09-07 11:19:29 -04:00
g_label_flashmap.c geom_label: Make glabel labels more trivial by separating the tasting 2020-07-26 00:44:59 +00:00
g_label_gpt.c geom_label: Make glabel labels more trivial by separating the tasting 2020-07-26 00:44:59 +00:00
g_label_iso9660.c g_label: Handle small sector sizes when tasting 2021-09-07 11:19:29 -04:00
g_label_msdosfs.c Fix intra-object buffer overread for labeled msdosfs volumes 2021-10-27 18:38:37 +01:00
g_label_msdosfs.h
g_label_ntfs.c geom_label: Add more validation for NTFS volume tasting 2021-10-04 18:15:06 -04:00
g_label_reiserfs.c g_label: Handle small sector sizes when tasting 2021-09-07 11:19:29 -04:00
g_label_ufs.c geom_label: Partially reinstate old sysinstall(8) workaround 2021-07-21 02:51:25 +01:00
g_label.c g_label: Handle small sector sizes when tasting 2021-09-07 11:19:29 -04:00
g_label.h geom_label: Make glabel labels more trivial by separating the tasting 2020-07-26 00:44:59 +00:00