1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00
freebsd/usr.sbin
John Baldwin 87702e38a4 bhyve: Fully reset the fwctl state machine if the guest requests a reset.
If a guest tries to reset the fwctl device while a pending request was
in flight, the fwctl state machine can be left in an incomplete state.
Specifically, rinfo is not cleared.

Normally the state machine for fwctl alternates between REQ (receiving
request) and RESP (sending response) and ignores port writes while in
RESP or port reads while in REQ.  Once a guest completes the writes to
the port to send a request, the state machine transitions to RESP and
ignores future writes.

However, if a guest writes a full request and then resets the fwctl
device, the state would transition to REQ without draining the pending
response or discarding the received request.  Instead, additional
port writes after the reset were treated as new payload bytes, but
were appended to the previously-received request and could overflow
the fget_str buffer.

To fix, fully reset the fwctl state machine if the guest requests a
reset.

admbugs:	998
Approved by:	so
Reviewed by:	markj
Reported by:	Omri Ben Bassat <t-benbassato@microsoft.com>
Security:	FreeBSD-SA-23:07.bhyve
Security:	CVE-2023-3494

(cherry picked from commit bed3ae1d78)
(cherry picked from commit 9fe302d781)
2023-08-01 15:48:26 -04:00
..
ac
accton
acpi Add the Arm SPE interrupt to acpidump 2022-02-22 16:23:07 +00:00
adduser
ancontrol
apm
apmd
arp arp(8): fixing the deletion failure of IEEE1394 associated addresses 2021-05-03 07:51:53 +00:00
audit
auditd
auditdistd
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 bhyve: Fully reset the fwctl state machine if the guest requests a reset. 2023-08-01 15:48:26 -04: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 binmiscctl: Avoid segfault with "binmiscctl add" and no extra params 2021-02-15 14:12:25 -05:00
blacklistctl
blacklistd
bluetooth iwmbtfw(8): Improve Intel 7260/7265 adaptors handling 2021-06-14 00:59:38 +03: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: Fix typo (Instalation -> Installation). 2022-03-04 13:10:59 -08:00
bsnmpd bsnmpd: Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2022-02-08 15:50:32 -05: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 fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00: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: consume blanks in system crontabs before options 2021-06-05 15:49:45 -07:00
crunch crunchgen: remove -dc from linker invocation 2022-02-16 20:03:53 -05:00
ctladm pkgbase: Move ctld/ctladm to iscsi package 2021-06-30 09:24:33 +02:00
ctld MFC 315bca194a: 2022-02-25 14:06:46 -05:00
cxgbetool pkgbase: Create a cxgbe-tools package 2022-01-05 18:23:49 +01:00
daemon daemon: add some basic tests 2021-06-03 20:48:47 -06:00
dconschat
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
editmap
edquota edquota(8): Cleanup to make it WARNS=6 clean. 2020-08-17 05:57:22 +00:00
efibootmgr pkgbase: Remove libefivar package and add a efi-tools one 2022-01-05 18:23:50 +01:00
efidp pkgbase: Remove libefivar package and add a efi-tools one 2022-01-05 18:23:50 +01:00
efivar efivar: handle error when reading --fromfile 2022-03-02 15:56:31 -06:00
etcupdate etcupdate: Add -D destdir to usage for 'extract'. 2021-06-09 14:19:39 -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: improve BE creation feature 2022-02-15 00:09:50 -06:00
fstyp fstyp: detect Raspberry Pi Pico boot filesystem as FAT 2022-04-05 14:54:04 -04:00
ftp-proxy (t)ftp-proxy: use libpfctl 2021-05-07 10:15:42 +02:00
fwcontrol
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 inetd: Use the synopsis from the manual page 2021-12-13 02:10:26 +01: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
ipfwpcap
iscsid iscsid: set max_recv_data_segment_length to what we advertise 2021-11-03 16:47:11 -04:00
jail jail: Don't allow substitution of valueless jail parameters. 2021-06-24 10:51:27 -07:00
jexec
jls Bugfix to not hide jailparam flags, which for example changes the output 2020-12-15 20:56:35 +00:00
kbdcontrol
kbdmap Fix too small sscanf output buffers in kbdmap 2022-02-09 18:26:24 +01:00
keyserv
kgmon
kldxref kldxref: add R_PPC_ADDR32 handler 2022-02-17 18:48:52 -03:00
lastlogin
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 makefs(8): Fix a few typos in source code comments 2022-02-09 07:18:33 +01:00
makemap
manctl
memcontrol
mergemaster mergemaster(8): Fix a typo in an error message 2022-01-29 09:44:30 +01:00
mfiutil
mixer
mld6query
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: deprecate exports to a network without mask 2021-12-10 10:26:37 -06:00
moused moused(8): Fix a common typo in source code comments 2022-02-09 07:19:13 +01:00
mpsutil mpsutil: Fix data truncation by too short buffers. 2021-12-07 23:07:01 -05:00
mptable
mptutil
mtest
ndiscvt
ndp Fix arp/ndp deletion broken by 2fe5a79425. 2021-03-10 21:48:24 +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 pnfsserver(4): Fix a typo in the manual page 2022-04-15 15:25:21 +02: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 Update leap-seconds to leap-seconds.3676924800 2022-03-21 19:32:15 -07: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 pkgbase: Add a FreeBSD-pkg-bootstrap package 2022-01-05 18:23:53 +01:00
pmc libpmc: eliminate pmc_pmu_stat_mode() 2021-07-29 12:01:10 -03:00
pmcannotate
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 pkgbase: Put ppp in it's own package 2021-01-04 16:19:36 +01: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 Fix typo on "Celsius" 2021-12-06 08:55:55 -07:00
pstat pstat(8): improve the Size header width after r358181 2020-06-23 18:19:22 +00:00
pw pw(8): use open_memstream(3) instead of sbuf(9) 2021-05-05 09:37:01 +02: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
route6d
rpc.lockd rpc.lockd: Use libc strnlen() instead of reimplementing it 2021-06-30 08:18:09 -04:00
rpc.statd
rpc.tlsclntd nfs tls: Update for SSL_OP_ENABLE_KTLS. 2021-08-23 17:59:34 -07:00
rpc.tlsservd nfs tls: Update for SSL_OP_ENABLE_KTLS. 2021-08-23 17:59:34 -07: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
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
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 usr.sbin/services_mkdb: diff reduction against NetBSD. 2021-04-19 18:00:09 -07:00
sesutil sesutil: Fix status checking 2022-02-14 18:42:44 +00: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
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
tests
traceroute
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
unbound MFV d60fa10fd8: 2021-06-02 17:54:29 -07:00
usbconfig usbconfig: actually set the exit code in usage() 2022-01-18 22:12:48 +01: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 [vale] Fix valectl to compile on a 32-bit platform 2020-12-30 10:40:43 -08:00
vidcontrol Move font related data structured to sys/font.c and update vtfontcvt 2020-06-14 06:58:58 +00:00
vigr
vipw
wake
watch
watchdogd
wlandebug
wpa wpa: Fix WITHOUT_WPA_SUPPLICANT_EAPOL build 2021-11-20 17:30:49 -08:00
yp_mkdb pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
ypbind pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01:00
ypldap pkgbase: Put yellow pages programs to its own package 2022-01-05 18:23:51 +01: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
Makefile.arm
Makefile.arm64
Makefile.i386
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