1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 15:25:38 -08:00
Commit Graph

29934 Commits

Author SHA1 Message Date
deraadt
e3b2bc7ec4 document why sys/param.h is used 2024-09-25 04:19:36 +00:00
jmc
cc67ceff40 - VM(s) -> VMs
- simpler tense
- fix the -width parameter
- add -nosplit to AUTHORS
2024-09-24 20:02:39 +00:00
mlarkin
b999ee2ed7 vmd(8) manpage change for shutdown behaviour
Document the shutdown behaviour for vmd(8). Suggested via bugs@
via eric at mulh.net.

ok jmc@, bluhm@
2024-09-24 19:34:01 +00:00
florian
8aa961cf3a Remove -r toggle and generally be less smart.
The default is to install the next release. Snapshots are only
installed when invoked with -s.

The logic on what to do per default got out of hand and it was very
difficult to reason about what sysupgrade(8) actually did. deraadt@
then suggested that we should dumb it all down, sysupgrade(8) is there
to upgrade from one release to the next. More advance usage needs to
be requested by the user.

With all this simplification we can now be a bit more smart to work
out what the next release is. With that, snapshots right before a
release can be sysupgrade(8)'ed to the official release.

OK sthen on a previous version that was much more complicated but
allowed shortly-before-release -> release upgrade

testing sthen on this version

Guidance, prodding & OK deraadt
2024-09-24 07:33:35 +00:00
aisha
e95f2867f8 add route-to example
ok benno@
2024-09-21 05:37:26 +00:00
mlarkin
4716c5471a vmm.h is a needed include now 2024-09-21 04:12:18 +00:00
jsg
479c151d34 remove unneeded semicolons; checked by millert@ 2024-09-20 02:00:46 +00:00
tb
acc4629865 Shift 1U rather than 1 to avoid -Wsign-compare whining
claudio agress
2024-09-19 20:48:36 +00:00
job
824a3a1adc Move rpki-client to 9.3
requested by tb@
2024-09-19 13:45:07 +00:00
claudio
21826c937b Remove spaces before EOL. 2024-09-19 08:55:22 +00:00
denis
620bdc4b89 document how to add a restricted socket
OK claudio@
2024-09-19 06:12:46 +00:00
millert
6a4024dc43 zic: cherrypick support for %z in time zone formats
This extends the zic input format to add support for %z, which
expands to a UTC offset in as-short-as-possible ISO 8601 format.
It's intended to better support zones that do not have an established
abbreviation already.  tzdata2024b and higher require a version of
zic that supports the %z format.  From upstream tzcode.  OK beck@
2024-09-18 17:05:50 +00:00
bluhm
8e5fcb6eaf Mention psp(4) in vm.conf(5) man page.
from hshoexer@; OK mlarkin@
2024-09-16 22:30:01 +00:00
jsg
8fbd69a9e8 __STDC_VERSION__ not __STDC_VERSION; ok miod@ 2024-09-15 05:49:05 +00:00
yasuoka
4946f6941b Improve the log messages and white spaces. 2024-09-15 05:31:23 +00:00
yasuoka
cfa11a856b Keep the number of requests for a DAE server below 64 to avoid
congestion.
2024-09-15 05:29:11 +00:00
yasuoka
eff8f878b4 Add "delete" command to "radiusctl ipcp". Also, send "stop" that was
missing when disconnecting all when acct-{on,off} received.
2024-09-15 05:26:05 +00:00
yasuoka
065d5e7678 Handle EAGAIN properly and fix the log when disconnected. 2024-09-15 05:14:32 +00:00
tb
904d9c60a4 Reintroduce check that CRL Number is in range
The CRL number draft clarified what ignoring means and it includes checking
that the CRL number is well-formed again. So do this but continue to ignore
the value for any other purpose. This refactors x509_convert_seqnum() into
a couple of helpers. There's some duplication between crl_check_crl_number()
and crl_parse_crl_number() which could be removed if anyone cares.

tweaks/ok job
2024-09-12 10:33:25 +00:00
bluhm
f4b47ae8c1 Implement AMD SEV support in vmd(8).
To launch a guest with AMD SEV enabled, vmd needs to do a few things:
- retrieve ASID used by guest on VM creation
- provide ASID to psp(4)
- let psp(4) encrypt memory used intially by guest
- run guest
- release resources held by psp(4) on guest shutdown
To enable SEV for a guest use the parameter "sev" in the guest's vm
section in vm.conf.

from hshoexer@; OK mlarkin@
2024-09-11 15:42:52 +00:00
tb
9ea7911738 Use doc/html link for consistency 2024-09-10 18:37:42 +00:00
tb
cbb03a40aa Add reference to the manifest numbers draft
ok job
2024-09-10 18:34:19 +00:00
claudio
e386eeb169 Be more careful with aspath that have 0 length (aka the empty AS_PATH).
Again malloc(0) is not portable and calling memcpy with a NULL pointer
and a 0 length is not allowed by the C standard.

OK tb@
2024-09-10 09:38:45 +00:00
claudio
07ef39656b community_copy needs to check if nentries is 0 and handle that specially.
Calling malloc / reallocarray with a 0 size is not portable and the
memcpy with a possible NULL pointer as source and 0 len is seen as UB
by newer C standards (grmbl).

OK tb@
2024-09-10 08:53:20 +00:00
claudio
e5e5eb1a03 AID_VPN_IPv4 and AID_VPN_IPv6 require a labellen that is non-zero.
OK tb@
2024-09-10 08:47:51 +00:00
claudio
d9facda501 Enfroce proper encoding of ASPA announce/withdraw PDU.
An announce PDU requires at least one provider ASnum while a withdraw
must not include any provider ASnums. The first is mandated by the ASPA
profile and the 2nd by the 8210bis draft.

