openbsd
3 years agouse mmap() instead of alloca(), so that argv memory overflow leading to
deraadt [Wed, 22 Sep 2021 20:40:06 +0000 (20:40 +0000)]
use mmap() instead of alloca(), so that argv memory overflow leading to
execve can be detected better
reported by Alejandro Colomar, ok millert

3 years agoenable POOL_DEBUG again.
benno [Wed, 22 Sep 2021 18:24:04 +0000 (18:24 +0000)]
enable POOL_DEBUG again.

3 years agowe are now working on 7.0-current
deraadt [Wed, 22 Sep 2021 18:21:35 +0000 (18:21 +0000)]
we are now working on 7.0-current

3 years agoAdjust handling of RIB_GENERIC_ADDPATH MRT messages. Parse it the way
claudio [Wed, 22 Sep 2021 18:17:49 +0000 (18:17 +0000)]
Adjust handling of RIB_GENERIC_ADDPATH MRT messages. Parse it the way
OpenBGPD and GoBGP dump so that it works with all the MRT implementations
out there supporting this.
While there do some additional minor cleanup.
OK deraadt@

3 years agoremove test traces committed by mistake
eric [Wed, 22 Sep 2021 17:19:58 +0000 (17:19 +0000)]
remove test traces committed by mistake

3 years agobump version to 7.0.0
eric [Wed, 22 Sep 2021 17:12:34 +0000 (17:12 +0000)]
bump version to 7.0.0

3 years agodecode srs-encoded address in the right place.
eric [Wed, 22 Sep 2021 17:11:35 +0000 (17:11 +0000)]
decode srs-encoded address in the right place.
fixes a bug where ruleset was not evaluated with the expanded address.

reported by Stefan Haller

ok millert@

3 years agosync table_db capabilities with table_static
eric [Wed, 22 Sep 2021 17:09:07 +0000 (17:09 +0000)]
sync table_db capabilities with table_static

ok millert@

3 years agoAdd a workaround for machines where the framebuffer size reported by the
kettenis [Wed, 22 Sep 2021 16:03:14 +0000 (16:03 +0000)]
Add a workaround for machines where the framebuffer size reported by the
hardware is incorrect.  In this case, make sure the amount of "stolen"
memory is at least as large as the EFI framebuffer such that the
driver doesn't use this memory until we've switched to the framebuffer
allocated by the amdgpu(4) driver.

Needs further investigation why the size reported by the hardware is
incorrect.

Tested by djm@
ok jsg@, deraadt@

3 years agoPrevent ucc keyboards from changing the wsmux keyboard layout.
anton [Wed, 22 Sep 2021 15:44:12 +0000 (15:44 +0000)]
Prevent ucc keyboards from changing the wsmux keyboard layout.

ok deraadt@

