djm [Thu, 2 Dec 2021 02:44:44 +0000 (02:44 +0000)]
don't put the tty into raw mode when SessionType=none, avoids ^c being
unable to kill such a session. bz3360; ok dtucker@
krw [Wed, 1 Dec 2021 22:37:30 +0000 (22:37 +0000)]
Remove the MBR_init() "#ifdef defined(__macppc__) ||
defined(__mips__)" chunk that rounded the start of the default
OpenBSD partition to a cylinder boundary. The value has been
immediately re-rounded to a power of 2 block since r1.25 in 2009.
Eliminates wasted space when no /usr/mdec/mbr partition
0 information is available.
'-b' becomes available to architectures other than amd64 and
i386, taking precedence over /usr/mdec/mbr partition 0
information. The latter being present only in macppc and loongson
/usr/mdec/mbr files.
bluhm [Wed, 1 Dec 2021 22:34:31 +0000 (22:34 +0000)]
Reintroduce the TDBF_DELETED flag. Checking next pointer to figure
out whether the TDB is linked to the hash bucket does not work.
This fixes removal of SAs that could not be flushed with ipsecctl -F.
OK tobhe@
deraadt [Wed, 1 Dec 2021 21:48:00 +0000 (21:48 +0000)]
mention that the "flags" field in the enchdr is uses m_flags values
(see mbuf.h)
deraadt [Wed, 1 Dec 2021 21:45:19 +0000 (21:45 +0000)]
sys/core.h is not needed by these files, therefore sys/param.h isn't
needed for MAXCOMLEN either
deraadt [Wed, 1 Dec 2021 18:28:45 +0000 (18:28 +0000)]
we do not need 'struct mbuf; struct rtentry;' to satisfy some ancient unix
variant that made a header file mistake.
ok jsg
deraadt [Wed, 1 Dec 2021 18:21:23 +0000 (18:21 +0000)]
further improvements in sys/param.h annotation and removal.
kettenis [Wed, 1 Dec 2021 17:25:35 +0000 (17:25 +0000)]
Fix booting from an IDE block device on the Sun Blade 100. Apparently
writing to disk using the Open Firmware interfaces is buggy and causes
corruption of the disk. While it isn't entirely clear what versions
of Open Firmware are affected, but it seems to only affect IDE drives.
So if we detect an IDE drive, disable writing to it. This results in
a small lose of bootloader functionality (bsd.upgrade loop prevention
and flagging /etc/random.seed re-use) but that is better than losing
the ability to run OpenBSD at all.
Based on a diff by Ted Bullock (who did all the hard work of debugging
this and coming up with a viable fix).
ok deraadt@
deraadt [Wed, 1 Dec 2021 17:04:26 +0000 (17:04 +0000)]
late allocation of clist in putc() and b_to_q() hasn't been required in
a decade, because all tty drivers preallocate.
ok kettenis
deraadt [Wed, 1 Dec 2021 16:53:28 +0000 (16:53 +0000)]
Reduce use of sys/param.h, or annotate the reason why it is needed
(pretty much MAXCOMLEN for struct process or struct core), and remove
sys/vnode.h where not needed
deraadt [Wed, 1 Dec 2021 16:51:57 +0000 (16:51 +0000)]
Use system _ALIGN to reduce the reasons why this uses sys/param.h
deraadt [Wed, 1 Dec 2021 16:42:12 +0000 (16:42 +0000)]
whitespace cleanup during review read
bluhm [Wed, 1 Dec 2021 12:51:09 +0000 (12:51 +0000)]
Let ipsp_spd_lookup() return an error instead of a TDB. The TDB
is not always needed, but the error value is necessary for the
caller. As TDB should be refcounted, it makes not sense to always
return it. Pass an output pointer for the TDB which can be NULL.
OK mvs@ tobhe@
jsg [Wed, 1 Dec 2021 10:50:23 +0000 (10:50 +0000)]
drm/amdgpu/gfx9: switch to golden tsc registers for renoir+
From Alex Deucher
45b42cd05391197d5426a9097043d5e77bdbefc9 in linux 5.10.y/5.10.83
53af98c091bc42fd9ec64cfabc40da4e5f3aae93 in mainline linux
jsg [Wed, 1 Dec 2021 10:47:39 +0000 (10:47 +0000)]
drm/amd/display: Set plane update flags for all planes in reset
From Nicholas Kazlauskas
3187623096091d8c60231de5ca0e020bfa5e6ee9 in linux 5.10.y/5.10.83
21431f70f6014f81b0d118ff4fcee12b00b9dd70 in mainline linux
mvs [Wed, 1 Dec 2021 10:24:40 +0000 (10:24 +0000)]
Make `sun' global variable. It used by threads and could be corrupted
when main() thread exited.
jsing [Wed, 1 Dec 2021 09:06:30 +0000 (09:06 +0000)]
Remove dead code.
claudio [Wed, 1 Dec 2021 09:03:19 +0000 (09:03 +0000)]
Add some RRDP specific regress tests.
OK benno@
patrick [Wed, 1 Dec 2021 07:36:03 +0000 (07:36 +0000)]
Build libfido2 after all other libraries, as it links against one of
the other libraries, so we have to build those first.
Initial report and diff from uaa@
ok anton@ deraadt@ millert@
tobias [Tue, 30 Nov 2021 20:08:15 +0000 (20:08 +0000)]
Improved error handling in config parser.
- Escaped newlines confused column counter
- An unclosed quote could have been logged multiple times
- Signed data types could overflow, which is undefined behavior
ok tedu
tb [Tue, 30 Nov 2021 18:34:35 +0000 (18:34 +0000)]
Add missing const qualifiers in a number of BN_* manuals.
ok schwarze
tb [Tue, 30 Nov 2021 18:32:55 +0000 (18:32 +0000)]
last whitespace diff for now.
tb [Tue, 30 Nov 2021 18:31:36 +0000 (18:31 +0000)]
KNF for BF_KEY
tb [Tue, 30 Nov 2021 18:27:04 +0000 (18:27 +0000)]
Fix some annoying whitespace inconsistencies.
tb [Tue, 30 Nov 2021 18:20:06 +0000 (18:20 +0000)]
Provide EVP_CTRL_AEAD_* defines.
This commit adds generic EVP_CTRL_AEAD_{SET,GET}_TAG and _SET_IVLEN
defines and aliases the GCM and CCM versions to those.
This is the publicly visible part of OpenSSL's
e640fa02005.
ok inoguchi jsing
tb [Tue, 30 Nov 2021 18:17:03 +0000 (18:17 +0000)]
Align ssl_kex_derive_ecdhe_ecp() with ssl_kex_derive_dhe()
sk is commonly used for a STACK_OF(), so call the shared key simply key.
ok jsing
tb [Tue, 30 Nov 2021 18:12:44 +0000 (18:12 +0000)]
isakmpd: convert modp_init() for opaque DH.
ok jsing
tobhe [Tue, 30 Nov 2021 17:47:30 +0000 (17:47 +0000)]
whitespace
deraadt [Tue, 30 Nov 2021 17:05:59 +0000 (17:05 +0000)]
add ixl(4)
jsing [Tue, 30 Nov 2021 15:58:08 +0000 (15:58 +0000)]
s/ECDHE/ECDH/
If we can provide an EC key that is used, then it is by definition
non-ephemeral.
ok tb@
millert [Tue, 30 Nov 2021 15:50:06 +0000 (15:50 +0000)]
Fix indentation of return in yy_try_NUL_trans().
M4_YY_NOOP_GUTS_VAR is a no-op in most cases but its indentation
remains, leading to double indentation of the return statement.
This fixes "misleading indentation" warnings from clang. OK tb@
bluhm [Tue, 30 Nov 2021 13:17:43 +0000 (13:17 +0000)]
Remove unused parameter from ipsp_spd_inp().
OK mvs@ yasuoka@
jsing [Tue, 30 Nov 2021 07:34:29 +0000 (07:34 +0000)]
Add regress for {d2i,i2d}_{,DSA_,EC_,RSA_}PUBKEY{,_bio}().
visa [Tue, 30 Nov 2021 02:58:33 +0000 (02:58 +0000)]
Prevent select(2) from blocking if registering found pending events.
OK mpi@
deraadt [Tue, 30 Nov 2021 02:13:55 +0000 (02:13 +0000)]
enable uhid/fido
from Ashton Fagg
mvs [Mon, 29 Nov 2021 21:25:09 +0000 (21:25 +0000)]
Use nanosleep(3) instead of select(2) for test run time delay. Use ~10
years interval as operational infinity.
mvs [Mon, 29 Nov 2021 21:21:26 +0000 (21:21 +0000)]
Create socket within current directory instead of /tmp. Also remove it
with "make clean".
tb [Mon, 29 Nov 2021 20:13:25 +0000 (20:13 +0000)]
Crank the number of rounds of Miller-Rabin from 50 to 64
for DSA key generation.
From Kurt Roeckx, OpenSSL
74ee3796
ok bcook inoguchi jsing
tb [Mon, 29 Nov 2021 20:02:14 +0000 (20:02 +0000)]
Clean up DH_check_pub_key() and ensure that y^q (mod p) == 1.
This aligns our behavior with OpenSSL 1.1.1 which includes a mitigation
for small subgroup attacks. This did not affect LibreSSL since we do
not support X9.42 style parameter files or RFC 5114.
The meat of this commit is from Matt Caswell, OpenSSL
b128abc3
ok inoguchi jsing
tb [Mon, 29 Nov 2021 19:54:07 +0000 (19:54 +0000)]
Increase number of iterations in Miller-Rabin checks for DH.
BN_prime_checks is only to be used for random input. Here, the
input isn't random, so increase the number of checks. According
to https://eprint.iacr.org/2019/032, 64 rounds is suitable.
From Jake Massimo, OpenSSL 1.1.1,
af6ce3b4
ok inoguchi jsing
tb [Mon, 29 Nov 2021 19:47:47 +0000 (19:47 +0000)]
Synchronize DH_check() mostly with OpenSSL 1.1.1 with some
simplifications and readability tweaks. This ensures in
particular that dh->q is suitable if present.
Based on work by Stephen Henson and Bernd Edlinger in OpenSSL.
Issues with the current implementation found via regression
tests in py-cryptography.
ok inoguchi jsing
tb [Mon, 29 Nov 2021 19:41:02 +0000 (19:41 +0000)]
Provide a version of DH_check_params() for internal use.
Based on the version in OpenSSL 1.1.1l with minor tweaks.
ok inoguchi jsing
tb [Mon, 29 Nov 2021 19:34:51 +0000 (19:34 +0000)]
Provide a number of flags for DH_check and DH_check_pubkey
that will be used in subsequent commits.
ok inoguchi jsing
bluhm [Mon, 29 Nov 2021 19:19:00 +0000 (19:19 +0000)]
The network stack currently uses IPL_SOFTNET. Consistently initialize
the TDB sadb mutex with that. The old IPL_NET was chosen by accident.
OK mpi@
tb [Mon, 29 Nov 2021 18:50:16 +0000 (18:50 +0000)]
tcpdump: convert print-ipsec to a EVP_CIPHER_CTX on the heap.
Fix and add some error checking while there.
ok deraadt
tb [Mon, 29 Nov 2021 18:48:22 +0000 (18:48 +0000)]
First pass of converting ssl_kex.c to opaque DH.
Assign the result of BN_dup() and BN_bn2bin() to local BIGNUMs, then
set the factors and pubkey on the dh using DH_set0_{pqg,key}().
A second pass will be done during the upcoming bump.
ok jsing
tb [Mon, 29 Nov 2021 18:37:34 +0000 (18:37 +0000)]
Hide BIO_s_file_internal() from internal view.
ok jsing
tb [Mon, 29 Nov 2021 18:36:27 +0000 (18:36 +0000)]
Stop using BIO_s_file_inernal() in libssl.
BIO_s_file_internal() should never have leaked out of libcrypto,
but it did. As a first step of getting rid of it, stop using it
internally.
ok jsing
mvs [Mon, 29 Nov 2021 16:31:43 +0000 (16:31 +0000)]
regen
mvs [Mon, 29 Nov 2021 16:30:30 +0000 (16:30 +0000)]
Unlock accept(2) and accept4(2) syscalls. Unlock them both because they
follow the same code path.
ok bluhm@
visa [Mon, 29 Nov 2021 16:11:46 +0000 (16:11 +0000)]
Register-time event should make poll/select non-blocking.
jsing [Mon, 29 Nov 2021 16:03:56 +0000 (16:03 +0000)]
Convert server serialisation of DHE parameters/public key to new functions.
ok inoguchi@ tb@
jsing [Mon, 29 Nov 2021 16:00:32 +0000 (16:00 +0000)]
Factor out/rewrite DHE key exchange.
This follows what was done previously for ECDHE EC point key exchange and
will allow for deduplication and further code improvement.
Convert the TLSv1.2 client to use the new DHE key exchange functions.
ok inoguchi@ tb@
tobhe [Mon, 29 Nov 2021 15:56:33 +0000 (15:56 +0000)]
Avoid including sys/param.h. Make a local copy of MINIMUM() in test_helper.h
instead, like we did elsewhere.
ok bluhm@
dv [Mon, 29 Nov 2021 15:55:36 +0000 (15:55 +0000)]
vmm(4): bump remote vmclear spinout ticks
Older/slower hosts could easily hit the cap under load. Set it to
the same value we use in mplock_debug.
ok mlarkin@
visa [Mon, 29 Nov 2021 15:54:04 +0000 (15:54 +0000)]
kqueue: Revise badfd knote handling
When closing a file descriptor and converting the poll/select knotes
into badfd knotes, keep the knotes attached to the by-fd table. This
should prevent kqueue_purge() from returning before the kqueue has
become quiescent. This in turn should fix a
KASSERT(TAILQ_EMPTY(&kq->kq_head)) panic in KQRELE() that bluhm@ has
reported.
The badfd conversion is only needed when a poll/select scan is ongoing.
The system can skip the conversion if the knote is not part of the
active event set.
The code of this commit skips the conversion when the fd is closed by
the same thread that has done the fd polling. This can be improved but
should already cover typical fd usage patterns.
As badfd knotes now hold slots in the by-fd table, kqueue_register()
clears them. poll/select use kqueue_register() to set up a new scan;
any found fd close notification is a leftover from the previous scan.
The new badfd handling should be free of accidental knote accumulation.
This obsoletes kqpoll_dequeue() and lowers kqpoll_init() overhead.
Re-enable lazy removal of poll/select knotes because the panic should
no longer happen.
OK mpi@
bluhm [Mon, 29 Nov 2021 15:39:59 +0000 (15:39 +0000)]
Using a void pointer for temporary allocated TDB in pfkeyv2 does
not make sense. Do not use the freeme pointer for TDB in pfkeyv2_send().
The pattern is tdb_alloc() and tdb_unref() in case of error. Replace
tdb_free() in reserve_spi() with tdb_unref() to keep this consistent.
Only tdb_unref() should call tdb_free().
OK mvs@
espie [Mon, 29 Nov 2021 14:06:03 +0000 (14:06 +0000)]
points people to more current ways to find package information.
with inputs from danj@ and kn@, thx guys
jmc [Mon, 29 Nov 2021 13:20:24 +0000 (13:20 +0000)]
add -V to usage(), and list it before -v in both SYNOPSIS and the
options list;
mvs [Mon, 29 Nov 2021 13:05:04 +0000 (13:05 +0000)]
Add and enable 'unconacc' test which provides multithreaded connect(2)
and accept(2) calls on single unix(4) socket.
ok bluhm@
tobhe [Mon, 29 Nov 2021 12:27:18 +0000 (12:27 +0000)]
Add command line option to show the version
ok patrick@
nicm [Mon, 29 Nov 2021 11:05:28 +0000 (11:05 +0000)]
Bump response timer to three seconds, GitHub issue 2984.
nicm [Mon, 29 Nov 2021 11:01:51 +0000 (11:01 +0000)]
Fix user option lookup ordering.
deraadt [Mon, 29 Nov 2021 06:43:42 +0000 (06:43 +0000)]
sys/param.h was included for MAX(), MIN() and roundup(). make local
copies of MAXIMUM() and MINIMUM() like we have done in 50+ other places,
and also include a roundup()
ok jsg
deraadt [Mon, 29 Nov 2021 06:42:13 +0000 (06:42 +0000)]
the code in this file has reason to include any sys/*.h header files,
let alone sys/param.h, which it uses to get roundup(). make a local
copy of the macro, and call it a day.
deraadt [Mon, 29 Nov 2021 06:39:23 +0000 (06:39 +0000)]
local copy of roundup() means no more sys/param.h
deraadt [Mon, 29 Nov 2021 05:17:35 +0000 (05:17 +0000)]
mostly avoid sys/param.h with a local nitems()
ok mlarkin
deraadt [Mon, 29 Nov 2021 03:20:37 +0000 (03:20 +0000)]
A few sys/param.h annotations lacked ALIGNBYTES
djm [Mon, 29 Nov 2021 01:04:45 +0000 (01:04 +0000)]
Niels agreed to remove the advertising clause; switching these
to 3-term BSD license.
deraadt [Sun, 28 Nov 2021 19:28:41 +0000 (19:28 +0000)]
Stop using MAXBSIZE to eliminate sys/param.h including (which injects a
ton of namespace intrusion). Create local sizes, and refactor some code
along the way.
ok millert
deraadt [Sun, 28 Nov 2021 19:26:03 +0000 (19:26 +0000)]
remove sys/param.h includes by stopping use of NODEV, ALIGNED and ALIGN().
The latter two exposed a large block allocator on top of malloc() which
doesn't really make sense in this decade (the objects are never freed, so
not quite like the famous openssl allocator)
ok millert jsg
schwarze [Sun, 28 Nov 2021 17:40:14 +0000 (17:40 +0000)]
document ASN1_tag2bit(3)
schwarze [Sun, 28 Nov 2021 15:48:12 +0000 (15:48 +0000)]
Document ASN1_object_size(3).
While here,
* call the function arguments "content_length" rather than just
"length" to make it less likely that the reader confuses them with
the total length returned by ASN1_object_size(3);
* state that only the short form is supported for content_length <= 127;
* add the missing STANDARDS section.
schwarze [Sun, 28 Nov 2021 14:32:34 +0000 (14:32 +0000)]
mark ASN1_check_infinite_end() and ASN1_const_check_infinite_end()
as intentionally undocumented
mglocker [Sun, 28 Nov 2021 14:10:32 +0000 (14:10 +0000)]
Spacing
mglocker [Sun, 28 Nov 2021 13:57:37 +0000 (13:57 +0000)]
utvfu(4) only has one frame size, either for PAL or NTSC. Therefore
return EINVAL after the first frame size has been returned in the
VIDIOC_ENUM_FRAMESIZES ioctl.
ok mpi@
florian [Sun, 28 Nov 2021 12:51:52 +0000 (12:51 +0000)]
Make sure the interface still exists before updating it.
When we get a route message, for example an address being added
(RTM_NEWADDR, but the problem exists with most of the route messages)
and the interface gets unplugged at just the right moment
if_nametoindex(3) will return NULL. We will pass NULL through
update_iface() to get_xflags() which will then crash because we
dereference the NULL pointer there.
OK kn
florian [Sun, 28 Nov 2021 12:49:55 +0000 (12:49 +0000)]
Make sure if_index is set in all case statements and use it
consistently. This makes the next diff easier, also consistency is
good.
OK kn
mglocker [Sun, 28 Nov 2021 09:25:02 +0000 (09:25 +0000)]
Align with the recent memory allocation changes we did for the other
USB HC drivers; M_DEVBUF -> M_USBHC.
ok kettenis@
djm [Sun, 28 Nov 2021 07:21:26 +0000 (07:21 +0000)]
sshsig: return "key not found" when searching empty files rather than
"internal error"
djm [Sun, 28 Nov 2021 07:15:10 +0000 (07:15 +0000)]
ssh-keygen -Y match-principals doesn't accept any -O options
at present, so don't say otherwise in SYNOPSIS; spotted jmc@
djm [Sun, 28 Nov 2021 07:14:29 +0000 (07:14 +0000)]
fix indenting in last commit
djm [Sun, 28 Nov 2021 07:10:18 +0000 (07:10 +0000)]
missing initialisation for oerrno
tobhe [Sat, 27 Nov 2021 21:50:05 +0000 (21:50 +0000)]
Rename msg_id to msg_peerid now that we also have msg_localid.
ok patrick@
deraadt [Sat, 27 Nov 2021 17:45:49 +0000 (17:45 +0000)]
sync
deraadt [Sat, 27 Nov 2021 16:25:40 +0000 (16:25 +0000)]
previous commit causes gcc to perform an unaligned access to the tcphdr
(at least on sparc64) since it accesses the bitfield using an "int sized"
instructions, rather than the minimally sized byte instruction. This is
permitted by the language laywers who probably prefer we change the tcphdr
in every packet. It is not clear how to convince gcc to avoid this behaviour,
and a week of futzing hasn't found fast path solutions yet. In the meantime
the tree may not be broken.
schwarze [Sat, 27 Nov 2021 16:18:03 +0000 (16:18 +0000)]
new manual page BIO_f_asn1(3)
visa [Sat, 27 Nov 2021 15:13:09 +0000 (15:13 +0000)]
Remove an unneeded variable to fix compiler warning with clang 13.
OK jsg@
visa [Sat, 27 Nov 2021 15:12:19 +0000 (15:12 +0000)]
Make brk() and sbrk() weak again to fix build with clang 13.
OK jsg@
visa [Sat, 27 Nov 2021 15:07:26 +0000 (15:07 +0000)]
Adjust wait channel name and re-enable test.
visa [Sat, 27 Nov 2021 15:06:10 +0000 (15:06 +0000)]
Fix timeouts in poll/select regress tests
Disable poll/select timeout so that the wchan wait would work as
intended. The timeout is not essential to the test flow. In addition,
the top-level alarm timer prevents the tests from getting stuck should
something go wrong.
schwarze [Sat, 27 Nov 2021 13:10:33 +0000 (13:10 +0000)]
Fix incomplete initialization bug: BIO_new(BIO_f_asn1()) neglected
initializing five of the fields in BIO_ASN1_BUF_CTX (prefix,
prefix_free, suffix, suffix_free, ex_arg), inviting a segfault in
a subsequent call from the application program to BIO_write(3)
because subroutines of that function assume that the function
pointers are either NULL or valid.
Fix this by using the less error-prone calloc(3) idiom.
While here, inline asn1_bio_init() at the only call site
in asn1_bio_new() to simplify the code and make it easier to read.
Bug found and initial patch by me,
this version (with inlining) by and OK tb@.
stsp [Sat, 27 Nov 2021 11:22:26 +0000 (11:22 +0000)]
Let iwm(4) use per-Tx-queue interface timers to ensure that the interface
watchdog will trigger a device timeout if a particular Tx queue gets stuck
while other Tx queues keep working.
The Linux driver is using a similar workaround for "stuck queues".
I have only observed this problem on iwx(4) hardware but it won't hurt
to add this workaround to iwm(4) as well.
djm [Sat, 27 Nov 2021 07:23:35 +0000 (07:23 +0000)]
whitespac e
djm [Sat, 27 Nov 2021 07:20:58 +0000 (07:20 +0000)]
regression test for match-principals. Mostly by Fabian Stelzer
djm [Sat, 27 Nov 2021 07:14:46 +0000 (07:14 +0000)]
Add ssh-keygen -Y match-principals operation to perform matching of
principals names against an allowed signers file.
Requested by and mostly written by Fabian Stelzer, towards a TOFU
model for SSH signatures in git. Some tweaks by me.
"doesn't bother me" deraadt@
deraadt [Sat, 27 Nov 2021 06:14:10 +0000 (06:14 +0000)]
free() with nullptr is OK, but not if the size is unitialized, and the
fail label is reachable before the sizes are known.
jsg [Sat, 27 Nov 2021 04:32:32 +0000 (04:32 +0000)]
drm/amdgpu: fix set scaling mode Full/Full aspect/Center not works on vga and dvi connectors
From hongao
04c586a601dc0acb8e739205db350ab660dffc4f in linux 5.10.y/5.10.82
bf552083916a7f8800477b5986940d1c9a31b953 in mainline linux
jsg [Sat, 27 Nov 2021 04:29:00 +0000 (04:29 +0000)]
drm/i915/dp: Ensure sink rate values are always valid
From Imre Deak
47901b77bf7dc801a084a0b377aee5974d9bc4ce in linux 5.10.y/5.10.82
6c34bd4532a3f39952952ddc102737595729afc4 in mainline linux
jsg [Sat, 27 Nov 2021 04:26:18 +0000 (04:26 +0000)]
drm/amd/display: Update swizzle mode enums
From Alvin Lee
3d68d6ee83144044f610d67304cc194c2af7d0c5 in linux 5.10.y/5.10.82
58065a1e524de30df9a2d8214661d5d7eed0a2d9 in mainline linux