Further cleanup some leftovers from the old per-AFI split of ASPA.
OK tb@
2024-09-10 08:41:13 +00:00
claudio
c2b3ae36d4 Use reallocarray() instead of recallocarray(), this code does not need the
extra security measures of recallocarray() which adds a lot of overhead.
OK tb@
2024-09-10 08:37:52 +00:00
claudio
457c3e2447 Handle the CLUSTER_LIST attribute as described in RFC7606
Just drop the attribute if received from an external peer.
Treat as withdraw if the len is 0 or not % 4.
OK tb@
2024-09-09 15:00:45 +00:00
claudio
173da11705 There is no need for an explicit size check for IMSG_RECONF_ASPA_TAS
imsg_get_data() does the same and produces the same error.
OK tb@
2024-09-09 14:58:47 +00:00
claudio
6116e163fc Use msgbuf_init() instead of hand initalizing the msgbuf.
OK tb@
2024-09-09 12:59:49 +00:00
tb
f452fe1ca0 rpki-client: fix typos in comments and one in a warning message 2024-09-08 07:23:36 +00:00
mpi
6243ff0b1b Interpret the argument of '%c' as an integer instead of a string.
From Christian Ludwig.
2024-09-06 07:58:50 +00:00
claudio
6e684d5963 Bump version 2024-09-05 20:28:42 +00:00
jmc
79053326db have sysmerge and sysupgrade Xr each other;
diff originally from peter n. m. hansteen

ok ajacoutot
2024-09-05 06:39:53 +00:00
jmc
6b028660f0 note that "|" and ":include:" are disallowed for root;
prompted by mail from illya meyer

