freebsd-dev/tools
Jessica Clarke 5b13fa7987 ufs: Rework shortlink handling to avoid subobject overflows
Shortlinks occupy the space of both di_db and di_ib when used. However,
everywhere that wants to read or write a shortlink takes a pointer do
di_db and promptly runs off the end of it into di_ib. This is fine on
most architectures, if a little dodgy. However, on CHERI, the compiler
can optionally restrict the bounds on pointers to subobjects to just
that subobject, in order to mitigate intra-object buffer overflows, and
this is enabled in CheriBSD's pure-capability kernels.

Instead, clean this up by inserting a union such that a new di_shortlink
can be added with the right size and element type, avoiding the need to
cast and allowing the use of the DIP macro to access the field. This
also mirrors how the ext2fs code implements extents support, with the
exact same structure other than having a uint32_t i_data[] instead of a
char di_shortlink[].

Reviewed by:	mckusick, jhb
Differential Revision:	https://reviews.freebsd.org/D33650
2022-01-02 20:55:36 +00:00
..
boot CI: add arm64 support to ci-qemu-test.sh 2021-06-26 14:26:41 -04:00
bsdbox ncurses: only keep the version with widechar support 2021-01-05 14:01:32 +01:00
build kboot: Add docs for WITH/WITHOUT LOADER_KBOOT 2021-12-30 16:06:53 -07:00
bus_space Add support for Python 3 and make it the default. 2019-06-30 02:29:12 +00:00
coccinelle copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
debugscripts since kld_deb.py was removed a while back, this script isn't useful 2020-08-11 22:33:56 +00:00
diag ufs: Rework shortlink handling to avoid subobject overflows 2022-01-02 20:55:36 +00:00
ifnet
kerneldoc twa: Remove 2021-11-25 00:45:13 -07:00
LibraryReport
lua Move ifconfig SFP status functionality into libifconfig 2020-08-09 16:27:28 +00:00
pkgbase Add pkgbase METALOG parse/check tool 2020-05-10 16:11:19 +00:00
regression Fix a few typos in source code comments 2021-08-14 09:39:17 +02:00
sched
test stress2: Fix "set-but-not-unused" warnings 2021-12-25 07:27:25 +00:00
tools tinybsd: Remove 2021-12-30 15:57:22 -07:00
uma/smrstress Fix the smrstress build after r358400. 2020-08-05 17:26:20 +00:00
install.sh Fix handling -U. It does not take any arguments. 2017-11-27 02:28:40 +00:00
make_libdeps.sh Improve the library dependencies helper script in src/tools. 2017-11-16 15:26:39 +00:00
README
tinder.sh

$FreeBSD$

This directory tree contains tools used for the maintenance and
testing of FreeBSD.  There is no toplevel Makefile structure since
these tools are not meant to be built as part of the standard system,
though there may be individual Makefiles in some of the subdirs.

Please read the README files in the subdirs for further information.