when building a KRL from a control file, do not treat a # character
that is not at the start of a line or preceeded by whitespace as the
start of a comment, as key IDs may legitimately contain these
Anthropic ANT-2026-ZF4XFAKS
Prevent user-after-free on ephemeral VM startup failure
'vmctl start -d/ oops' as root is enough to kill vmd(8).
Unless 'vm_from_config', vmd_dispatch_control() first through config_setvm()
vm_remove()s such VMs, i.e. frees their 'vm', then proceeds to access it.
Of three config_setvm() call sites, only this one checks its return code,
so deferring vm_stop()/vm_remove() into call sites would mean more checks.
Cache the condition locally to avoid this.
OK millert dv
Do not consider unveil("/usr/bin/wall") as a fatal error, for /usr may not
be mounted. In that case, proceed anyway but do not try to exec it.
ok deraadt@
report bytes received in scsi_report_luns() and fail with EIO in the
impossible case
take the lun count from the smaller of the length field or bytes received
this way we avoid taking garbage from devices when we enable report luns on USB
ok miod@
Make ifconfig send WPA parameters to the kernel in one ioctl call.
When a sequence of WPA parameters needs to be set, instead of sending
each parameter via a separate get/set ioctl dance to the kernel, ifconfig
now collects all parameters and sends one ioctl to the kernel when done.
Setting any WPA parameter now enables WPA on the interface. Previously,
only the wpa, wpakey, and wpaakms "802.1x" commands enabled WPA.
As before, -wpa and -wpakey disable WPA and clear the WPA configuration.
Fixes misbehaviour where the wpaakms command would disable WPA and clear
the WPA configuration unless AKM "802.1x" was used.
Found by Spiros Thanasoulas of Radically Open Security while reviewing
and testing my WPA3 support patch.
Reset WPA AKMs to defaults if the WPA protocol version is changed and
no AKMs are provided on the subsequent command line. This will keep us
happy once WPA3 appears in the future.
ok armani@ phessler@
Rework the name2id code a bit, make internal functions static.
Introduce two helpers _namelookup() and _idlookup() to lookup a
name or id respectivly. It returns the label or NULL if not found.
Reimplement the other internal functions with these helpers.
OK tb@
ensure that ifconfig 'join' always enables wpa if wpa parameters are set
Also, the group cipher can only be set in hostap mode which is irrelevant
for the join command, so ignore wpagroupcipher during 'join' operations.
ok armani@