freebsd-src/usr.sbin
Jessica Clarke 3622fe1620 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

(cherry picked from commit 5b13fa7987)
2023-01-24 14:49:19 -07:00
..
ac ac(8): Fix a typo in a source code comment 2022-06-10 14:29:35 +02:00
accton
acpi Decode couple arrays in NFIT table. 2022-08-25 22:49:39 -04:00
adduser adduser: allow standard IFS characters in passwords 2020-04-05 19:25:46 +00:00
ancontrol
apm
apmd Stop linking to libl by specifying we do not need yywrap 2019-09-10 07:23:01 +00:00
arp arp(8): fixing the deletion failure of IEEE1394 associated addresses 2021-05-03 07:51:53 +00:00
audit
auditd Move OpenBSM to CONFS 2018-08-11 13:23:09 +00:00
auditdistd auditdistd: Remove useless linking with libl 2020-03-24 07:08:39 +00:00
auditreduce
authpf authpf: Start using libpfctl 2021-05-14 10:40:12 +02:00
autofs pkgbase: Put autofs config files in the FreeBSD-autofs package 2022-01-05 18:23:51 +01:00
bhyve Add a virtio-input device emulation. 2023-01-24 07:42:27 +01:00
bhyvectl bhyvectl: print a better error message when vm_open() fails 2021-07-01 19:17:12 -08:00
bhyveload bhyveload(8): Implement loader_callbacks::diskwrite 2020-10-07 20:31:13 +00:00
binmiscctl imgact_binmisc: Optionally pre-open the interpreter vnode 2022-12-22 16:28:42 +00:00
blacklistctl
blacklistd Move blacklistd.conf to usr.sbin/blacklistd/ 2018-07-31 16:39:38 +00:00
bluetooth iwmbtfw(8): Fix a typo in a kernel message 2023-01-16 07:26:54 +01:00
boot0cfg Revert r362466 2020-06-22 07:46:24 +00:00
bootparamd Fix too small hostname buffer in bootparamd 2022-02-09 18:26:18 +01:00
bsdconfig bsdconfig: add a new mirror in Bulgaria 2021-06-20 11:23:44 +08:00
bsdinstall bsdinstall: use the correct DISTDIR for fetching local distfiles 2022-10-24 11:01:01 -05:00
bsnmpd bsnmpget.1: Fix a typo in the man page 2023-01-22 10:09:09 +01:00
btxld
camdd camdd(8): Fix the man page date 2020-12-19 13:17:25 +00:00
cdcontrol
certctl pkgbase: Put certctl in the FreeBSD-caroot package 2022-01-05 18:23:53 +01:00
chkgrp
chown chown: see also chmod. 2022-11-02 10:37:48 +01:00
chroot chroot: fix typo in usage 2022-02-14 18:42:56 +00:00
ckdist fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
clear_locks pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
config config(5): Update upper limit for maxusers on 64-bit systems 2021-10-31 15:27:20 -04:00
cpucontrol cpucontrol(8): Fix a typo in an error message 2022-02-02 09:49:08 +01:00
crashinfo crashinfo: Add references to the gdb port/package 2020-12-02 19:58:50 +00:00
cron cron(8): Fix a typo in a source code comment 2022-09-06 07:41:53 +02:00
crunch crunchide(1): Fix a typo in a comment 2022-07-19 18:00:07 +02:00
ctladm ctladm: Fix typo in command line help. 2022-08-17 21:44:47 -04:00
ctld ctld: if adding a target fails, retry it on the next reload 2022-11-23 13:55:41 -07:00
cxgbetool cxgbetool(8): Fix common typos in sysctl descriptions 2023-01-24 09:03:18 +01:00
daemon daemon(8): when -u option is used set USER, HOME and SHELL variables. 2022-09-08 04:42:56 -07:00
dconschat dconschat(8): Fix a typo in an error message 2022-11-01 07:02:40 +01:00
devctl Add freeze/thaw description to devctl(8) 2021-06-10 23:28:29 +08:00
devinfo devinfo(8): Remove cross-reference to pnpinfo(8) 2021-11-05 00:54:33 -04:00
diskinfo Make "diskinfo -i" also test 1MB reads. 2020-12-10 10:23:18 +00:00
dumpcis Regularize my copyright notice 2019-12-04 16:56:11 +00:00
editmap
edquota edquota(8): Cleanup to make it WARNS=6 clean. 2020-08-17 05:57:22 +00:00
efibootmgr efibootmgr: Use the hier(7) ESP mount point in examples 2022-04-11 12:15:53 +02:00
efidp pkgbase: Remove libefivar package and add a efi-tools one 2022-01-05 18:23:50 +01:00
efivar efivar(8): Fix a typo in a source code comment 2022-04-09 08:05:57 +02:00
etcupdate etcupdate: Preserve permissions when installing a resolved file. 2022-07-13 11:00:50 -07:00
extattr vfs_extattr: Allow extattr names up to the full max 2020-05-14 03:01:23 +00:00
extattrctl Fix a few mandoc issues 2020-10-09 14:03:45 +00:00
fdcontrol
fdformat Add example usage for formatting a floppy disk. Adding a more self 2020-05-25 07:18:47 +00:00
fdread
fdwrite
fifolog [fifolog] wrap the recno when we hit the end of the provided file size. 2020-06-28 06:52:39 +00:00
flowctl
fmtree fmtree: add a deprecation notice to the manpage 2021-02-15 20:20:02 -06:00
freebsd-update freebsd-update: restart sshd after upgrade 2022-12-10 11:56:24 +07:00
fstyp fstype(8): Fix two typos in source code comments 2022-06-10 14:32:48 +02:00
ftp-proxy (t)ftp-proxy: use libpfctl 2021-05-07 10:15:42 +02:00
fwcontrol fwcontrol: eliminate set but not used warning 2022-05-02 10:09:29 -04:00
getfmac
getpmac
gpioctl Provide userland notification of gpio pin changes ("userland gpio interrupts"). 2020-12-12 18:34:15 +00:00
gssd pkgbase: Create a FreeBSD-kerberos package 2022-01-05 18:23:50 +01:00
gstat [skip ci] correct a few SPDX license tags 2021-07-27 11:57:17 -06:00
hyperv
i2c Fix a few mandoc issues 2020-10-09 14:03:45 +00:00
ifmcstat
inetd ctlstat: add prometheus output 2022-05-12 14:43:01 -06:00
iostat iostat: fix rounding errors in iostat -x 2021-08-22 21:23:23 +00:00
iovctl Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
ip6addrctl pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
ipfwpcap Buildfix for GCC after r334277. 2018-05-28 09:41:44 +00:00
iscsid iscsi: Fetch limits based on a socket rather than assuming global limits. 2022-11-10 13:48:36 -08:00
jail jail: fix a NULL pointer derefence in parsing ip6.addr settings. 2022-12-17 16:31:31 -08:00
jexec
jls Bugfix to not hide jailparam flags, which for example changes the output 2020-12-15 20:56:35 +00:00
kbdcontrol Stop linking to libl by specifying we do not need yywrap 2019-09-10 07:26:38 +00:00
kbdmap Fix too small sscanf output buffers in kbdmap 2022-02-09 18:26:24 +01:00
keyserv keyserv(8): unifdef out __FreeBSD__ and KEYSERV_RANDOM 2019-12-13 04:03:05 +00:00
kgmon
kldxref kldxref: handle R_RISCV_64 relocation 2022-10-28 11:10:37 -03:00
lastlogin A single comma was missing to separate the "see also" items in 2018-10-20 17:22:04 +00:00
lpr lpr(1): Fix a typo in a source code comment 2021-11-28 12:42:53 +01:00
lptcontrol
mailstats
mailwrapper Make use of the getlocalbase() function for run-time adjustment of the 2020-11-18 20:00:55 +00:00
makefs ufs: Rework shortlink handling to avoid subobject overflows 2023-01-24 14:49:19 -07:00
makemap
manctl
memcontrol
mergemaster mergemaster(8): Fix a typo in an error message 2022-01-29 09:44:30 +01:00
mfiutil mfiutil.8: Fix some mandoc warnings 2022-08-10 14:21:51 +02:00
mixer mixer: call the cleanup function in a test 2020-02-06 14:31:29 +00:00
mld6query Remove the USE_RFC2292BIS option and reap dead code 2019-07-22 20:11:33 +00:00
mlx5tool pkgbase: Create a mlx-tools package 2022-01-05 18:23:49 +01:00
mlxcontrol pkgbase: Move back mlxcontrol in the default package 2022-01-05 18:23:51 +01:00
mount_smbfs
mountd mountd(8): Fix a typo in a source code comment 2023-01-22 10:09:43 +01:00
moused moused(8): Fix a common typo in source code comments 2022-02-09 07:19:13 +01:00
mpsutil mpsutil: Fix device speed reporting. 2022-05-16 09:53:02 -04:00
mptable
mptutil mptutil: emit a warning on big-endian architectures 2019-07-22 17:25:35 +00:00
mtest
ndiscvt ndiscvt: remove set but not used variable 2022-03-22 19:14:21 +01:00
ndp ndp(8): add structured output formatting via libxo 2023-01-13 21:24:11 +00:00
newsyslog pkgbase: Create a FreeBSD-newsyslog package 2022-01-05 18:23:52 +01:00
nfscbd pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
nfsd pnfs.4: Fix a typo 2022-11-11 05:34:14 +01:00
nfsdumpstate pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
nfsrevoke pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
nfsuserd pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
ngctl build: remove LIBPTHREAD/LIBTHR build options 2021-01-28 19:21:46 -06:00
nghook
nmtree pkgbase: Create a FreeBSD-mtree package 2022-01-05 18:23:52 +01:00
nologin Revert 363598 2020-08-17 10:25:02 +00:00
nscd nscd: does not warn about invalid values what parsing config file 2020-07-11 19:44:12 +00:00
ntp ntp: disable format string warnings in libopts 2022-05-03 14:20:44 -04:00
nvram [PowerPC] De-giant powermac_nvram, update documentation 2020-06-19 18:36:10 +00:00
ofwdump [PowerPC] Allow traversal of oversize OF properties. 2020-11-13 16:49:41 +00:00
pciconf pciconf: Fix PCIS_CRYPTO_ENTERTAIN copy/paste. 2022-02-15 19:46:28 -05:00
periodic pkgbase: Create a FreeBSD-periodic package 2022-01-05 18:23:52 +01:00
pkg /usr/sbin/pkg: don't sleep on fetch failure 2022-10-12 11:01:56 +02:00
pmc libpmc: eliminate pmc_pmu_stat_mode() 2021-07-29 12:01:10 -03:00
pmcannotate pmcannotate: Don't increment end address passed to objdump -d. 2022-07-13 09:20:45 -07:00
pmccontrol pmccontrol: improve -L with pmu-events 2021-07-29 12:01:10 -03:00
pmcstat Update a sysctl name to nbuffers_pcpu in hwpmc.4 and pmcstat.c 2021-09-25 10:34:38 +02:00
pmcstudy pmcstudy: Fix a typo in a usage message 2022-01-27 10:20:04 +01:00
pnfsdscopymr pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
pnfsdsfile pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
pnfsdskill pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
pnpinfo
portsnap phttpget: move out of portsnap 2020-09-09 00:39:47 +00:00
powerd powerd(8): Add rc.conf(5) to see also 2021-11-10 14:12:59 -05:00
ppp Remove references to named(8) 2022-09-24 10:09:35 +02:00
pppctl pkgbase: Put ppp in it's own package 2021-01-04 16:19:36 +01:00
praliases
praudit usr.sbin/praudit: Fix tests after 5619d49e07 2021-03-17 09:55:40 +00:00
prometheus_sysctl_exporter prometheus_sysctl_exporter: ignore ENOENT for mibs specified on the CLI 2022-08-19 21:01:43 -06:00
pstat pstat(8): improve the Size header width after r358181 2020-06-23 18:19:22 +00:00
pw MFC: pw(8): fix combination of modes -N and -w random 2022-12-12 10:11:20 +07:00
pwd_mkdb Fix bootstrapping of pwd_mkdb after r364049 2020-08-11 16:46:38 +00:00
pwm usr.sbin/pwm/pwm add support for flags 2021-07-22 18:39:57 +02:00
quot Move the pointers stored in the superblock into a separate 2020-06-19 01:02:53 +00:00
quotaon
rarpd
repquota
rip6query
rmt tag /etc/rmt symlink with pkgbase package 2020-02-12 17:30:09 +00:00
route6d Use the right variable when updating interface routes. 2018-08-08 20:15:40 +00:00
rpc.lockd nfs: Fix a common typo in source code comments 2023-01-22 10:08:46 +01:00
rpc.statd nfs: Fix a common typo in source code comments 2023-01-22 10:08:46 +01:00
rpc.tlsclntd rpc.tlsclntd: Check for a tls syscall failure. 2022-12-27 16:41:31 -08:00
rpc.tlsservd rpc.tlsservd: Check for a tls syscall failure. 2022-12-28 17:27:24 -08:00
rpc.umntall pkgbase: Create a FreeBSD-nfs package 2021-06-30 09:24:32 +02:00
rpc.yppasswdd pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
rpc.ypupdated pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
rpc.ypxfrd pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
rpcbind RPCBIND: skip ipv6 link local when request is not from link local address 2021-10-11 09:19:15 -07:00
rrenumd Fix build with recent byacc. 2020-06-24 02:08:08 +00:00
rtadvctl usr.sbin/rtadvctl: Remove support for FreeBSD 9.x. 2021-01-01 16:06:08 -08:00
rtadvd Remove obsolete compatibility code from rtadvd. 2019-07-17 16:50:53 +00:00
rtprio Add idle priority scheduling privilege group to MAC/priority 2021-12-19 04:42:51 +02:00
rtsold rtsold: fix memory leak in script execution 2022-03-02 15:56:31 -06:00
rwhod Remove reference to nlist(3) missed in SCCS revision 5.26 by mckusick 2020-07-24 16:58:13 +00:00
sa lastcomm/sa: Remove sparc64 tests, they aren't needed. 2022-07-13 14:17:40 +03:00
sendmail Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details 2020-07-15 18:28:54 +00:00
service service(8): Fix typo in man page. 2022-01-07 14:22:46 +01:00
services_mkdb ctlstat: add prometheus output 2022-05-12 14:43:01 -06:00
sesutil sesutil.8: Polish 2022-07-12 10:39:48 +02:00
setfib
setfmac fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
setpmac
smbmsg
snapinfo
spi Clean up spi.8 2020-08-21 09:48:00 +00:00
spkrtest
spray
syslogd pkgbase: Create a FreeBSD-syslogd package 2022-01-05 18:23:52 +01:00
sysrc sysrc.8: Mention it requires chroot(8) 2022-04-06 08:48:03 +02:00
tcpdchk pkgbase: Create a FreeBSD-tcpd package 2022-01-05 18:23:52 +01:00
tcpdmatch pkgbase: Create a FreeBSD-tcpd package 2022-01-05 18:23:52 +01:00
tcpdrop tcpdrop: tweak comments 2021-12-10 11:45:33 +01:00
tcpdump Remove useless linking to libl 2020-03-23 14:44:23 +00:00
tests
traceroute Update Makefile.depend files 2019-12-11 17:37:53 +00:00
traceroute6 traceroute6: Properly calculate UDP checksum 2021-05-06 08:59:19 -04:00
trim trim(8): Fix a few issues reported by mandoc 2020-12-19 13:56:19 +00:00
trpt Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
tzsetup Don't link against libdialog/ncurses when bootstrapping tzsetup 2020-08-07 16:04:10 +00:00
uathload
uefisign uefisign: handle empty sections 2022-03-02 15:56:30 -06:00
ugidfw
uhsoctl uhsoctl.1: Fix the man page date 2022-08-03 06:11:01 +02:00
unbound unbound: Vendor import 1.17.0 2022-10-31 16:22:49 -07:00
usbconfig usbconfig.8: Sort flags according to style(9) 2022-06-29 10:22:54 +02:00
usbdump Implement own command line option for the frequently used -i usbusX -f Y syntax, 2021-06-02 13:25:20 +02:00
utx pkgbase: Put more binaries/lib in runtime 2022-01-05 18:23:51 +01:00
valectl netmap: several typo fixes 2022-12-31 14:46:29 +00:00
vidcontrol vidcontrol: disable p, P, and H when vt(4) is in use 2022-04-11 08:15:22 -04:00
vigr
vipw vipw.8: Add a FILES section 2022-11-15 07:58:49 +01:00
wake
watch Remove sio(4). 2019-11-21 01:24:49 +00:00
watchdogd
wlandebug wlandebug: Add include path for libifconfig as it is a internallib 2020-03-25 01:31:26 +00:00
wpa WPA_DISTDIR does not need to end in a slash 2022-07-19 20:00:56 +02:00
yp_mkdb pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
ypbind ypbind(8): Fix a typo in the man page 2022-03-30 18:37:14 +02:00
ypldap ypldap: Fix mismatch in array bounds for ldapclient(). 2022-11-11 10:18:53 -08:00
yppoll pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
yppush pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
ypserv pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
ypset pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
zic Remove tests for obsolete compilers in the build system 2020-05-12 15:22:40 +00:00
zonectl Cross-reference camcontrol(8) and zonectl(8) man pages. 2022-02-14 00:04:44 +00:00
zzz
Makefile pkgbase: Move ctld/ctladm to iscsi package 2021-06-30 09:24:33 +02:00
Makefile.amd64 Remove kgzip and kgzldr. 2019-05-24 05:34:21 +00:00
Makefile.arm
Makefile.arm64
Makefile.i386 Remove kgzip and kgzldr. 2019-05-24 05:34:21 +00:00
Makefile.inc build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00
Makefile.mips
Makefile.powerpc
Makefile.riscv Build ofwdump on riscv. 2018-07-24 20:20:17 +00:00