summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2024-04-13check group and world permissions of iked psk filesjrick
Similar to the permission checks performed on iked.conf(5) due to the possibility of it containing inline psk strings, require psk files to not be group writable or world read-writable. ok tobhe@
2024-04-13sync to unbound 1.19.3Florian Obser
heavy lifting by & OK sthen
2024-04-13document "psk file path" notation; from josh rickmarJason McIntyre
ok tobhe
2024-04-09Sync removal of setsid(), setpgid() and a few dup2() from relayd. They areTobias Heider
redundant since we call daemon() earlier. ok bluhm@
2024-04-08Move daemon() after proc_setup() to sync with other proc.c daemons.Tobias Heider
2024-04-02Add check to make sure EAP header length matches expected payload length.Tobias Heider
ok markus@ yasuoka@
2024-03-24Remove radius.c which is added mistakenly and under review.YASUOKA Masahiko
2024-03-24Allow zero-length identity responseYASUOKA Masahiko
ok tobhe
2024-03-22Increase /usr/src partition to 2GB - 5GBJan Klemkow
ok miod@, deraadt@, otto@ and bluhm@
2024-03-21Avoid redundant allocation in ikev2_prfplus()Tobias Heider
from markus@
2024-03-21Do not exit the master process if a client TCP connection fails to beClaudio Jeker
added. OK millert@
2024-03-02Trigger retransmission only for fragment 1/x, otherwise each receivedTobias Heider
fragment can trigger retransmission of the full fragment queue. From RFC7383, 2.6.1: "[...] that even MUST only trigger a retransmission of the response message (fragmented or no) if the Fragment Number field in the received fragments is set to 1; otherwise, it MUST be ignored." from markus
2024-03-02Bump to OpenIKED 7.4Tobias Heider
2024-03-01Allow fdisk(8) to add GPT partitions of protected types.Kenneth R Westerback
This makes it possible to provision virtual machine images that need a "BIOS Boot" partition. Report, original diff and testing by Christian Ludwig. Thanks! ok miod@
2024-02-25Let some missing missing RFC 1918 reverse zones through.Florian Obser
Problem spotted and diff from Einfach Jemand (rru.142 at gmail), thanks! OK phessler, jca
2024-02-15Introduce new IMSG_CTL_PROCREADY which is used to signal that all pipesTobias Heider
are set up by child processes. The parent sends a ping to all children and only starts once it has received an acknowledgement from all of them. This fixes a race condition on process startup when the parent starts running before all children are ready. From markus@
2024-02-15Delay enabling sockets until ikev2 process is ready.Tobias Heider
from markus@
2024-02-15Remove unused control_socks queue.Tobias Heider
from markus@
2024-02-13Fix for CVE-2023-50387 and CVE-2023-50868.Florian Obser
Both can be used to cause high CPU load and potentially denial of service with specifically crafted DNSSEC responses. This is a sync with unbound(8).
2024-02-13Only generate a new xid at the start of getting a new lease.Florian Obser
"RFC 2131 4.1 Constructing and sending DHCP messages" has this: | Selecting a new 'xid' for each retransmission is an implementation | decision. A client may choose to reuse the same 'xid' or select a new | 'xid' for each retransmitted message. We used to change xid for each request / response cycle but this ran into problems with slow dhcp servers where we would change the xid too frequently and would ignore late coming replies from the server. Andre S points out that table 5 in "4.4.1 Initialization and allocation of network address" says for the xid field in "DHCPREQUEST" messages: | 'xid' from server DHCPOFFER message This seems to suggest that we need to use the same xid for the whole DHCPDISCOVER / DHCPOFFER / DHCPREQUEST / DHCPACK exchange of messages. Nothing else in the RFC is saying this though. But since there are DHCP servers out there that depend on this, we only generate a new xid when entering the INIT, REBOOTING and RENEWING state. I do wonder if we should just go with a static value of 0x04, which was chosen by a fair dice roll, so guaranteed to be random. Issue reported, initial diff and fix tested by Andre S deraadt likes this version OK tb
2024-02-13Control startup of PROC_CERT and PROC_IKEV2.Tobias Heider
Currenly PROC_PARENT sends the configuration to both PROC_CERT and PROC_IKEV2 and finishes by sending IMSG_CTL_ACTIVE to PROC_IKEV2. However, when PROC_IKEV2 receives IMSG_CTL_ACTIVE it does not know the state of PROC_CERT: PROC_CERT might not have processed the initial configuration while PROC_IKEV2 already sends requests to PROC_CERT, causing failed requests, or even crashes (NULL deref of ca_certs). In order to make sure that PROC_CERT is ready before IMSG_CTL_ACTIVE is sent to PROC_IKEV2 that startup protocol is changed as follows: (1) PROC_PARENT sends configuration to both PROC_CERT and PROC_IKEV2 (2) PROC_PARENT sends IMSG_CTL_ACTIVE to PROC_CERT (3) PROC_CERT acks IMSG_CTL_ACTIVE by sending it back to PROC_PARENT (4) PROC_PARENT now knows that PROC_CERT is ready and has processed all messages from step (1) (5) PROC_PARENT sends IMSG_CTL_ACTIVE to PROC_IKEV2 and knows that IMSG_CTL_ACTIVE will be processed by PROC_IKEV2 after all messages from step (1) (6) PROC_IKEV2 can now assume that PROC_CERT is ready because it has already processed IMSG_CTL_ACTIVE from markus@
2024-02-11Remove needless includes of netinet6/ip6_var.h header in userland.Alexander Bluhm
OK millert@
2024-02-07fix anchortypes bounds testJonathan Gray
found by "buffer overflow 'anchortypes' 10 <= 12" smatch error feedback and ok sashan@, ok miod@ on an earlier version
2024-02-06Pass struct iked directly to ca_reset() instead of passing it via psTobias Heider
discussed with markus@
2024-02-06Tweak previous. Passing "dns" to pledge(2) is suitable for the purpose.YASUOKA Masahiko
input deraadt, ok tobhe
2024-02-03Remove Softdep.Bob Beck
Softdep has been a no-op for some time now, this removes it to get it out of the way. Flensing mostly done in Talinn, with some help from krw@ ok deraadt@
2024-02-03Stop spamming syslog when the network does something silly.Florian Obser
From Stefan R. Filipek, thanks!
2024-02-03fix off-by-one in bounds testJonathan Gray
found by "buffer overflow 'peerxfs' 6 <= 6" smatch error tobhe@ had a remote peer attempt a transform type of 6 and it is caught by earlier checks before getting here. ok tobhe@
2024-02-03correct buffer size argument to snprintf in print_proto()Jonathan Gray
found by "snprintf() is printing too much 8192 vs 1024" smatch error ok tobhe@ stsp@
2024-02-02The fix to pfctl_kill_src_nodes() comes from Olivier Croquin.Alexandr Nedvedicky
bluhm@ pointed out pfctl_net_kill_states() suffers from the same copy'n'paste typo. Commit combines both fixes. OK @bluhm, OK @kn
2024-01-29Open /etc/{services,protocols} before pledge(2).YASUOKA Masahiko
ok tobhe
2024-01-26Put checksum flags in bpf_hdr to use them in userland dhcpleased.Jan Klemkow
Thus, dhcpleased accept non-calculated checksums which were verified by hardware/hypervisor. With tweaks from dlg@ ok bluhm@ mkay tobhe@
2024-01-24Use per connection peerid for control repliesTobias Heider
instead of 'broadcasting' replies for 'ikectl show sa' and similar control requests, we now assign a uniq peerid to each request and pass this peerid between the processes so the reply can be sent on the matching connection. from markus@
2024-01-19Rename WSDISPLAY_TYPE_RKDRM to WSDISPLAY_TYPE_KMS such that we can use itMark Kettenis
for other generic KMS drivers. ok jsg@, matthieu@
2024-01-17Convert to use imsg_get_fd()Claudio Jeker
proc_forward_imsg() does not need to forward file descriptors so just use -1 there. In other places shuffle debug messages around or use a helper variable since imsg_get_fd() can only be called once. OK tb@ tobhe@
2024-01-15Add debug message for no policy found.Jan Klemkow
In this case iked would just silently drop incomming connections. Thus, the user has a chance to figure out whats going on. ok tobhe@
2024-01-15Include cert_partial_chain in iked_static instead of sending a separateTobias Heider
message. from markus@
2024-01-15Currently 'pfctl -a "*" -sr' recursively walks anchor tree and showsAlexandr Nedvedicky
rules found in every anchor. This commit introduces the same behavior for tables. Command 'pfctl -a "*" -sT' prints all tables attached to every anchor loaded to pf(4). Inconsistency has been noticed by Klemens (kn@). OK @bluhm, OK @kn
2024-01-11ifconfig.8: reorder hwfeature listJan Klemkow
ok jmc@
2024-01-09Delete support for FFS filesystems before the in-inode symlinkPhilip Guenther
optimization. As observed by ali_farzanrad(at)riseup.net, support for these was broken in the 5.5 release in early 2014 by the time_t changes. No one noticed before now, so clearly this isn't something we need to continue to support; rejecting in ffs_validate() is an improvement. Also: simplify DIRSIZ(), drop OLDDIRFMT and NEWDIRFMT, tests of fs_maxsymlinklen against zero, #ifdef tests of FS_44INODEFMT, and remove support for newfs -O0, last used in 2016. ok miod@
2023-12-21Fix a few unchecked allocations; ok millert@ miod@Otto Moerbeek
2023-12-20Don't unset the SA tag set by ipsec_sa_tag in ipsec_sa_iface.Tobias Heider
Fixes SA tagging and a possible leak. from markus@
2023-12-18Check if calloc calls succeeded; ok millert@Otto Moerbeek
2023-12-14Use imsg_get_fd() to access the fd passed with the imsg.Claudio Jeker
Go ahead florian@ OK tb@
2023-12-12ibuf_getdata() abuses the rpos from the ibuf. This is no longer allowedClaudio Jeker
and breaks because ibuf_seek() now uses rpos itself. Now this is just ibuf_get_ibuf() with an extra allocation done. OK tobhe@ tb@
2023-11-25whitespace; spotted by knFlorian Obser
2023-11-25First stab at IPv6-only preferred from RFC8925.Florian Obser
This lets dhcpleased(8) request "IPv6-only preferred". If the server replies with this option dhcpleased stops and does not request a lease and deconfigures IPv4 on the interface. For now this is pretty much useless unless one dynamically configures pf(4) to act as a CLAT. gelatod(8) from ports can help with this. However, this helps me while hacking on a kernel based stateless CLAT by moving dhcpleased out of the way while having an IPv6-mostly network configured to compare behaviour with macOS. Input jmc OK phessler Input & OK sthen
2023-11-24Empty IKEv2 DPD messages should not contain extra NONE payloadsTobias Heider
from markus@
2023-11-23add an endpoint command for "bridges" that use addresses as endpoints.David Gwynne
this can be used to add static entries on interfaces like vxlan(4).
2023-11-23add support for specifying ports on the src address in tunnel endpoints.David Gwynne