tb [Mon, 5 Apr 2021 07:02:50 +0000 (07:02 +0000)]
Don't leak param->name in x509_verify_param_zero()
For dynamically allocated verify parameters, param->name is only ever set
in X509_VERIFY_set1_name() where the old one is freed and the new one is
assigned via strdup(). Setting it to NULL without freeing it beforehand is
a leak.
looks correct to millert, ok inoguchi
kn [Mon, 5 Apr 2021 00:51:14 +0000 (00:51 +0000)]
Remove unused variables
From Daniel Kovacic <daniel dot kovacic at unbugd dot com>, thanks!
No object change.
deraadt [Sun, 4 Apr 2021 23:03:07 +0000 (23:03 +0000)]
leave -beta
tb [Sun, 4 Apr 2021 20:40:48 +0000 (20:40 +0000)]
Add missing error check for AES_unwrap_key().
tb [Sun, 4 Apr 2021 20:21:43 +0000 (20:21 +0000)]
Fix two copy paste errors in error messages
tb [Sun, 4 Apr 2021 20:16:29 +0000 (20:16 +0000)]
Add tests for DTLSv1_2{,_client,_server}_method()
deraadt [Sun, 4 Apr 2021 20:08:49 +0000 (20:08 +0000)]
431 is an overlay over 204 (Manitoba)
tb [Sun, 4 Apr 2021 19:55:46 +0000 (19:55 +0000)]
Use correct type for tmp in test_write_bytes()
tb [Sun, 4 Apr 2021 19:36:09 +0000 (19:36 +0000)]
Explicitly NULL pointers to avoid a double free.
tb [Sun, 4 Apr 2021 19:32:26 +0000 (19:32 +0000)]
Don't leak key and dh in the error path.
tb [Sun, 4 Apr 2021 16:19:47 +0000 (16:19 +0000)]
Clean up client and server tls{,_config} contexts in tls_test().
Leaks reported by Ilya Shipitsin.
kn [Sun, 4 Apr 2021 15:25:11 +0000 (15:25 +0000)]
Document support subset of conversion specification
Clarify that printf(9) only knows
%[width][size]conversion
contrary to printf(3)'s
%[argno$][flags][width][.precision][size]conversion
Feedback OK jmc
OK deraadt
jmc [Sun, 4 Apr 2021 11:36:56 +0000 (11:36 +0000)]
remove stray inserts; from matthias schmidt
jmc [Sun, 4 Apr 2021 06:18:58 +0000 (06:18 +0000)]
fix spacing issue in macro;
jmc [Sun, 4 Apr 2021 06:11:24 +0000 (06:11 +0000)]
missing comma; from kawashima james
tobhe [Sat, 3 Apr 2021 21:29:14 +0000 (21:29 +0000)]
Add size check for sockaddr mask.
patrick [Sat, 3 Apr 2021 15:59:08 +0000 (15:59 +0000)]
Add a guard page between I/O virtual address space allocations. The idea
is that IOVA allocations always have a gap in-between which produces a fault
on access. If a transfer to a given allocation runs further than expected
we should be able to see it. We pre-allocate IOVA on bus DMA map creation,
and as long as we don't allocate a PTE descriptor, this comes with no cost.
We have plenty of address space anyway, so adding a page-sized gap does not
hurt at all and can only have positive effects.
Idea from kettenis@
patrick [Sat, 3 Apr 2021 15:10:58 +0000 (15:10 +0000)]
Exclude the first page from I/O virtual address space, which is the NULL
pointer address. Not allowing this one to be allocated might help find
driver bugs, where the device is programmed with a NULL pointer. We have
plenty of address space anyway, so excluding this single page does not
hurt at all and can only have positive effects.
Idea from kettenis@
tb [Sat, 3 Apr 2021 13:34:45 +0000 (13:34 +0000)]
Run the CMAC tests through EVP_PKEY_new_CMAC_key().
djm [Sat, 3 Apr 2021 06:58:30 +0000 (06:58 +0000)]
typos in comments; GHPR#180 from Ville Skyttä
djm [Sat, 3 Apr 2021 06:55:52 +0000 (06:55 +0000)]
sync CASignatureAlgorithms lists with reality. GHPR#174 from
Matt Hazinski
djm [Sat, 3 Apr 2021 06:18:40 +0000 (06:18 +0000)]
highly polished whitespace, mostly fixing spaces-for-tab and bad
indentation on continuation lines. Prompted by GHPR#185
djm [Sat, 3 Apr 2021 05:54:14 +0000 (05:54 +0000)]
whitespace (tab after space)
djm [Sat, 3 Apr 2021 05:46:41 +0000 (05:46 +0000)]
fix incorrect plural; from Ville Skyttä via GHPR#181
djm [Sat, 3 Apr 2021 05:40:39 +0000 (05:40 +0000)]
ensure that pkcs11_del_provider() is called before exit - some PKCS#11
providers get upset if C_Initialize is not matched with C_Finalize.
From Adithya Baglody via GHPR#234; ok markus
djm [Sat, 3 Apr 2021 05:28:43 +0000 (05:28 +0000)]
unused variable
djm [Sat, 3 Apr 2021 05:21:46 +0000 (05:21 +0000)]
Fix two problems in string->argv conversion: 1) multiple backslashes
were not being dequoted correctly and 2) quoted space in the middle
of a string was being incorrectly split.
A unit test for these cases has already been committed
prompted by and based on GHPR#223 by Eero Häkkinen; ok markus@
dv [Fri, 2 Apr 2021 19:07:18 +0000 (19:07 +0000)]
Remove superflouus mmcpy()
Reported by Preben Guldberg. ok mlarkin@
claudio [Fri, 2 Apr 2021 17:10:12 +0000 (17:10 +0000)]
In http_connect() if the connect was actually successful break out of the
for loop. Also in http_finish_connect() if the connect was successful
cleanup the addrinfo struct. It is no longer needed.
Found with deraadt@
deraadt [Fri, 2 Apr 2021 16:41:36 +0000 (16:41 +0000)]
info gotten via getnameinfo in http_connect() is not used anymore, it is
old debugging gunk
ok claudio
otto [Fri, 2 Apr 2021 14:20:57 +0000 (14:20 +0000)]
Two cases of BRE involving counts and backrefs that go wrong and
similar that have no isssues. Reported by Michael Paoli. Failing
cases commented out for now.
claudio [Fri, 2 Apr 2021 11:35:05 +0000 (11:35 +0000)]
Include the default cert.pem file path in tls_load_file error message.
Should help for -portable where sometimes the cert.pem is missing.
inoguchi [Fri, 2 Apr 2021 10:19:19 +0000 (10:19 +0000)]
Show DTLS1.2 message with openssl(1) s_server and s_client
ok jsing@ tb@
tb [Fri, 2 Apr 2021 08:07:47 +0000 (08:07 +0000)]
Don't leak the uri of a delta with duplicate serial.
ok claudio deraadt
eric [Fri, 2 Apr 2021 07:00:30 +0000 (07:00 +0000)]
swap rname and mname in debug output, and handle the USE_CD flag
from Boudewijn Dijkstra
florian [Fri, 2 Apr 2021 06:44:24 +0000 (06:44 +0000)]
configyyrename.h is no longer needed with the switch to flex -P c_.
This was also removed upstream.
OK sthen
florian [Fri, 2 Apr 2021 06:37:40 +0000 (06:37 +0000)]
Implement ZONEMD (RFC8976), based on DS (ds_43.c)
OK sthen
eric [Fri, 2 Apr 2021 06:30:55 +0000 (06:30 +0000)]
if cipher list is not specified for a relay action, use the global
cipher list if defined. otherwise fallback to libtls default.
ok millert@
jmc [Fri, 2 Apr 2021 06:11:01 +0000 (06:11 +0000)]
fix sentence structure;
jmc [Fri, 2 Apr 2021 06:09:44 +0000 (06:09 +0000)]
tweak previous;
tb [Fri, 2 Apr 2021 05:16:29 +0000 (05:16 +0000)]
fix typo + some whitespace
tb [Fri, 2 Apr 2021 03:02:45 +0000 (03:02 +0000)]
Fix Dale's email address
ok drahn
deraadt [Fri, 2 Apr 2021 02:30:29 +0000 (02:30 +0000)]
sync
deraadt [Fri, 2 Apr 2021 02:29:54 +0000 (02:29 +0000)]
don't put ptys onto the ramdisk media
from miod
tb [Fri, 2 Apr 2021 02:20:17 +0000 (02:20 +0000)]
Indent struct members like everywhere else.
dv [Fri, 2 Apr 2021 01:56:20 +0000 (01:56 +0000)]
Document ioctl(2)'s for vmm(4). OK kn@.
job [Thu, 1 Apr 2021 17:43:11 +0000 (17:43 +0000)]
Update manpage about RRDP
OK claudio@
jmc [Thu, 1 Apr 2021 16:59:57 +0000 (16:59 +0000)]
update currency exchange rates;
jmc [Thu, 1 Apr 2021 16:58:56 +0000 (16:58 +0000)]
sort options list;
deraadt [Thu, 1 Apr 2021 16:50:23 +0000 (16:50 +0000)]
spelling
tb [Thu, 1 Apr 2021 16:40:05 +0000 (16:40 +0000)]
Sort usage: rR -> Rr
claudio [Thu, 1 Apr 2021 16:16:44 +0000 (16:16 +0000)]
RRDP is currently off by default.
krw [Thu, 1 Apr 2021 16:07:44 +0000 (16:07 +0000)]
Tweak log_debug() verbiage to reduce repetitive info
(ACK/NAK), add details (DISCOVER/REQUEST) and provide
before/after info for SSID/LLADDR/MTU changes.
claudio [Thu, 1 Apr 2021 16:04:48 +0000 (16:04 +0000)]
Initial commit of RRDP (The RPKI Repository Delta Protocol - RFC8182) support
in rpki-client. For now it is off by default.
All XML processing is done in its own process with minimal pledge rights.
It uses the already present https process to fetch the xml files and uses
the master porcess to handle the file IO into the repositories.
RRDP data is stored in the cache under ./rrdp/ and the first directory
is the SHA256 hash of the notify URI.
Fetching snapshots and deltas works to bring the cache up to date.
If something goes wrong rpki-client will fall back to rsync.
RRDP was implemented by Nils Fisher and integrated into rpki-client by myself.
"Time to get it in" deraadt@
deraadt [Thu, 1 Apr 2021 14:27:47 +0000 (14:27 +0000)]
For the snprintf range check demo, add a (size_t) cast in the right place
which will satisfy the toughest compiler options
krw [Thu, 1 Apr 2021 13:17:48 +0000 (13:17 +0000)]
Also immediately accept the *first* OFFER if it matches the requested address,
rather than waiting for select_timeout to expire before accepting the same
OFFER.
kn [Thu, 1 Apr 2021 12:06:00 +0000 (12:06 +0000)]
Clean up nonexistent/unused properties handling
Never used since import and probably just ported over from NetBSD as-is;
"design-capacity" does not exist in the device tree binding.
"monitor-interval-ms" defaults to 250ms as per binding and could be used
in the sensor_task_register() call, but our framework only supports whole
seconds and there's no advantage over our current fixed poll interval of 5s.
OK patrick
dv [Thu, 1 Apr 2021 11:05:47 +0000 (11:05 +0000)]
Remove extraneous call of vm_getbyvmid during pause event
The vm is already being assigned by a call in the if-condition.
job [Thu, 1 Apr 2021 11:04:30 +0000 (11:04 +0000)]
Abate superfluous lines from remote servers
OK claudio@
inoguchi [Thu, 1 Apr 2021 10:47:38 +0000 (10:47 +0000)]
Compare the pointer variable explicitly with NULL in if condition
kn [Thu, 1 Apr 2021 10:34:21 +0000 (10:34 +0000)]
Hardcode meaningful alert level, track apm's battery state better
The current code looks for the nonexistent "cellwise,alert-level" property
and falls back to zero as threshold (like the original NetBSD code).
It also updates the CONFIG register with that very threshold to let the
hardware set a bit and thus alert us when it has been reached.
Since our sensor framework is designed to poll every N seconds and this
driver does not actually look at whether the hardware alerted, neither
using a default threshold of zero nor updating the hardware with it makes
sense.
Remove the alert level code and simply map >50%, >25% and <=25% of
remaining battery life to apm(4)'s "high", "low" and "critical" battery
state respectively; this matches exactly what acpibat(4) does and provides
more meaningful sensor readings without relying on nonexistent device tree
bindings.
Feedback OK patrick
sthen [Thu, 1 Apr 2021 09:56:11 +0000 (09:56 +0000)]
merge NSD 4.3.6rc1
sthen [Thu, 1 Apr 2021 09:55:16 +0000 (09:55 +0000)]
import NSD 4.3.6rc1, tested by me and florian@
mvs [Thu, 1 Apr 2021 08:39:52 +0000 (08:39 +0000)]
Push kernel lock down to umb_rtrequest().
We are going to unlock PF_ROUTE sockets. This means `if_rtrequest'
handler will be performed without kernel lock.
umb_rtrequest() calls umb_send_inet_proposal() which touches kernel lock
protected `ipv{4,6}dns' array. Also umb_rtrequest() is the only handler
which requires kernel lock to be held. So push the lock down to
umb_rtrequest() instead of grab it around `if_rtrequest' call.
This hunk was commited separately for decreases PF_ROUTE sockets
unlocking diff.
ok gerhard@ deraadt@
claudio [Thu, 1 Apr 2021 08:29:10 +0000 (08:29 +0000)]
Make build_crls() behave like build_chain(). If there is not auth data
just NULL the STACK_OF() pointer since libcrypto calls can handle that.
Update comments to be more accurate.
With and OK tb@
claudio [Thu, 1 Apr 2021 06:53:49 +0000 (06:53 +0000)]
Do a better job at cleaning up. Remove empty directories, scan not only the
known repositories but also clean up no longer known repositories.
With this rpki-client keeps its cache nice and shiny.
With and OK job@
claudio [Thu, 1 Apr 2021 06:47:18 +0000 (06:47 +0000)]
Add encoding.c to the various build targets
nicm [Thu, 1 Apr 2021 06:46:12 +0000 (06:46 +0000)]
Change search-again with vi keys to work like actual vi(1), also some
other fixes. From Aaron Jensen with help from Anindya Mukherjee.
claudio [Thu, 1 Apr 2021 06:43:23 +0000 (06:43 +0000)]
Move base64 and hex encoding functions into their own place.
OK tb@
nicm [Thu, 1 Apr 2021 06:37:46 +0000 (06:37 +0000)]
Missing commas, from Vipul Kumar.
djm [Wed, 31 Mar 2021 22:16:34 +0000 (22:16 +0000)]
Use new limits@openssh.com protocol extension to let the client select
good limits based on what the server supports. Split the download and
upload buffer sizes to allow them to be chosen independently.
In practice (and assuming upgraded sftp/sftp-server at each end), this
increases the download buffer 32->64KiB and the upload buffer
32->255KiB.
Patches from Mike Frysinger; ok dtucker@
djm [Wed, 31 Mar 2021 21:59:26 +0000 (21:59 +0000)]
cannot effectively test posix-rename extension after changes in
feature advertisment.
djm [Wed, 31 Mar 2021 21:58:07 +0000 (21:58 +0000)]
do not advertise protocol extensions that have been disallowed by
the command-line options (e.g. -p/-P/-R); ok dtucker@
krw [Wed, 31 Mar 2021 21:17:46 +0000 (21:17 +0000)]
Set 'select_timeout' to 'now' when an OFFER is received for the IP address
requested in the DISCOVER.
i.e. immediately accept the OFFER rather than waiting for select_timeout to
expire before accepting the same OFFER.
A corner case since select-timeout is 0 by default.
krw [Wed, 31 Mar 2021 20:52:09 +0000 (20:52 +0000)]
Add two missing checks for strdup() returning NULL.
jmc [Wed, 31 Mar 2021 20:41:35 +0000 (20:41 +0000)]
one of the examples needs an -N (and explanation);
diff from robert scheck
discussed with and tweaked by sthen
jmc [Wed, 31 Mar 2021 20:36:05 +0000 (20:36 +0000)]
add --no-motd to SYNOPSIS;
job [Wed, 31 Mar 2021 19:45:16 +0000 (19:45 +0000)]
Add option to suppress the Message of the Day
Fine deraadt@
schwarze [Wed, 31 Mar 2021 19:31:35 +0000 (19:31 +0000)]
tweak column widths of a .Bl -column table
and avoid an over-long source line while here;
OK martijn@ jmc@
eric [Wed, 31 Mar 2021 19:09:19 +0000 (19:09 +0000)]
turn log_trace() into a macro to prevent evaluating the format string
parameters when tracing is not enabled.
ok millert@
tb [Wed, 31 Mar 2021 18:03:13 +0000 (18:03 +0000)]
Update for DTLSv1.2 support.
eric [Wed, 31 Mar 2021 17:47:16 +0000 (17:47 +0000)]
allow to specify tls protocols and ciphers on relay actions
ok espie@ sthen@ tb@
eric [Wed, 31 Mar 2021 17:42:24 +0000 (17:42 +0000)]
change the barrier so that fd's are always passed and received with
the first byte of the imsg they belong to.
idea, tweaks and ok claudio@
tb [Wed, 31 Mar 2021 17:13:54 +0000 (17:13 +0000)]
Remove workarounds for SSL_is_dtls()
Reminded by inoguchi jsing
tb [Wed, 31 Mar 2021 17:10:13 +0000 (17:10 +0000)]
Remove workaround for missing d2i_DSAPrivateKey_fp prototype
tb [Wed, 31 Mar 2021 17:04:18 +0000 (17:04 +0000)]
sync
tb [Wed, 31 Mar 2021 17:02:18 +0000 (17:02 +0000)]
Bump minors after symbol addition
tb [Wed, 31 Mar 2021 16:59:32 +0000 (16:59 +0000)]
Expose various DTLSv1.2 specific functions and defines
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:56:46 +0000 (16:56 +0000)]
Document SSL_set_hostflags(3) and SSL_get0_peername(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:55:04 +0000 (16:55 +0000)]
Expose SSL_set_hostflags(3) and SSL_get0_peername(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:53:30 +0000 (16:53 +0000)]
Document SSL_use_certificate_chain_file(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:52:15 +0000 (16:52 +0000)]
Expose SSL_use_certificate_chain_file(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:51:06 +0000 (16:51 +0000)]
Provide missing prototype for d2i_DSAPrivateKey_fp(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:48:43 +0000 (16:48 +0000)]
Document EVP_PKEY_new_CMAC_key(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:47:00 +0000 (16:47 +0000)]
Provide EVP_PKEY_new_CMAC_key(3)
ok bcook inoguchi jsing
claudio [Wed, 31 Mar 2021 16:11:02 +0000 (16:11 +0000)]
Set the process title for the rpki-client subprocesses so they can be
identified more easily.
OK deraadt@
krw [Wed, 31 Mar 2021 15:32:11 +0000 (15:32 +0000)]
Fix some debug output when running in foreground.
Call tick_msg() at startup so it knows if the link
is up. Don't emit 'link timeout expired' messages
after the link has been up.
visa [Wed, 31 Mar 2021 12:59:50 +0000 (12:59 +0000)]
Make ddb's dependency on libz explicit.
OK deraadt@ mpi@
sthen [Wed, 31 Mar 2021 09:59:32 +0000 (09:59 +0000)]
sync
sthen [Wed, 31 Mar 2021 09:59:21 +0000 (09:59 +0000)]
Remove redundant "HUAWEI Mobile" in usbdevs strings, mention radio
technology where known. ok deraadt