fts_read: fix potential double free on FCHDIR() failure
Part of the contract for fts_read() is that we must always reset
sp->fts_cur immediately before return. There was one instance where
a failed FCHDIR() was not setting sp->fts_cur to 'p' before return,
leaving sp->fts_cur pointing to a freed value.
From Acts1631
OK tb@
SEV-SNP: Disable ipmi(4) on confidential VMs
The CD_COCOVM filter already keeps ipmi(4) from attaching on a
confidential VM, but it runs too late: ipmi_probe() is called directly
from mainbus_attach() and scans the BIOS ROM window at 0xc0000-0xfffff
for an IPMI signature before config_found() is reached. Skip the probe
as well.
ok mlarkin@
disable squid's use of nettle, it has a fallback internal copy of an old
version of nettle's code for the things it uses it for (base64 and md5).
the base64 API was changed in nettle 4.0 breaking squid's use of it (e.g.
decoding HTTP headers used for proxy authentication).
big thanks to Fabrice LEVIEUX for tracking it down.
Add ML-DSA 44 support with tests
This adds ML-DSA 44 support based on BoringSSL's changes to
add support for the 44 rank.
It also adds the NIST ACVP test vectors and unit tests for
MLDSA 44 to the existing regress tests.
ok tb@
SEV-SNP: Add memory clobber to vmgexit()
The hypervisor reads and writes the GHCB while handling a VMGEXIT.
Without a memory clobber the compiler may cache GHCB contents across
the instruction. "asm volatile" alone does not prevent that.
No change in generated code.
ok mlarkin@
Add ML-DSA known answer tests against the NIST ACVP vectors
This uses a file-test driver that runs the NIST keygen
and siggen vectors for MLDSA-65 and MLDSA-87. It re-uses
the mlkem utilities written by tb@ from the mlkem test
harness, calling the internal deteministic functions
with known entropy values so the fixed vectors are reproducible.
parse_test_file for nist should probably move to the
generic test harness we use, but that can happen later.
ok tb@ kenjiro@
Convert the BoringSSL c++ code to C
This mirrors the approach taken with ML-KEM to encode the rank
in the key, instead of BoringSSL's templated C++ approach.
This is still not hooked up to build, that will follow
ok tb@ kenjiro@
Avoid use-after-free in IPv6 duplicate address detection.
An expired DAD timer waiting for netlock could find the dadq of a
new DAD for the same address and destroy it while its timer was
still pending. Pass struct dadq to the timer and check under
exclusive netlock that it is still the active one.
from OpenAI; OK deraadt@ mvs@
Bring in ML-DSA from BoringSSL
This imports the BoringSSL ML-DSA implementation from immediately
prior to BoringSSL's relicensing. This is implemented much like
the previously imported ML-KEM and will be converted in a similar
manner for our use.
Since the time of this code, it has gained an external mu implementation
and ML-DSA 44. We will convert those from a follow on requested from
Google with an appropriate license.
This of course does not compile, follow on commits will move these
to appropriate locations and then hook them up to build.
ok tb@
sys/vfs: stop checkalias replacing vnodes
checkalias() mixed two contracts: it linked a special vnode into the
alias list, but in the VT_NON block device case it returned an existing
alias and forced the caller to discard the vnode it had just
constructed. That is not a valid generic contract once filesystem
private lookup caches can already name the provisional vnode; the node
to vnode relation changes under concurrent lookup, and callers have to
move v_data and vgone() a vnode which is no longer private.
Make checkalias() only register the supplied vnode in speclisth and mark
alias peers with VALIASED. The function no longer returns a replacement
vnode, and callers keep their filesystem vnode identity stable.
Keep the historical bdevvp() reuse case local to getdevvp(): look up an
active VT_NON block device vnode before allocating a new vnode, and
return it directly when present. This preserves device vnode sharing
without making checkalias() consume caller owned vnodes.
OK: beck@, deraadt@