8 years ago, I had a brainfart moment and put an mbuf pkthdr flag into
m_pkthdr.pf.tag instead of m_pkthdr.pf.flags - and nobody noticed, until
acts-1631 came. fix it. ok sashan
Add a Merkle tree implementation for MTC
Add the RFC 9162 Merkle tree with the subtree operations of section 4 of
draft-ietf-plants-merkle-tree-certs-05, as internal libcrypto functions.
Ported from BoringSSL
ok joshua@, kenjiro@
Correct outgoing record checks in the legacy TLSv1.2 stack.
Ensure an existing record is not being written prior to commencing
renegotiation or sending an alert in the legacy TLSv1.2 stack. The way
that TLSv1.2 records are sent was changed in r1.79 of ssl_pkt.c, however
this failed to correctly handle outgoing record checks. This means that
renegotiation can be commenced or an alert can be sent while an application
data record is being written, the size of which is then returned instead of
the size of the handshake record or alert record, resulting in a buffer
overread. This is reachable via renegotiation being triggered in the legacy
TLSv1.2 stack, under the right conditions.
For now also restore the previous SSL_R_BAD_WRITE_RETRY behaviour, which
checks that the retried write matches a given set of constraints. This will
be revisited again in the future.
Thanks to William T. Nelson for reporting the issue and providing a fix.
ok kenjiro@
Wrap pthread rwlock, mutex and conditions into simple inline functions
Introduce thread.h which contains static inline wrappers for the most
commonly used pthread operations (rwlocks, mutexs and conditions).
Every pthread call requires an extra error check and this adds a lot of
unneeded noise into the parser code.
Use similar names as used in the OpenBSD kernel for mutexes and rwlocks.
This makes the code more legible.
OK tb@ job@
rpki-client: enforce a single AS identifier in ASPA EE certs
Expose cert_has_one_as() and use it in aspa_cert_info() to enforce a
requirement added to the I-D in January.
Reported by Shreyas S
ok claudio
Stop prepending underscores to symbol names in nlist(3) input. This used to
matter back when some OpenBSD platforms were using the a.out binary format,
which adds such underscores to symbols produced from C code; but now that
all binaries are ELF, there is no need for these underscores anymore.
Note that this does not change the behaviour of nlist(3) yet - if the
symbol being looked for is not found, and starts with an underscore, a second
lookup is still performed without the leading underscore.
With tweaks from cludwig@
Do not allow TIOCSCTTY, TIOCNOTTY, or TIOCSPGRP on the pty master. Return
ENOTTY for all 3 of these. They could create incoherent session states,
leading to dangerous UAF reported by openai (unfortunately their proposed
patch was batshit crazy and made the situation worse, due to not identifying
this as root cause, and writing code to support the condition). with claudio
various versions ok kettenis kirill and others
get rid of the ifmedia bits in the ethernet tunnels.
the ifmedia ioctls werent wired up on these interfaces, so all this
was doing was wasting space in the softcs. so no functional change.
call etherbridge_up and _down in nvgre_up and _down.
etherbridge_up is needed to start aging entries in the etherbridge code.
reported by tom smyth
"looks good" jmatthew@
vmd(8): Actually check alignment
The alignment check tested offset and xfer_sz with &&, so it only
rejected a request when both were misaligned. offset is now always a
multiple of VIRTIO_BLK_SECTOR_SIZE, so that half is dead code; check
xfer_sz alone and fail when it is not a multiple of the sector size.
Also report the correct direction in the warning.
ok dv@
vmd(8): Reject vioblk requests beyond the disk capacity
vioblk_io() converted the guest-controlled sector to a byte offset and
passed it to the backend without comparing it against the disk capacity.
With a raw image on a regular file, pwritev() extends the file, so a
privileged guest could write past the configured size and exhaust the
host filesystem.
Pass the sector number to vioblk_io() as an unsigned value and defer the
conversion to a byte offset until after the bounds check. Once the full
transfer length is known, reject a start beyond capacity or a transfer
that crosses the end, then convert to off_t. The check is done in
unsigned arithmetic; the subtraction order avoids underflow and it never
multiplies the attacker-controlled sector.
From Acts1631, thanks!
ok dv@