ok gilles
2024-09-05 06:33:04 +00:00
jmc
1893b9de7c remove note falsely claiming that :include: is disallowed
(it is, but only for root, which i'll address in separate commit);

ok mp gilles
2024-09-05 05:51:46 +00:00
job
5f0faded70 Remove deprecated '-r' command line option
OK tb@ claudio@
2024-09-04 15:46:43 +00:00
claudio
3e51611556 Qualifying nexthops via BGP does not properly work since nexthops need
to be rechecked when a BGP route is added (or changed).

We need to revalidate nexthops on inserts (kroute_insert) and
on change (krX_change but only for AID_INET and AID_INET6 -- no nexthops
in the other tables) the nexthop needs to be updated.

Only validate nexthops if 'nexthop qualify via bgp' is enabled. For route
changes the code can depend on the F_NEXTHOP flag.

Fix for: https://github.com/openbgpd-portable/openbgpd-portable/issues/81
OK tb@
2024-09-04 15:06:36 +00:00
claudio
7f893e0cba Call pfkey_remove() only after the Session Engine finished reloading its
configuration. Doing so before could result in some messages being sent
out without proper TCP-MD5 signature.

Fix for: https://github.com/openbgpd-portable/openbgpd-portable/issues/82
OK tb@
2024-09-04 13:30:10 +00:00
sthen
98bc733b08 merge unbound 1.21.0 2024-09-04 09:36:40 +00:00
sthen
a43524d9cc import unbound 1.21.0, ok phessler florian 2024-09-04 09:35:34 +00:00
op
ad8d242dc7 fix some typos; courtesy of codespell; ok gilles@ 2024-09-03 18:27:04 +00:00
tb
be9e59b4e0 Make state file parsing errors more explicit. Also don't leak the deltas.
joint effort with/ok claudio
2024-09-03 15:37:03 +00:00
job
20c31060e0 Also gate SPL statistics behind 'experimental' command line option
This changes the JSON output, without -x some keys are missing from 'metadata'

OK tb@
2024-09-03 15:04:48 +00:00
claudio
dbcd1c3144 In rrdp_session_parse() set the last_reset time to now if the .state file
does not exist.
OK tb@
2024-09-03 13:31:31 +00:00
gilles
7ceb9f7fe4 bump version 2024-09-03 12:07:40 +00:00
job
6dd0ae0386 Increase number of concurrent RRDP session handler slots
OK claudio@
2024-09-02 11:56:22 +00:00
yasuoka
7c8f25c75a Coding of the handling of errors for <sequence number> hadn't be completed. 2024-09-02 04:45:22 +00:00
tb
aec10a2afd Unify proc_parser_* as far as possible and reasonable
ok claudio job
2024-08-29 13:46:28 +00:00
job
1f3d741282 Improve warning message
Requested by claudio@

OK tb@
2024-08-29 09:54:13 +00:00
job
d0a27ef8be Periodically reinitialize RRDP sessions to snapshot at random intervals
It is technically possible for a series of RRDP deltas and a snapshot
to diverge. An RRDP server could distribute files via Deltas and then
forget about those files, causing copies to remain stuck in the caches
of RRDP clients. Resetting RRDP sessions once every few weeks helps with
garbage collection.

In week 0 the probability of triggering re-initialization is ~0.025% and
doubles every week, in week 11 its 50% and always after week 12. Thus,
RPs will reinitialize at least once every 3 months.

OK tb@ claudio@
2024-08-29 09:53:04 +00:00
naddy
d7d958b800 Stop printing the "syscall" bit in the header line, too.
ok deraadt@
2024-08-28 14:22:36 +00:00
claudio
c4328fc634 Introduce peer_is_up() and use it instead of peer->state == PEER_UP checks
also enqueue update and rrfresh imsgs only if the peer is up and flush them
once this is no longer the case.
OK tb@
2024-08-28 13:21:39 +00:00
claudio
174b88088d Check the max_prefix and max_out_prefix limit during config reload.
This is cheap and will trigger immediatly instead of waiting until
the next UPDATE happens (which could happen a lot later).
OK tb@ job@
2024-08-28 13:18:11 +00:00
tb
78a26022da sync ibuf_realloc() copy with libutil
This pulls in an overflow check and the change from recallocarray() to
realloc(). claudio tells me that we might soon get rid of this copy.

ok claudio
2024-08-28 09:39:17 +00:00
florian
84b182f831 Mechanically change inet_aton to inet_pton.
Documentation says IP addresses are not truncated, so the parser can
be stricter and only accept dotted IP addresses.

OK yasuoka
2024-08-27 06:06:14 +00:00
florian
bda27a8758 Use getaddrinfo to parse IP addresses and lookup names.
Input & OK bluhm
2024-08-27 06:04:03 +00:00
florian
cd13aecf35 Use getaddrinfo to parse IP addresses and lookup names.
OK bluhm
2024-08-27 06:03:20 +00:00
sthen
31e6f1a8e9 Change DHCP_SYNC_LEASE messages from log_info to log_debug, they result
in quite a lot of noise in a typical dhcpd sync setup.

From Michał Markowski, ok florian
2024-08-24 08:35:24 +00:00
jsg
7f966493ce FALLTROUGH -> FALLTHROUGH 2024-08-23 01:23:50 +00:00
millert
988a3bdaeb cron: use strtonum() and tighter limits on step values
Using strtonum() instead of atoi() gives us an extra layer of bounds
checking for free while parsing an entry.  This is in addition to
the existing bounds checking in set_range().  The step value is now
limited to the maximum range for an entry.  If the field consists
of a range, the step must not be larger than the difference between
the high and low parts of the range.  OK deraadt@
2024-08-23 00:58:04 +00:00
millert
0569e73d7d Change SIGCHLD handler to just set a flag.
We already call reap_kids() in multiple event loops so there is no
need to call waitpid() inside the handler itself.
OK denis@ deraadt@
2024-08-23 00:43:34 +00:00
jsg
1e0c60bff8 sync manual section numbers 2024-08-22 10:00:16 +00:00
tb
d2a044ef87 ospfd: fix whitespace error introduced in previous 2024-08-22 08:34:51 +00:00
florian
f885c9d92a inet_pton returns 0 and -1 for error.
Adjust the error check that is now wrong after the inet_aton -> inet_pton
conversion.

Noticed by & OK bluhm.
OK tb
2024-08-22 08:17:54 +00:00
florian
262a2674c1 Mechanically change inet_aton to inet_pton.
npppd does not document that it would accept truncated or otherwise
not fully spelled out IPv4 addresses.

ok yasuoka
2024-08-22 07:56:47 +00:00
job
2b6cb12d02 Increase maximum Signed Object size to 8MB
OK tb@ claudio@
2024-08-21 19:35:31 +00:00
florian
f6661b320d An area is either a decimal number or an IPv4 address.
This lets us replace inet_aton with inet_pton since we do not need
inet_aton's flexibility.

phessler, sthen and Tom Smyth all confirm that they never came across
a different way of specifying an area.

OK claudio, deraadt
2024-08-21 15:18:47 +00:00
florian
4f4fe40bc9 Mechanically replace inet_aton with inet_pton.
OK claudio, deraadt
2024-08-21 15:18:00 +00:00
florian
82905b67f7 An area is either a decimal number or an IPv4 address.
This lets us replace inet_aton with inet_pton since we do not need
inet_aton's flexibility.

phessler, sthen and Tom Smyth all confirm that they never came across
a different way of specifying an area.

OK claudio, deraadt
2024-08-21 15:16:56 +00:00
florian
b2b634ffc1 Get rid of inet_aton
OK deraadt
2024-08-21 15:00:25 +00:00
florian
a1b5517a32 Use getaddrinfo to lookup names and parse IP addresses.
OK deraadt
2024-08-21 14:59:49 +00:00
florian
28b8bcf042 Mechanically change inet_aton to inet_pton.
OK claudio, deraadt
2024-08-21 14:58:14 +00:00
florian
baba1a1480 Mechanically change inet_aton to inet_pton.
This could use getaddrinfo in places but the code is just too crufty
and my joo janta's turned black immediately.

OK deraadt
2024-08-21 14:57:05 +00:00
florian
ac6360cb39 Use getaddrinfo(3) to resolve hostnames / ip addresses.
OK dlg
2024-08-21 10:35:12 +00:00
florian
ae0a2ab3e8 We can fully spell out IP addresses in config files.
OK claudio
2024-08-21 09:20:36 +00:00
florian
e13b122f59 s/inet_aton/inet_pton/
OK claudio
2024-08-21 09:19:55 +00:00
florian
2471dd62a7 Mechanically change inet_aton to inet_pton.
OK claudio
2024-08-21 09:18:47 +00:00
florian
3aa6dc714b We can fully spell out IP addresses in config files.
OK claudio
2024-08-21 09:17:56 +00:00
florian
b840faef38 Use inet_pton to parse ext-communities with an IPv4 address.
No need for inet_aton's flexibility.
OK claudio
2024-08-21 09:17:05 +00:00
claudio
53f63e9d44 Use msgbuf_queuelen() instead of accessing the queued member directly.
OK tb@
2024-08-20 13:31:49 +00:00
job
68b5a753c4 Update Geofeed reference
RFC 9632 introduced additional constraints and requirements for RPKI-based
Geofeed authenticators (at my request).
2024-08-20 12:53:47 +00:00
claudio
64f32adac0 Use stats.msg_queue_len instead of looking into the msgbuf struct.
OK tb@
2024-08-20 12:00:20 +00:00
claudio
db359c8123 Use msgbuf_queuelen() instead of accessing wbuf.queue for msgbuf structs.
Also export the msgbuf queue len as a stats member so bgpctl does not need
to dig into the msgbuf structure inside struct peer.
This skips imsg related msgbuf since that will be handled by a imsgbuf
specific function.
OK tb@
2024-08-20 11:59:39 +00:00
millert
9170eb325d Fix CVE-2024-43688, buffer underflow for very large step values
In get_number(), reject values that are so large that they are
interpreted as negative numbers.  In set_range(), step values smaller
than one or larger than the "stop" value are ignored.  This prevents
bit_nset() from being called with out-of-range values.

Bug found by Dave G. of Supernetworks.
2024-08-19 15:08:21 +00:00
job
4f2c77f971 Prepare for releasing version 9.2 2024-08-19 12:44:33 +00:00
deraadt
4b30381471 fix comment 2024-08-18 20:08:58 +00:00
phessler
917cb6cdf9 add qwz firmware 2024-08-18 14:58:47 +00:00
mlarkin
22b23f348d Use 'int ch' instead of 'char ch' in one place for getopt.
Forgot one change during an earlier commit; use 'int ch' to make builds
complete without warning on arm64.

ok dv
2024-08-17 20:50:06 +00:00
denis
15adf2d1a9 Replace homemade copy_of() with strdup()
OK tb@
2024-08-17 15:42:20 +00:00
denis
895cab01f2 Allow PPP interface to run in an rdomain and get a default route installed in the same routing domain
Input and OK claudio@
2024-08-17 09:52:11 +00:00
florian
167ac360a3 Since we are not using a pid file the manuals render a bit strange.
Pointed out by tb
2024-08-17 09:07:33 +00:00
yasuoka
e1af567eac Make sure that the uptime field is always updated. Previously it was
used before initialized when the database has a session.
2024-08-16 09:54:21 +00:00
yasuoka
c0c32a87c2 Free memory as much as possible. Also, fix a use-after-free when exiting. 2024-08-16 09:52:16 +00:00
yasuoka
a06d4bdd1a Send a reply to the control client when DAE is timed out instead of
silence.  Also, fix a broken error string.
2024-08-16 09:50:09 +00:00
yasuoka
b59731c9fb Delete req_modified. Which is not used. 2024-08-16 09:45:52 +00:00
job
7cb76e5580 Ensure synchronization jobs are stopped when the timeout is reached
OK tb@ claudio@
2024-08-15 11:30:43 +00:00
claudio
d389b51dcd Call repo_check_timeout() before colleting the POLLOUT fds. Since
repo_abort() called by repo_check_timeout() will add messages to
be sent out.
OK tb@
2024-08-15 09:22:12 +00:00
claudio
fac3be8e1a Add filtered support to bgplgd.
OK tb@
2024-08-15 09:13:13 +00:00
yasuoka
3e976a28df Accept empty lines for authopts to fix the parser to accept the old
syntax.  It was broken by parse.y 1.18.  Found by Mike at mgm51.com.
2024-08-15 07:24:28 +00:00
claudio
09b2f24c94 Add 'bgpctl show rib filtered' support.
OK tb@
2024-08-14 19:10:51 +00:00
claudio
89ee02f7f3 Introduce 'rde rib Loc-RIB include filtered' a feature that includes
filtered prefixes in the Loc-RIB

This includes filtered prefixes into the Loc-RIB but they are marked
ineligible so nothing will select them but it is possible to show them
in bgpctl. So 'bppctl show rib filtered' will return all prefixes filtered
out by the input filters.

OK tb@
2024-08-14 19:09:51 +00:00
yasuoka
58911fd131 Messages from modules were leaked. Call imsg_free() for them. 2024-08-14 07:06:50 +00:00
yasuoka
30c0952ce6 Don't abort the query when it is requesting to the next module. 2024-08-14 07:04:54 +00:00
yasuoka
32ed937691 Initialize dae objects properly. 2024-08-14 04:47:08 +00:00
yasuoka
ce1078f6e8 Don't abort the query when a duplicated query is received. Also tweak
the log message.
2024-08-14 04:44:07 +00:00
op
d49c07c786 implement the report response for proc-filters too
Reported by renegm on GitHub:
<https://github.com/OpenSMTPD/OpenSMTPD/issues/1257>

ok gilles@
2024-08-12 09:32:44 +00:00
claudio
282ccd24f8 Print min-version of a RTR session.
OK tb@
2024-08-12 09:05:28 +00:00
claudio
d87cfbcc05 Add 'min-version' RTR config option and default to RTR version 1 by default.
The min-version pins a minimal required version for rtr session. This is
needed if specific PDUs are required and it ensures that the session is
not suddenly downgraded. This is important for ASPA where a minimum
version of 2 is required. Only then the ASPA PDUs are transmitted.

By default a RTR version of 1 is used but setting min-version to 2
will enable draft-ietf-sidrops-8210bis-14 support and enforce it
at the same time. Right now defaulting to version 2 is not possible
since draft-ietf-sidrops-8210bis failed to progress for a too long
time resulting in split eco system with various incompatible RTR
version 2 implementations.

OK tb@
2024-08-12 09:04:23 +00:00
tb
2b4fa706c5 relayd: improve config validation with -n
pf's rule names are limited by 32 characters, so lower the length bounds
for redirect names and tags that relayd accepts as valid config but would
later fail to load into pf. Also display the offending name on error.

from Mark Johnston
ok florian
2024-08-10 05:47:29 +00:00
jsg
7a7a726b09 use void when functions have no args
ok deraadt@
2024-08-10 05:32:28 +00:00
claudio
b0ea642a7b Remove the ibuf_size(pdu) % sizeof(uint32_t) == 0 since it is already
done in rtr_parse_header(). No need to do it twice.
2024-08-09 14:00:48 +00:00
claudio
228f6bd1a1 Adjust RTR ASPA pdu parser to draft-ietf-sidrops-8210bis-14 which finally
adjusted the pdu to follow the other ASPA drafts.
OK tb@
2024-08-09 13:52:09 +00:00
deraadt
6798d9df84 ansi functions and prototypes
ok denis
2024-08-09 05:16:13 +00:00
yasuoka
138f958c9c Fix a typo 2024-08-07 07:15:18 +00:00
jmc
61a108c897 - sort SEE ALSO
- radiusd_file(8) is section 8, not 5
2024-08-04 05:18:28 +00:00
yasuoka
563222a6e5 Use "module" for the modules. Add a link to radiusd_file(8) from
radiusd_eap2mschap(8).
2024-08-04 03:56:57 +00:00
millert
493aa13946 Set system ID field in the PVD to OpenBSD
This matches what we use in mkybrid.  From Crystal Kolipe.
2024-08-03 22:23:32 +00:00
yasuoka
682f074d85 Backout previous. It was incompleted and too early. 2024-08-02 12:43:55 +00:00
yasuoka
7747427519 Use arc4random_uniform(n) instead of "% n". 2024-08-01 00:58:14 +00:00
yasuoka
1258aca7ac Change the routing entry of the pool addresses from blackhole to
reject.  This is better because the routing cache can be purged by the
reject.
2024-08-01 00:05:16 +00:00
millert
a63a57f896 pwd_mkdb: limit db entries to _PW_BUF_LEN to match libc
Otherwise, it is possible to create a passwd(5) entry that is too
large for getpwent(3), which ignores database entries larger than
_PW_BUF_LEN.  This adds a check in db_store() so that we do not
store an entry larger than getpwent(3) can read.  Callers of
pwd_mkdb(8), typically via pw_mkdb(3), already check for failure.

In most cases, the checks in chpass(1) will prevent a user from
creating an entry that is too large by changing their gecos field.
However, it is only when storing the db record that we know the
true size.

OK deraadt@
2024-07-28 19:13:26 +00:00
jmc
16d24e0f6e - document "ca" in the action ... relay section
from philipp plus openbsd at bureaucracy de

- within the "ca" section, refer to "listen on" and "action ... relay",
which is the actual syntax

ok op
2024-07-26 06:24:52 +00:00
tb
a6002f6a1c Silence a false positive warning for gcc
The code path gcc is whining about ensures that the struct auth in
question is initialized, but the pile of garbage that is gcc's use
of uninitialized warnings can't figure that one out. Enough time on
this was wasted during the last few releases that silencing gcc with
annoying workarounds may be the lesser evil.

ok claudio
2024-07-25 08:44:39 +00:00
yasuoka
a852e27a98 dd "msgauth" option for "test" command to specify whether use
Message-Authentication or not.
2024-07-24 08:27:20 +00:00
yasuoka
8185dbe7c4 Fix ipcp module to use (the maximum sequence number from the db) + 1
properly.
2024-07-22 10:00:16 +00:00
yasuoka
c0127aec83 Modify ipcp module to return a result for
IMSG_RADIUSD_MODULE_IPCP_DISCONNECT and radiusctl to handle the
result.
2024-07-22 09:39:23 +00:00
yasuoka
27a2e2e111 Make some functions "static". 2024-07-22 09:27:16 +00:00
anton
79db477be4 Fix regression introduced in previous causing HEAD requests to be
erroneously rejected as malformed.

ok chrisz@
2024-07-20 06:54:15 +00:00
chrisz
6aed2b87f4 Keep Content-length header in HEAD responses.
ok millert@
2024-07-19 04:26:23 +00:00
yasuoka
e83d1c6743 Send Access-Reject when the authentication is not handled or the user
is not found.
2024-07-18 22:40:09 +00:00
yasuoka
e1e88b6361 unveil .db is needed. Also move pledge() earlier. 2024-07-18 22:18:00 +00:00
yasuoka
f48aaf66ad Add a link to radiud_file(8) 2024-07-18 00:28:53 +00:00
yasuoka
a6d690cc62 Fix some gcc warnings 2024-07-17 11:31:46 +00:00
deraadt
67b02a138c minor repairs 2024-07-17 11:20:24 +00:00
yasuoka
eb4d56d74c Error if config parameter is unknown. This also fixes a gcc warning.
spotted by deraadt
2024-07-17 11:19:27 +00:00
yasuoka
291c2f2f56 Document "authentication-filter". 2024-07-17 11:13:22 +00:00
yasuoka
a449bbce95 Decrypt "Password" attribute always before passing the packet to
modules.  Also, don't assume the authenticator of the packet from the
module that has no secret is valid.
2024-07-17 11:05:11 +00:00
yasuoka
43015101fc Delete log_info() line for debug. 2024-07-17 10:15:39 +00:00
yasuoka
6b12042132 Fix indent 2024-07-17 08:26:19 +00:00
miod
ca9586a4f0 Only perform the static_assert checks in C>=11 environment; unbreaks build
on platforms using gcc.
2024-07-16 06:18:20 +00:00
jmc
3246983464 fix SEE ALSO and a word tweak; 2024-07-14 18:11:18 +00:00
jmc
b92cdcae95 grammar and macro tweaks; 2024-07-14 18:09:05 +00:00
jmc
110f461944 zap a stray Nd line; 2024-07-14 18:03:59 +00:00
yasuoka
a04dd6c38c Add radiusd_file(5) and link it from radiusd.conf(5). 2024-07-14 16:22:59 +00:00
yasuoka
b0e7e43d13 Add new radiusd_eap2mschap module. It provides conversions from EAP
to MSCHAPv2.
2024-07-14 16:09:23 +00:00
yasuoka
a6eb37b5e7 Move radius_attr_{,un}hide() to radius_subr.c. 2024-07-14 15:31:49 +00:00
yasuoka
ed1dc9254d Add "authentication-filter". Add new 2 imsg types so that
authentication modules can request the next authentication and the
next authentication can receive the result of the previous and modify
the result.
2024-07-14 15:27:57 +00:00
yasuoka
e303f42502 Set length of MPPE send/recv key. 2024-07-14 15:13:41 +00:00
yasuoka
0156c8363b Add radiusd_file(8) module. It provides authencation by a local file. 2024-07-14 13:44:30 +00:00
yasuoka
836eeaed93 Add "radiusd" field to struct radius_query. 2024-07-14 13:36:44 +00:00
yasuoka
7aed478bce Mistakenly the same challenge is used for testing CHAP. 2024-07-14 11:12:32 +00:00
yasuoka
1fb7daa0c2 Make the lines of md5chap understandable. 2024-07-14 10:52:50 +00:00
jsg
27c0dfa90c new sentence, new line 2024-07-14 03:58:49 +00:00
jsg
a6de02d933 spelling 2024-07-14 03:47:44 +00:00
mlarkin
3e58ebc3cf mmio.c is now empty and can be removed
mmio.c was moved to x86_mmio.c with dv@'s recent refactoring. The resulting
empty file can be removed now.
2024-07-13 22:12:41 +00:00
dv
b4ecf9d309 Add missing RCS header to vmd(8)'s vmm.h.
Apparently it never had one. It's rarely touched, so went unnoticed.
2024-07-13 16:13:45 +00:00
yasuoka
e067198062 Use calloc(3) instead of malloc(3). "accounting" is used without
initialization. Also don't check request authenticator for other than
Accounting-Request.
2024-07-13 13:06:47 +00:00
yasuoka
003dbb67f9 Fix a typo in log 2024-07-12 15:54:52 +00:00
yasuoka
e79d315b33 Fix Disconnect-Ack not to have an Error-Cause attribute. Tweak
some log messages.
2024-07-12 15:54:11 +00:00
jan
c01d0122df vmd(8): Fix error handling in tx path.
ok dv@
2024-07-12 14:34:08 +00:00
dv
2744f0957b Quiet vmd debug logging about page faults.
When we get bumped to userland and the fault is already handled,
don't log anything. It's way too chatty and helps nobody trying to
debug things.
2024-07-12 13:51:12 +00:00
claudio
9236071340 Improve duplicate detection and repo_move_valid
Only trigger a duplicate error if a valid filepath is revisted. It is
possible that a bad CA references somebody else's files and if that
happens first it would block the valid access.

To make this work, pass the ok flag to filepath_add() and only set the
talmask bit if the file was ok. Since we need to do the duplicate check
before processing the entity introduce filepath_valid() which checks
if the path is in the tree and has its talmask bit set.

In repo_move_valid() handle conflicts more gracefully. When both a valid
and temporary file are present assume that one of the files was never ok
(talmask == 0) and silently remove that file from the filepath tree.

OK tb@
2024-07-12 09:27:32 +00:00
claudio
2a5028c114 Rename the variable c to ok. It returns if the file failed to parse or not.
We need to pass this to filepath_add so lets use a better name.
OK tb@
2024-07-12 08:54:48 +00:00
yasuoka
9f94a2e49a Update the example because now npppd can be a DAE server. 2024-07-11 14:14:56 +00:00
yasuoka
9791a9c53b Add Dynamic Authorization Extensions (DAE) for RADIUS server feature
to npppd.  It can be configured now so that it accepts disconnect
requests and this works together with radiusd_ipcp(8) module.  Also
"nas-id" becomes configurable.
2024-07-11 14:05:59 +00:00
yasuoka
92278a01ca Add more attributes to Disconnect-Request following the RFC's
suggestions.  Also nas_ipv6 wasn't stored by a mistake.
2024-07-11 13:29:08 +00:00
yasuoka
2617e43b76 Fix the problem that it breaks the event timer because there is no
consideration for new disconnect requests during requesting DAE.  The
ipcp module didn't send a DAE request again once DAE request failed.
Also fix log messages.
2024-07-10 18:59:10 +00:00
yasuoka
43436be7c1 Fix memory leaks, a use after free, accessing outside the region
introduced by recent commits.  Found by malloc(3).
2024-07-10 16:30:43 +00:00
krw
bff3900cf3 Add flags NOPERM, STALLED, SWAPPABLE, DOOMED to -v output.
Brings -v output into line with MNT_BITS used in vfs_mount_print().

ok deraadt@
2024-07-10 13:29:23 +00:00
dv
234ee54628 Missed some files in previous commit to split vmd into mi/md.
Forgot `cvs add` and sys/dev/vmm/vmm.h changes.
2024-07-10 10:41:19 +00:00
dv
c4fd4c5b29 Split vmd into mi/md parts.
Makes as much of the core of vmd mi, pushing x86-isms into separate
compilation units. Adds build logic for arm64, but no emulation
yet. (You can build vmd, but it won't have a vmm device to connect
to.)

Some more cleanup probably needed around interrupt controller
abstraction, but that can come as we implement more than the i8259.

ok mlarkin@
2024-07-10 09:27:32 +00:00
jmc
548c80f25c remove stray ".Xc"; 2024-07-10 05:41:34 +00:00
jmc
f9fbeeaffe grammar tweak; 2024-07-10 05:40:08 +00:00
jmc
f20ce9aca3 grammar/macro/spelling fixes; 2024-07-10 05:39:25 +00:00
jan
82ace5fe53 vmd(8): Avoid double DHCP reply when using the internal dhcp server.
DHCP request should no leave vmd if its answered internally.

ok dv@
2024-07-09 18:49:05 +00:00
yasuoka
4bb54e50e3 Fix a typo 2024-07-09 17:34:10 +00:00
yasuoka
842565f2fe Add radiusd_ipcp(8). A module which provides IP configuration through
RADIUS Access-Accept messages and manages IP address pool through
RADIUS accounting messages.
2024-07-09 17:26:14 +00:00
mpi
813b934a8a Read the whole buffer, not its size minus one.
From Christian Ludwig cludwig at genua.de.
2024-07-09 16:08:30 +00:00
mlarkin
85846d3ec9 vmctl(8): set exit code for vmctl stat -r
set exit code to 1 if no running VMs are detected with vmctl stat -r.

ok dv
2024-07-09 15:51:11 +00:00
dv
ba66f5646b vmd/vmm: move vm_run_params into mi header.
To prepare for mi/md splitting vmd, need to fixup the dev/vmm/vmm.h
mi header. Move the vm_run_params struct and clean up the includes
in vmd.

"sure", mlarkin@
2024-07-09 09:31:37 +00:00
dv
d395f51516 Quiet vmd in debug logging mode. We don't need to hear about handled
page faults.

sure, @mlarkin.
2024-07-08 17:33:45 +00:00
tb
0047c88a18 x509_pubkey_get_ski() should support non-rsa keys
for now add an XXX reminder.

Pointed out by job a while back
2024-07-08 16:11:47 +00:00
tb
2e5628f880 Ensure that the rpkiManifest is a file in the caRepository
discussed with jca and job
ok claudio
2024-07-08 15:31:58 +00:00
tb
39ab19dff5 Normalize the rsync caRepository to contain a trailing slash
discussed with jca
ok claudio
2024-07-08 15:31:11 +00:00
ajacoutot
44c3b7b88b Use install -F instead of cat(1); no clue what I was thinking.
ok robert@
2024-07-08 14:47:42 +00:00
ajacoutot
1f7b1864b9 Prevent rewriting /etc/rc.conf.local unconditionnally. Compare the new and old
ones and do nothing is they match.
This mean that "rcctl enable foobar" will not touch anything is foobar is
already enabled.

spotted by robert@ using Saltstack (that runs "rcctl enable ..." on a regular
basis).
ok robert@
2024-07-08 14:32:44 +00:00
florian
7c99229c46 cleanup unused variable 2024-07-08 14:22:09 +00:00
jmc
7a13142b40 rework the "random" text:
- add "~" to the valid field table, as pointed out by sthen
- note that the value is generated whenever the tab is loaded,
as requested by K R
- clarify the text, as pointed out by deraadt

ok stehn millert
2024-07-06 15:33:17 +00:00
sobrado
f2743c484a the port to listen on is an optional argument; the default port number
is 1812 for authentication and 1813 for accounting.

ok jmc@, yasuoka@
2024-07-04 13:14:26 +00:00
sobrado
020f2e0736 only "decorate-by" is currently supported by the grammar specification.
ok jmc@, yasuoka@
2024-07-04 13:09:25 +00:00
jmc
7e961abbe7 make the CONFIGURATIONS list -compact to fox the item spacing; 2024-07-04 05:27:20 +00:00
jmc
a921703629 fix SEE ALSO; 2024-07-04 05:25:14 +00:00
jmc
c064bb5d5a - tidy "authenticate" and "account" commands using Xo/Xc
- decoratd -> decorated (fix proposed by sobrado too)
- fix grammar in "account" description

ok yasuoka
2024-07-04 05:23:24 +00:00
job
9a8ba155e2 Fix typo
Reported by Marco D'Itri
2024-07-03 08:39:43 +00:00
yasuoka
b9a400644a Add missing "module standard". It is needed before use it. 2024-07-03 06:09:13 +00:00
florian
11d381874a Use correct idiom to get mac addresses from ethernet-like interfaces.
This unbreaks rad(8) on top of carp(4).

OK deraadt, bluhm
2024-07-02 17:41:27 +00:00
deraadt
02c537a6b3 minor cleanups, especially DPADD 2024-07-02 16:18:11 +00:00
jmc
fba61c05da spelling, grammar, macro fixes for previous; 2024-07-02 06:01:22 +00:00
yasuoka
a7769b282f Fix previous. The place of "accounting" was wrong. 2024-07-02 00:35:56 +00:00
yasuoka
747da5e94e Add support for RADIUS accounting. 2024-07-02 00:33:51 +00:00
yasuoka
da2270739c Change the syntax for "module" and "authenticate". "module" can have
a {} block now.  On the other hand, "authentication" can be without a
{} block.  The previous syntax is still accepted.  Also make
specifying the path of "module" be optional.
2024-07-02 00:00:12 +00:00
yasuoka
4a4dce94ac Stop scheduling an I/O event by the timer when the imsg_buf has the data
larger than the imsg header. It prevented the receiver from receiving the
following parts of the message.
2024-07-01 23:53:30 +00:00
jmc
6a150e5c35 tidy up the text in previous; ok yasuoka 2024-07-01 14:56:19 +00:00
bluhm
7c3cb5da94 Explicit TLS handshake with syslog client.
Add a new TLS handshake callback for incoming connections.  This
will allow to inspect the client certificate later.  For now only
print a debug message and check it in regress.

with and OK henning@
2024-07-01 12:06:45 +00:00
yasuoka
a168fdd3c6 Modify IPCP to use {D,NB}NS servers from RADIUS. Also move the
radius related functions from ppp.c to npppd_radius.c.
2024-07-01 07:09:07 +00:00
yasuoka
593962704d Exit with an error code when error or module die.
CVS ----------------------------------------------------------------------
2024-07-01 05:20:01 +00:00
yasuoka
55b9f5bef6 Set SO_REUSEADDR for the listening socket. This makes radiusd(8)
can bind both on an interface address and a wildcard address.
2024-07-01 05:18:16 +00:00
yasuoka
8c9be2452f Call daemon(3) before parse_config() since parse_config() of radiusd(8)
starts some sub processes and parent-child relationship with them must
be kept.  But we want to show config error on stderr, so keep stdio
files open and close them after parse_config().
2024-07-01 03:48:57 +00:00
yasuoka
a3ca6f29f3 Remove unused secret field from struct radiusd_authentication 2024-07-01 03:32:09 +00:00
yasuoka
c9e9c1c924 Don't receive decoration when not requested. 2024-07-01 03:31:29 +00:00
yasuoka
c917c3ca77 Show config error when -n 2024-07-01 03:29:21 +00:00
yasuoka
2e151769a7 Add missing size check. 2024-07-01 03:27:31 +00:00
yasuoka
816d4b6e0d "secret" without quote can be used for key or value since it is treated
specially now.
2024-07-01 03:22:06 +00:00
yasuoka
55e257712a Tweak a white space. 2024-07-01 03:17:00 +00:00
yasuoka
92676dc711 Delete a garbage empty definition. 2024-07-01 03:13:42 +00:00
jsg
82232deb90 remove unused var 2024-06-29 11:29:55 +00:00
jmc
896d2b3d6a space before punctuation in macro; 2024-06-27 20:15:50 +00:00
florian
a15cd29622 Remove outdated references to dhclient, it's finally going away.
Input & OK jmc
2024-06-27 16:39:31 +00:00
claudio
58086f61c2 Bump version 2024-06-26 08:28:45 +00:00
claudio
a48c3ad520 When filling prefixes with pt_writebuf() keep 2 bytes reserved in the
withdraw case. Those bytes are needed for the attribute length field.
Without this withdraw messages can become overfull and are dropped
without notice.

Problem found and fix tested by denis@
OK denis@ tb@
2024-06-25 13:21:18 +00:00
job
45170f8015 Add missing ref & reorder
OK tb@ claudio@
2024-06-20 20:15:02 +00:00
dv
5195cf3e61 vmd(8): protect global vm and vcpu state with mutex.
The vm process uses multiple pthreads to emulate vcpu and also drive
an event loop doing various io emulation. At points, one or the
other needs to read/write global vm state bits and toggle if a vcpu
is halted or "done."

This adds in a another mutex to protected the global state and
untangles areas where the mutex for protecting a condition variable
was being used around modifying some global state.

ok mlarkin@
2024-06-20 15:33:44 +00:00
claudio
d7c05bd5f8 Kill the SIGPIPE signal handler which is installed around write opertations.
Instead just SIG_IGN SIGPIPE in main.c for all of acme-client.
More work to be done here but at least this distraction is gone.
OK florian@ deraadt@ op@
2024-06-19 13:13:25 +00:00
otto
3ba439323f Better words for downloaded snap is older message.
ok deraadt@ florian@ tb@
2024-06-19 05:22:33 +00:00
florian
6183743026 Use BUILDINFO to make sure we are not going backwards in time.
Input & OK deraadt
2024-06-18 14:57:59 +00:00
tb
68dbd03360 Invalidate the right stack[] member
There was a shift of the index in the for loop, and invalidating the wrong
member could result in a double free in auth_tree_free() on process exit.

ok claudio job
2024-06-17 18:54:36 +00:00
tb
f8e924bcc3 Put back NULL checks in crl_get() and build_chain()
Turns out filemode still relies on these. Rather than adding to the
spaghetti in filemode.c, begrudgingly put back the NULL checks with
an additional XXX.

ok claudio job
2024-06-17 18:52:50 +00:00
sashan
8663a10cc3 The fix comes from Giannis Kapetanakis (bilias _from_ edu.physics.uoc.gr).
When relayd(8) handles 'host disable/enable' command issued by relayctl(8),
it disables redirect it finds in tables for particular host.  However there can
be multiple redirect instances which use the same host in relayd(8) tables.
This change makes relayd(8) to walk through all tables and disable all redirects
which match the host.

OK giovanni@, OK sashan@
2024-06-17 08:36:56 +00:00
sashan
7c726e761b Change adds a 'log' option to relayd.conf(5) rule. The relayd(8) then uses
the option to set corresponding `log` action in pf(4) rules it generates
to handle network traffic.

The patch comes from Giannis Kapetanakis (bilias _from_ edu.physics.uoc.gr).

OK sashan@
2024-06-17 08:02:57 +00:00
sthen
2bdc0ed15d merge unbound 1.20.0 2024-06-13 14:30:28 +00:00
sthen
2682a17cb6 import unbound 1.20.0, ok florian 2024-06-13 14:29:32 +00:00
tb
1d8c644350 rpki-client: avoid hard error when hitting the maximum cert id
Instead, continue processing what we can but avoid lots of warning noise.
Error out at the end of the parser process to avoid loading a bad config
into bgpd. This isn't great as it is and can be refined in tree.

ok claudio
2024-06-12 10:03:09 +00:00
tb
b03b8a3c02 rpki-client: mention same-origin policy draft in STANDARDS
ok job
2024-06-12 04:24:59 +00:00
tb
f58c7ed691 rpki-client: bump version
It's been a few months with lots of changes. We should release soon-ish.

discussed with job
2024-06-12 04:11:19 +00:00
tb
7a3e7ef315 rpki-client: use better variable names for issuer and subject UID
piuid and psuid annoy me every time I see them.

no functional change
2024-06-12 04:01:20 +00:00
tb
c12b402c8d smtpd: fix indent
ok op
2024-06-11 16:30:06 +00:00
tb
e5e2c7b133 rpki-client: add link to rpki-rs PR that supposedly fixes this bug
https://github.com/NLnetLabs/rpki-rs/pull/295
2024-06-11 15:33:46 +00:00
tb
c026bd36bf rpki-client: grammar tweak in comment 2024-06-11 13:09:02 +00:00
tb
233f224d64 rpki-client: turn assert() into a NULL check
ok claudio
2024-06-11 12:44:00 +00:00
tb
1731179d99 rpki-client: fix incorrect use of ASN1_tag2str()
This goes back to the initial import in mft.c and was then copied to rsc.c.
ASN1_tag2str() doesn't take a nid but rather an ASN.1 tag. Use nid2str()
instead.

ok claudio (who helped me use nid2str() correctly)
2024-06-11 10:38:40 +00:00
tb
c79b8c8b1c I've written/touched/contributed to most of crl.c 2024-06-11 07:30:47 +00:00
tb
073e107a94 rpki-client: simplify signature type checking for certs/CRLs
The OpenSSL 1.1 get_signature_nid() API is available for all libraries
that we support and it does exactly what we want. It is much simpler
than the unergonomic accessors we used previously. The ASN.1 templates
ensure that the relevant struct members aren't NULL after successful
deserialization, so the calls are safe.

ok claudio
2024-06-11 07:27:14 +00:00
claudio
3dbf4d6d62 In get_alternate_addr() consider sessions to IPv6 link-local addresses
as connected (they are so by definition).

Issue reported by Jason Tubnor ( Jason.Tubnor (at) lchs.com.au )
OK tb@
2024-06-10 12:51:25 +00:00
tb
204218f72a rpki-client: allow multiple EKU OIDs for BGPsec certs
Nothing says there may be only one purpose. We only need to find
id-kp-bgpsec-router among them. This matches the intention of the
extended key usage extension in RFCs 5280 and 8209 more closely.

ok claudio
2024-06-10 12:44:06 +00:00
tb
473223040d rpki-client: zap outdated comment.
The valid_x509() in proc_parser_gbr() was initially left unchecked but
has been checked since r1.79.
2024-06-10 11:49:29 +00:00
tb
36d6639c6e rpki-client: fix and move more KU/EKU to x509_get_purpose()
Now all key usage and extended key usage handling is at the same place.
This fixes a bug for BGPsec Router certs where key usage was ignored.
Another omission that is fixed here is that criticality of the key usage
extension was not checked. Drop a comment about possible use of EKU that
was in the TA/CA code path but would only apply to EE certs.

ok claudio
2024-06-10 10:50:13 +00:00
gilles
47388f99e7 introduce a new K_AUTH service to allow offloading the credentials to a
table for non-crypt(3) authentication. tables configured with auth that
support K_AUTH are asked to check if a user and passwd are valid rather
than asked to provide the password for a user so smtpd does crypt(3) on
its side. helps with cases like ldap or custom auth.

ok op@
2024-06-09 10:13:05 +00:00
tb
7b62aa6fe7 Improve the check for is_ta in filemode
Instead of checking for EXFLAG_SS use the more accurate information
we already gathered.

ok job
2024-06-08 13:34:59 +00:00
tb
a582643462 Tigthen cert_parse_ee_cert() and ta_parse()
Require that a cert fed to cert_parse_ee_cert() have an EE cert purpose.
Instead of throwing a warning for BGPsec router certs, check for the TA
purpose in ta_parse() and reject everything else.

ok job
2024-06-08 13:33:49 +00:00