3 years agoFix command prompt with multiple prompts (add the result onto the list
nicm [Wed, 22 Sep 2021 15:21:44 +0000 (15:21 +0000)]
Fix command prompt with multiple prompts (add the result onto the list
again as we go along). ok deraadt

3 years agoAdd NUL termination to btfile content to avoid that strlcpy(3) reads
bluhm [Tue, 21 Sep 2021 21:33:35 +0000 (21:33 +0000)]
Add NUL termination to btfile content to avoid that strlcpy(3) reads
too much in btrace(8).
OK mpi@ deraadt@

3 years agoctfstrip uses objcopy behind the scenes, meaning objcopy must also
deraadt [Tue, 21 Sep 2021 21:19:20 +0000 (21:19 +0000)]
ctfstrip uses objcopy behind the scenes, meaning objcopy must also
be in base set, for KARL
spotted by pavel korovin

3 years agoThe cflags -DSUN_CYLCHECK -DSUN_AAT0 were removed accidently. Put
bluhm [Tue, 21 Sep 2021 18:36:09 +0000 (18:36 +0000)]
The cflags -DSUN_CYLCHECK -DSUN_AAT0 were removed accidently.  Put
them back in special like in the main disklabel Makefile.
OK deraadt@

3 years agoUse upercase DHCP and sprinkle in some ":".
florian [Tue, 21 Sep 2021 17:23:24 +0000 (17:23 +0000)]
Use upercase DHCP and sprinkle in some ":".
Committing on behalf of jmc
OK deraadt

3 years agoDuring resume, also restore pins that we configured as GPIO interrupt pins.
kettenis [Tue, 21 Sep 2021 14:59:13 +0000 (14:59 +0000)]
During resume, also restore pins that we configured as GPIO interrupt pins.
Fixes issues with dead touchpads after resume on some machines.

ok jcs@, deraadt@

3 years agobump rpki-client version
benno [Tue, 21 Sep 2021 12:41:05 +0000 (12:41 +0000)]
bump rpki-client version

3 years agoMove us to OpenBGPD 7.2
claudio [Tue, 21 Sep 2021 11:59:47 +0000 (11:59 +0000)]
Move us to OpenBGPD 7.2

3 years agojmc was a bit too eager and deleted the -DSUN_CYLCHECK -DSUN_AAT0
deraadt [Mon, 20 Sep 2021 20:23:44 +0000 (20:23 +0000)]
jmc was a bit too eager and deleted the -DSUN_CYLCHECK -DSUN_AAT0
compile options required for sparc64 (partition alignment, in particular)
noticed by bluhm during testing

3 years agoChanging the encoding of a ucc keyboard doesn't make sense as only one
anton [Mon, 20 Sep 2021 17:32:39 +0000 (17:32 +0000)]
Changing the encoding of a ucc keyboard doesn't make sense as only one
encoding is supported. Instead, silently ignore such requests. Gets rid
of the following warning emitted by kbd(8) while booting with a ucc
keyboard attached and /etc/kbdtype being present:

kbd: unsupported encoding uk on /dev/wskbd2

I ended up repurposing KB_MACHDEP as is became unused back in 2008. Note
that running a kernel with this commit applied requires kbd and
wsconsctl to be recompiled in order to show correct encodings.

Problem reported by landry@ and ok deraadt@

3 years agoDocument how a 0 byte can be encoded for client-id.
florian [Mon, 20 Sep 2021 17:08:43 +0000 (17:08 +0000)]
Document how a 0 byte can be encoded for client-id.
Requested by & OK sthen
mdoc clue by schwarze

3 years agoFix release day and emacs version
tb [Mon, 20 Sep 2021 16:43:38 +0000 (16:43 +0000)]
Fix release day and emacs version

ok deraadt

3 years agoUse proper sigsuspend() instead of old pause() and use sigprocmask() to
claudio [Mon, 20 Sep 2021 16:39:40 +0000 (16:39 +0000)]
Use proper sigsuspend() instead of old pause() and use sigprocmask() to
block delivery of signals outside of sigsuspend(). With this the test
is more reliable. pause() is implemented as two syscalls and so it is
possible to catch a signal on the first syscall and than be stuck on
the second waiting for something that already happened.
OK millert@ deraadt@ bluhm@

3 years agoAccording to RFC 2132 (9.14. Client identifier) a hardware type of 0
florian [Mon, 20 Sep 2021 11:46:22 +0000 (11:46 +0000)]
According to RFC 2132 (9.14. Client identifier) a hardware type of 0
should be used when the client identifier is not a hardware address,
for example if it's just a string. It turns out that the majority of
dhcp clients (and possibly servers?) does not do this but rather
transmits the client identifier verbatim if a string is
configured. The first character becomes the hardware type.
Make dhcpleased(8) behave the same.
Difference in behavior with dhclient(8) and interoperability issues
with dhcp(8) first pointed out by Olivier Cherrier on misc@
OK sthen
fine to get it in for 7.0 deraadt

3 years agoFix appstest.sh for testing with OpenSSL 3.0
inoguchi [Mon, 20 Sep 2021 10:45:01 +0000 (10:45 +0000)]
Fix appstest.sh for testing with OpenSSL 3.0

- Fix 'Server Temp Key' check to work with both words "P-384" and "secp384r1".
- Test TLSv1 and TLSv1.1 only if OpenSSL version is 1.x.

3 years agofix missing -s in SYNOPSYS and usage() as well as a capitalisation
djm [Mon, 20 Sep 2021 06:53:56 +0000 (06:53 +0000)]
fix missing -s in SYNOPSYS and usage() as well as a capitalisation
mistake; spotted by jmc@

3 years agoFix "Allocated port" debug message for unix sockets. From peder.stray at
dtucker [Mon, 20 Sep 2021 04:02:13 +0000 (04:02 +0000)]
Fix "Allocated port" debug message for unix sockets.  From peder.stray at
gmail.com via github PR#272, ok deraadt@

3 years agoSwitch scp back to use the old protocol by default, ahead of release.
djm [Mon, 20 Sep 2021 01:55:42 +0000 (01:55 +0000)]
Switch scp back to use the old protocol by default, ahead of release.
We'll wait a little longer for people to pick up sftp-server(8) that
supports the extension that scp needs for ~user paths to continue
working in SFTP protocol mode. Discussed with deraadt@

3 years agowire up bpf correctly
jmatthew [Mon, 20 Sep 2021 01:27:23 +0000 (01:27 +0000)]
wire up bpf correctly

ok dlg@ deraadt@

3 years agopci_mapreg_map() will assign an address to the BAR if it doesn't have one
jmatthew [Mon, 20 Sep 2021 01:18:00 +0000 (01:18 +0000)]
pci_mapreg_map() will assign an address to the BAR if it doesn't have one
already, so we shouldn't refuse to attach in that case.

noticed by kevlo@ on arm64
ok dlg@ deraadt@

3 years agobump example versions
benno [Sun, 19 Sep 2021 20:58:28 +0000 (20:58 +0000)]
bump example versions
Whatever deraadt@

3 years agodisable pool debug for release
benno [Sun, 19 Sep 2021 20:56:41 +0000 (20:56 +0000)]
disable pool debug for release
ok deraadt@

3 years agoadjust date
deraadt [Sun, 19 Sep 2021 18:56:08 +0000 (18:56 +0000)]
adjust date

3 years agologin.conf: raise datasize-cur limits for pbuild on macppc to 1536MB
cwen [Sun, 19 Sep 2021 18:49:09 +0000 (18:49 +0000)]
login.conf: raise datasize-cur limits for pbuild on macppc to 1536MB

Required at least by www/webkitgtk4.

"commit right away" deraadt@

3 years agoadjust date
deraadt [Sun, 19 Sep 2021 16:55:01 +0000 (16:55 +0000)]
adjust date

3 years agoUnlock top part of the VM fault handler.
mpi [Sun, 19 Sep 2021 10:43:26 +0000 (10:43 +0000)]
Unlock top part of the VM fault handler.

This is possible now that pmap_extract() is serialized with pmap_remove().

ok sthen@, deraadt@

3 years agoThe LocalDomain in syslogd(8) is not used, remove variable.
bluhm [Sun, 19 Sep 2021 10:17:36 +0000 (10:17 +0000)]
The LocalDomain in syslogd(8) is not used, remove variable.
Use RFC 5424 NILVALUE as fallback for LocalHostName.
OK millert@ mvs@

3 years agoSwitch two calls from memset() to explicit_bzero()
tb [Sun, 19 Sep 2021 09:15:22 +0000 (09:15 +0000)]
Switch two calls from memset() to explicit_bzero()

This matches the documented behavior more obviously and ensures that
these aren't optimized away, although this is unlikely.

Discussed with deraadt and otto

3 years agoAt least t_fork and t_vfork tests need coredumps enabled to succeed.
claudio [Sun, 19 Sep 2021 08:20:04 +0000 (08:20 +0000)]
At least t_fork and t_vfork tests need coredumps enabled to succeed.
Add ulimit -c unlimited before running the tests like it is done in
other places in regress.
OK bluhm@

3 years agocheck_send_expect() does some nasty ibuf magic to allow fn_match()
claudio [Sat, 18 Sep 2021 19:44:46 +0000 (19:44 +0000)]
check_send_expect() does some nasty ibuf magic to allow fn_match()
to work with a buffer that is not a real string.
The wpos is decremented in the wrong spot and would affect both
binary and non binary checks.
Simplify this code by using strndup.
OK rob@ benno@

3 years agoWork around a BIOS bug on Lenovo Thinkpads based on Intel's Tiger Lake
kettenis [Sat, 18 Sep 2021 19:21:16 +0000 (19:21 +0000)]
Work around a BIOS bug on Lenovo Thinkpads based on Intel's Tiger Lake
platforms where the GPIO pin that is used for the touchpad interrupt
gets reset when entering S3 and isn't properly restored upon resume.

ok deraadt@, jcs@

3 years agoupon length check or other failure, explicit_bzero an object, because it may
deraadt [Sat, 18 Sep 2021 16:45:52 +0000 (16:45 +0000)]
upon length check or other failure, explicit_bzero an object, because it may
contain a partially copied password
ok tobhe

3 years agofreezero() instead of free(), because the object may contain a password
deraadt [Sat, 18 Sep 2021 16:45:07 +0000 (16:45 +0000)]
freezero() instead of free(), because the object may contain a password
ok tobhe

3 years agobetter error message for ~user failures when the sftp-server
djm [Sat, 18 Sep 2021 02:03:25 +0000 (02:03 +0000)]
better error message for ~user failures when the sftp-server
lacks the expand-path extension; ok deraadt@

3 years agoFix subjectAlternativeName (SAN) generation for CSRs. CA/B Forum baseline
sthen [Fri, 17 Sep 2021 20:02:24 +0000 (20:02 +0000)]
Fix subjectAlternativeName (SAN) generation for CSRs. CA/B Forum baseline
requirements require that it's used in certificates so it makes sense to
generate a CSR compliant with this, additionally it replaces rather than
adds to the name in the certificate's subject which we weren't handling
correctly. Diff from wolf at wolfsden/cz, ok florian@

3 years agothese files do not need sys/param.h
deraadt [Fri, 17 Sep 2021 15:20:21 +0000 (15:20 +0000)]
these files do not need sys/param.h

3 years agosys/param.h was only used for PAGE_MASK. use getpagesize() at
deraadt [Fri, 17 Sep 2021 15:19:52 +0000 (15:19 +0000)]
sys/param.h was only used for PAGE_MASK.  use getpagesize() at
initialization instead.

3 years agosys/param.h is not needed by this file
deraadt [Fri, 17 Sep 2021 15:18:04 +0000 (15:18 +0000)]
sys/param.h is not needed by this file

3 years agosys/param.h is only needed for MAXCOMLEN, but a few header files
deraadt [Fri, 17 Sep 2021 15:13:50 +0000 (15:13 +0000)]
sys/param.h is only needed for MAXCOMLEN, but a few header files
which must be manually included in userland were missing

3 years agothe ioctl table generation does not require sys/param.h
deraadt [Fri, 17 Sep 2021 15:13:04 +0000 (15:13 +0000)]
the ioctl table generation does not require sys/param.h

3 years agosys/param.h is not needed in these files
deraadt [Fri, 17 Sep 2021 15:12:28 +0000 (15:12 +0000)]
sys/param.h is not needed in these files

3 years agosys/param.h is not needed in this file
deraadt [Fri, 17 Sep 2021 15:11:57 +0000 (15:11 +0000)]
sys/param.h is not needed in this file

3 years agoSync 1bpp initial palette setting with NetBSD/luna68k.
aoyama [Fri, 17 Sep 2021 12:02:31 +0000 (12:02 +0000)]
Sync 1bpp initial palette setting with NetBSD/luna68k.

Tested by me on 1bpp framebuffer got recently.

3 years agoImplement __builtin_clear_cache() on riscv64
jca [Fri, 17 Sep 2021 08:17:42 +0000 (08:17 +0000)]
Implement __builtin_clear_cache() on riscv64

Fixes at least ports/devel/libffi as used by ports/lang/python/2.
ok kettenis@

3 years agoDo not destroy sessions twice, GitHub issue 2889.
nicm [Fri, 17 Sep 2021 07:20:49 +0000 (07:20 +0000)]
Do not destroy sessions twice, GitHub issue 2889.

3 years agoadd missing sudo
anton [Fri, 17 Sep 2021 05:59:16 +0000 (05:59 +0000)]
add missing sudo

3 years agoImplement flushing for TLSv1.3 handshakes.
jsing [Thu, 16 Sep 2021 19:25:30 +0000 (19:25 +0000)]
Implement flushing for TLSv1.3 handshakes.

When we finish sending a flight of records, flush the record layer output.
This effectively means calling BIO_flush() on the wbio.

Some things (such as apache2) have custom BIOs that perform buffering and
do not actually send on BIO_write(). Without BIO_flush() the server thinks
it has sent data and starts receiving records, however the client never
sends records since it never received those that the server should have
sent.

Joint work with tb@

ok tb@

3 years agomake some more scp-in-SFTP mode better match Unix idioms
djm [Thu, 16 Sep 2021 15:22:22 +0000 (15:22 +0000)]
make some more scp-in-SFTP mode better match Unix idioms

suggested by deraadt@

3 years agoallow log_stderr==2 to prefix log messages with argv[0]
djm [Thu, 16 Sep 2021 15:11:19 +0000 (15:11 +0000)]
allow log_stderr==2 to prefix log messages with argv[0]

use this to make scp's SFTP mode error messages more scp-like

prompted by and ok deraadt@

3 years agodhcpleased(8) does not (yet?) track if routes it added are deleted
florian [Thu, 16 Sep 2021 13:36:52 +0000 (13:36 +0000)]
dhcpleased(8) does not (yet?) track if routes it added are deleted
behind its back. When a lease gets renewed dhcpleased simply adds all
routes and lets the kernel sort duplicates out.

This however leads to "failed to send route message: File exists"
messages in /var/log/daemon which are confusing. Since this is
expected do not log it as an error.

While here change the error message when proposing nameservers so that
it can be distinguished from failed routes.

Pointed out by deraadt

3 years agotcpdump: Fix data alignment issue in WireGuard printer
visa [Thu, 16 Sep 2021 12:35:20 +0000 (12:35 +0000)]
tcpdump: Fix data alignment issue in WireGuard printer

Access 8-byte nonce as unaligned data to avoid a crash on strict
alignment architectures. With IP and UDP, payload alignment is
guaranteed to 4-byte boundary only.

Reported and tested by Peter J. Philipp

OK deraadt@

3 years agoAdd EXTRACT_LE_64BITS().
visa [Thu, 16 Sep 2021 12:34:12 +0000 (12:34 +0000)]
Add EXTRACT_LE_64BITS().

OK deraadt@

3 years agovarious improvements:
anton [Thu, 16 Sep 2021 10:54:35 +0000 (10:54 +0000)]
various improvements:
* use SUDO when needed
* favor paths relative to the btrace regress directory in the expected output
  files, prevents one from being forced to checkout the src tree at /usr/src in
  order to make the tests pass

3 years agoFix run-shell -d with no command, GitHub issue 2885.
nicm [Thu, 16 Sep 2021 06:39:22 +0000 (06:39 +0000)]
Fix run-shell -d with no command, GitHub issue 2885.

3 years agosync SYNOPSIS and usage(); ok florian
jmc [Thu, 16 Sep 2021 06:23:01 +0000 (06:23 +0000)]
sync SYNOPSIS and usage(); ok florian

3 years agomissing space character in ssh -G output broke the t-sshcfgparse
djm [Thu, 16 Sep 2021 05:36:03 +0000 (05:36 +0000)]
missing space character in ssh -G output broke the t-sshcfgparse
regression test; spotted by anton@

3 years agodrm/amdgpu/acp: Make PM domain really work
jsg [Thu, 16 Sep 2021 01:52:57 +0000 (01:52 +0000)]
drm/amdgpu/acp: Make PM domain really work

From Kai-Heng Feng
1f60072320b5f8071946e4b765cbf78a34d22a67 in linux 5.10.y/5.10.65
aff890288de2d818e4f83ec40c9315e2d735df07 in mainline linux

3 years agobump to LibreSSL 3.4.1
tb [Wed, 15 Sep 2021 17:14:26 +0000 (17:14 +0000)]
bump to LibreSSL 3.4.1

3 years agoSet the X509 validation depth limit to 12 or double the current depth.
claudio [Wed, 15 Sep 2021 15:51:05 +0000 (15:51 +0000)]
Set the X509 validation depth limit to 12 or double the current depth.
When the limit is reached the object is considered invalid and the tree
traversal stops on that node.
OK beck@ job@

3 years agoExplain that traceroute compresses * * * lines at the end of the
florian [Wed, 15 Sep 2021 15:25:56 +0000 (15:25 +0000)]
Explain that traceroute compresses * * * lines at the end of the
output when we never reach the destination.
Prompted by & input jmc

3 years agoRewrite and simplify dhcpleasectl(8).
florian [Wed, 15 Sep 2021 15:18:23 +0000 (15:18 +0000)]
Rewrite and simplify dhcpleasectl(8).

With this

dhcpleasectl em0

does the same as

dhclient em0

used to do. To please people's muscle memory one can be aliased to the other.

earlier version OK benno

with lots of help massaging the output & OK deraadt

3 years agoAdd build infrastructure for the libclang_rt.profile library.
fcambus [Wed, 15 Sep 2021 10:21:30 +0000 (10:21 +0000)]
Add build infrastructure for the libclang_rt.profile library.

Not linking it to the build yet.

"go for it" mortimer@

3 years agoFor the moment, restore if-shell and run-shell to parsing at the last
nicm [Wed, 15 Sep 2021 07:38:30 +0000 (07:38 +0000)]
For the moment, restore if-shell and run-shell to parsing at the last
moment (when the shell command completes) rather than when first
invoked, GitHub issue 2872.

3 years agoallow CanonicalizePermittedCNAMEs=none in ssh_config; ok markus@
djm [Wed, 15 Sep 2021 06:56:01 +0000 (06:56 +0000)]
allow CanonicalizePermittedCNAMEs=none in ssh_config; ok markus@

3 years agoRemove configured routes no longer present in lease.
florian [Wed, 15 Sep 2021 06:08:01 +0000 (06:08 +0000)]
Remove configured routes no longer present in lease.
Problem reported by claudio
OK benno

3 years agoImprove the uhid(4) manual:
anton [Wed, 15 Sep 2021 04:59:26 +0000 (04:59 +0000)]
Improve the uhid(4) manual:
* Include the relevant header in the synopsis
* Document all supported ioctl commands
* Emphasis that a pointer is required to all ioctl commands
* Make the write(2) semantics a bit clearer
* Add files section
* Document errors

ok jmc@

3 years agoChange the errno to ENOTTY when encountering an unknown ioctl command as
anton [Wed, 15 Sep 2021 04:57:47 +0000 (04:57 +0000)]
Change the errno to ENOTTY when encountering an unknown ioctl command as
opposed of using EINVAL which is ambiguous in this context.

ok deraadt@

3 years agoAvoid typedef redefinition
inoguchi [Tue, 14 Sep 2021 23:07:18 +0000 (23:07 +0000)]
Avoid typedef redefinition

"typedef struct ssl_st SSL;" is defined in ossl_typ.h.
This reverts part of r1.204.

ok tb@

3 years agosync
deraadt [Tue, 14 Sep 2021 19:12:12 +0000 (19:12 +0000)]
sync

3 years agoAdd missing void to definition of http_init().
tb [Tue, 14 Sep 2021 16:37:20 +0000 (16:37 +0000)]
Add missing void to definition of http_init().

ok deraadt florian

3 years agoCleanup some style issues and remove some unused code. In particular,
kettenis [Tue, 14 Sep 2021 16:21:21 +0000 (16:21 +0000)]
Cleanup some style issues and remove some unused code.  In particular,
remove the half-finished code to support the SV48 MMU page table layout.
Currently there is no hardware that supports that model and I don't expect
any hardware that does support it to show up anytime soon.

ok mlarkin@

3 years agoCleanup some style issues.
kettenis [Tue, 14 Sep 2021 16:18:57 +0000 (16:18 +0000)]
Cleanup some style issues.

ok mlarkin@

3 years agoMake pmap_extract() mpsafe by grabbing the kernel lock for userland pmaps
kettenis [Tue, 14 Sep 2021 16:16:51 +0000 (16:16 +0000)]
Make pmap_extract() mpsafe by grabbing the kernel lock for userland pmaps
while walking the page tables.

ok deraadt@

3 years agoMake pmap_extract() mpsafe by grabbing the kernel lock for userland pmaps
kettenis [Tue, 14 Sep 2021 16:14:50 +0000 (16:14 +0000)]
Make pmap_extract() mpsafe by grabbing the kernel lock for userland pmaps
while walking the page tables.

ok mpi@, deraadt@

3 years agozap trailing white space
tb [Tue, 14 Sep 2021 14:35:09 +0000 (14:35 +0000)]
zap trailing white space

3 years agoCall the info cb on connect/accept exit in TLSv1.3
tb [Tue, 14 Sep 2021 14:31:21 +0000 (14:31 +0000)]
Call the info cb on connect/accept exit in TLSv1.3

The p5-Net-SSLeay test expects the info callback to be called on
connect exit. This is the behavior in the legacy stack but wasn't
implemented in the TLSv1.3 stack. With this commit, p5-Net-SSLeay
tests are happy again after the bump.

ok bluhm inoguchi jsing

3 years agoprovide a small manual page for the SSL_set_psk_use_session_callback(3)
schwarze [Tue, 14 Sep 2021 14:30:57 +0000 (14:30 +0000)]
provide a small manual page for the SSL_set_psk_use_session_callback(3)
stub, written from scratch;
OK tb@ on SSL_set_psk_use_session_callback.3

3 years ago/usr/bin/timeout should not be in man sets
sthen [Tue, 14 Sep 2021 14:09:21 +0000 (14:09 +0000)]
/usr/bin/timeout should not be in man sets

3 years agoMerge the stub SSL_SESSION_is_resumable(3) manual page from the
schwarze [Tue, 14 Sep 2021 14:08:15 +0000 (14:08 +0000)]
Merge the stub SSL_SESSION_is_resumable(3) manual page from the
OpenSSL 1.1.1 branch, which is still under a free license.
A few tweaks to wording and structure by me.
OK tb@ on SSL_SESSION_is_resumable.3

3 years agoAs suggested by tb@, merge the description of OPENSSL_EC_NAMED_CURVE
schwarze [Tue, 14 Sep 2021 13:47:59 +0000 (13:47 +0000)]
As suggested by tb@, merge the description of OPENSSL_EC_NAMED_CURVE
and OPENSSL_EC_EXPLICIT_CURVE
from OpenSSL commit 146ca72c Feb 19 14:35:43 2015 +0000
after tb@ changed the default from 0 to OPENSSL_EC_NAMED_CURVE
in ec/ec_lib.c rev. 1.41,
which is the same default that OpenSSL uses since 1.1.0.

While merging, drop the description of the pre-1.1.0 behaviour.
It seems irrelevant to me because tb@ found no application in Debian
codesearch using OPENSSL_EC_EXPLICIT_CURVE.  A former devious default
that was probably never relied upon by anyone does not need to be
documented.

3 years agoSync
jca [Tue, 14 Sep 2021 12:04:34 +0000 (12:04 +0000)]
Sync

3 years agoProvide instruction cache invalidation through sysarch(RISCV_ICACHE_SYNC)
jca [Tue, 14 Sep 2021 12:03:49 +0000 (12:03 +0000)]
Provide instruction cache invalidation through sysarch(RISCV_ICACHE_SYNC)

Modelled after the arm implementation.  The first consumer would be
__builtin___clear_cache() in libcompiler_rt.

Input from kettenis@ and deraadt@, ok kettenis@

3 years agoDo not download more than 300 deltas to sync a RRDP repo. Somewhere around
claudio [Tue, 14 Sep 2021 11:38:44 +0000 (11:38 +0000)]
Do not download more than 300 deltas to sync a RRDP repo. Somewhere around
300 the time it takes to fetch and process all the deltas is higher than
fetching just a snapshot.
OK job@ sthen@

3 years agoput back the mux_ctx memleak fix for SSH_CHANNEL_MUX_CLIENT
mbuhl [Tue, 14 Sep 2021 11:04:21 +0000 (11:04 +0000)]
put back the mux_ctx memleak fix for SSH_CHANNEL_MUX_CLIENT
OK mfriedl@

3 years agoFix regression test, prodded by bluhm@
mpi [Tue, 14 Sep 2021 09:52:12 +0000 (09:52 +0000)]
Fix regression test, prodded by bluhm@

3 years agoAdd missing kernel lock for Bi-directional Forwarding Detection data.
mvs [Tue, 14 Sep 2021 09:15:55 +0000 (09:15 +0000)]
Add missing kernel lock for Bi-directional Forwarding Detection data.

Also bfdset() calls pool_get(9) with PR_WAITOK flag so it should be done
before we check the existence of this `bfd', otherwise it could be added
multiple times.

We have BFD disabled in the default kernel so this diff is for
consistency mostly.

ok mpi@

3 years agoEnable cy(4) on amd64.
jan [Tue, 14 Sep 2021 08:19:58 +0000 (08:19 +0000)]
Enable cy(4) on amd64.

ok deraadt

3 years agoWhen the dhcp server is unreachable via unicast UDP retry broadcast.
florian [Tue, 14 Sep 2021 07:51:51 +0000 (07:51 +0000)]
When the dhcp server is unreachable via unicast UDP retry broadcast.

The only indication we get is sendto(2) failing, so if our UDP packet
is silently dropped somewhere we won't notice.

This has been observed in the wild with a dhcp server at the remote
end of a VPN. The dhcp server is reachable via broadcast so we get an
initial lease. However the server is not in the same subnet as the
lease we are getting so to reach it unicast we depend on a default
route being set. When the VPN goes down we lose the default route [*]
and when dhcpleased then tries to renew the lease (unicast), sendto(2)
fails with "network unreachable".

[*] The exact mechanics on how this happens are unclear. I.e. why
didn't dhcpleased(8) see a link-state change and transitioned to
REBOOTING / INIT? Regardless, we shouldn't ignore sendto(2) errors.

Reported by stsp, OK benno

3 years agovmm(4): add limit to number of vcpus
dv [Mon, 13 Sep 2021 22:16:27 +0000 (22:16 +0000)]
vmm(4): add limit to number of vcpus

After fixing previous syzbot issues related to lock contention, the reproducer code managed to hit an issue where it can exhaust kernel memory by allocating vcpus. Since each vcpu (regardless if it's SVM or VMX-capable) requires wiring some number of pages of memory, it was possible to starve other parts of the kernel.

This change limits the total number of vcpus to 512, a conservative number given vmm(4) only supports single vcpu guests at the moment.

ok mlarkin@

3 years agosync
deraadt [Mon, 13 Sep 2021 17:45:59 +0000 (17:45 +0000)]
sync