freebsd-dev/stand
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
..
arm64 Add an loader command on arm64 to sync the cache 2021-12-20 13:58:36 +00:00
common loader.efi: to preserve heap space, use AllocatePages() for shadow_fb 2021-12-22 11:39:28 +02:00
defaults loader: Set twiddle globaldiv to 16 by default 2021-09-28 15:24:02 -07:00
efi loader.efi: to preserve heap space, use AllocatePages() for shadow_fb 2021-12-22 11:39:28 +02:00
fdt loader: Fix dtb loading 2021-07-05 15:53:08 +02:00
ficl ficl: Fix a typo in a comment 2021-11-30 10:36:29 +01:00
ficl32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
fonts loader: really use bold font for vga text mode 2021-01-08 01:24:30 +02:00
forth loader: support.4th resets the read buffer incorrectly 2021-07-28 13:50:38 -06:00
i386 loader: narrow the scope of gfx frame buffer wrt tg supported kernels 2021-12-14 15:27:47 -07:00
images loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
kboot kboot: move to generic syscall interface 2021-12-30 16:07:20 -07:00
kshim Fix build of stand/usb . 2021-04-12 16:13:33 +02:00
liblua EFI secure boot VECTX related changes 2021-04-30 12:53:45 -05:00
liblua32 Add Lua as a scripting langauge to /boot/loader 2018-02-12 15:31:53 +00:00
libofw powerpc64le: stand fixes 2021-10-20 15:48:33 -03:00
libsa ufs: Rework shortlink handling to avoid subobject overflows 2022-01-02 20:55:36 +00:00
libsa32 Enable veriexec for loader 2019-02-26 06:22:10 +00:00
lua loader: lua: test that /boot exists first 2021-12-16 11:50:45 +01:00
man loader_lua.8: Fix first version 2021-09-29 17:18:51 -06:00
powerpc kboot: Move powerpc kboot to top level 2021-12-30 16:07:06 -07:00
uboot stand/uboot: reorg 2021-12-14 21:09:53 -07:00
usb stand: remove mips support 2021-12-10 11:05:31 -07:00
userboot stand/userboot: Kill set but unused variables 2021-12-15 19:48:40 -07:00
defs.mk stand: remove mips support 2021-12-10 11:05:31 -07:00
fdt.mk
ficl.mk stand: remove mips support 2021-12-10 11:05:31 -07:00
loader.mk loader: narrow the scope of gfx frame buffer wrt tg supported kernels 2021-12-14 15:27:47 -07:00
lua.mk Do not include float interfaces when using libsa. 2018-02-23 04:04:25 +00:00
Makefile kboot: Split out powerpc build 2021-12-30 16:07:13 -07:00
Makefile.amd64 stand: properly declare subdir deps or .WAIT, do parallel build 2020-12-31 11:15:45 -06:00
Makefile.inc stand: properly declare subdir deps or .WAIT, do parallel build 2020-12-31 11:15:45 -06:00
veriexec.mk EFI secure boot VECTX related changes 2021-04-30 12:53:45 -05:00