summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-06-02Due to growth, crunchgen must also try to block -fret-clean, so also useTheo de Raadt
COPTS+=-fno-ret-clean
2024-06-02Due to growth we can't allow -fret-clean behaviour in distrib/special,Theo de Raadt
so use COPTS+=-fno-ret-clean
2024-06-02oops, we need to hold on to ifap for a bit longerFlorian Obser
2024-06-02add -fret-clean option (amd64 and i386 only at first), defaulting to off.Theo de Raadt
This causes the caller to cleans the return address off the stack after a callq completes. The option is best used in low-level libraries (such as libc), because libc contains low-level system call stubs. The option reduces hints (found on the stale parts of the stack) about libc.so's mapping location, and together with random-relinking, relro got/pic, and xonly makes some exploit methods more difficult. ok mortimer, mlarkin, much discussion with kettenis, in snaps for 2 weeks.
2024-06-02add -fret-clean option (amd64 and i386 only at first), defaulting to off.Theo de Raadt
This causes the caller to cleans the return address off the stack after a callq completes. The option is best used in low-level libraries (such as libc), because libc contains low-level system call stubs. The option reduces hints (found on the stale parts of the stack) about libc.so's mapping location, and together with random-relinking, relro got/pic, and xonly makes some exploit methods more difficult. ok mortimer, mlarkin, much discussion with kettenis, in snaps for 2 weeks.
2024-06-02pledge, MAP_STACK, and pinsyscall failures have been providing failureTheo de Raadt
visibility with kernel printf(9) (thus, onto console and into dmesg) since the start of development. I want to reduce the dmesg spam, and bring this more into the attention of the user who ran the command, so let's try using uprintf(9) which puts it onto the active foreground tty (yes, there maybe cases where there is no tty, but that's ok. I'll admit I've considered deleting the logging messages entirely) tested in snaps for a week
2024-06-02fix leaksFlorian Obser
2024-06-02Unlike DHCPv4 we will only send multicast messages.Florian Obser
Initialize destination address once and fold udp_send_packet() into send_packet(). While here improve debugging output a bit.
2024-06-02we do not poke around in udp headersFlorian Obser
2024-06-02DHCPv6 is not concerned with link layer addresses.Florian Obser
pointed out by martijn
2024-06-02Implement renew & rebind.Florian Obser
Missed in previous.
2024-06-02Switch to rebinding at the rebinding time not when one timeout past.Florian Obser
Spotted while hacking on dhcp6leased(8)
2024-06-02syncFlorian Obser
2024-06-02user, group & /var/db/dhcp6leased for dhcpleased(8)Florian Obser
typo spotted by ccappuc Input & OK deraadt
2024-06-02Import dhcp6leased(8)Florian Obser
dhcp6leased is a daemon to manage IPv6 prefix delegations. It requests a prefix from an upstream DHCPv6 server and configures downstream network interfaces. rad(8) can be used to advertise available prefixes to clients. It's a transmogrified dhcpleased(8), so it's a bit rough around the edges. But it can already request and renew prefixes and configure interfaces. It's time to hack on it in-tree. OK deraadt
2024-06-02Power down PCI devices in S0 as well. Needed for suspend-to-idle.Mark Kettenis
ok mglocker@
2024-06-01md4/ripemd: remove misplaced semicolonsTheo Buehler
2024-06-01Neuter the bounded attribute as was done elsewhere for portableTheo Buehler
2024-06-01Remove mention of SHA-0, update STANDARDS sectionTheo Buehler
2024-06-01sndiod: Don't add/remove server.device entries in dev_{open,close}()Alexandre Ratchov
Fixes server.device entries disappearing when usb devices are unplugged while in use. Found, analysed and tested by Laurie Tratt, thanks!
2024-06-01Missed SHA224() in previous: reverse order of attributesTheo Buehler
2024-06-01Reverse order of attributesTheo Buehler
requested by jsing on review
2024-06-01Remove support for static buffers in HMAC/digestsTheo Buehler
HMAC() and the one-step digests used to support passing a NULL buffer and would return the digest in a static buffer. This design is firmly from the nineties, not thread safe and it saves callers a single line. The few ports that used to rely this were fixed with patches sent to non-hostile (and non-dead) upstreams. It's early enough in the release cycle that remaining uses hidden from the compiler should be caught, at least the ones that matter. There won't be that many since BoringSSL removed this feature in 2017. https://boringssl-review.googlesource.com/14528 Add non-null attributes to the headers and add a few missing bounded attributes. ok beck jsing
2024-06-01be really strict with fds reserved for communication with the separateDamien Miller
sshd-session process - reserve them early and fatal if we can't dup2(2) them later. The pre-split fallback to re-reading the configuration files is not possible, so sshd-session absolutely requires the fd the configuration is passed over to be in order. ok deraadt@
2024-06-01Move common definitions into the header file.Kenji Aoyama
No binary change.
2024-05-31Preferred and valid lifetime options are sometimes ignored.Florian Obser
When a prefix is discovered on a network interface and and the IP address has a valid or preferred lifetime configured that value is used instead of the static value from the configuration. Limitation pointed out by & man page text proposed by Ryan Vogt. Slightly tweaked by me. rad(8) should calculate the minimum of the static value from the config file and what is configured on the interface. Implementing that is slightly complicated and is left for a future diff.
2024-05-31Prefixes delegated via DHCPv6 have a lifetime, honour it.Florian Obser
The "auto prefix" feature derives the prefix to announce from a configured IPv6 address. If that address has a vltime / pltime use that value in router advertisements instead of statically configured values. We also need to count down the vltime / pltime as time progresses. testing Ryan Vogt testing & OK bket@, jmatthew@
2024-05-31getifaddrs(3) does a non trivial amount of work.Florian Obser
Call it once and pass a pointer to the head of the list around when reconfiguring interfaces. testing Ryan Vogt ok benno testing & OK bket@, jmatthew@
2024-05-31Document a weird decision in RFC 8209Theo Buehler
The subject commonName of a BGPsec Router Certificate is RECOMMENDED to be "CN=ROUTER-%08x", asn. It thus made perfect sense to deviate from RFC 6487 and support encoding this as a UTF8String... We have three such certs in the wild, so punt on complicating the logic at least until the point where we need more than the fingers of one hand to count them. ok claudio
2024-05-31warn when -r (deprecated option to disable re-exec) is passedDamien Miller
2024-05-31typosDamien Miller
2024-05-31rpki-client: check issuer for certs and CRLsTheo Buehler
Per RFC 6487, the subject and issuer fields of a certificate and the issuer field of a CRL are subject to the same restrictions: only a commonName and an optional serialNumber may be present and the commonName must be an ASN.1 printable string. So far we've only checked the subject of certificates, which covers almost everything by relying on the verifier to check that the issuer's subject is identical to the subject's issuer, also for CRLs per X509_V_FLAG_CRL_CHECK. The only thing missing this way is the TA's issuer. Since the check is cheap and simple, we're better off doing it ourselves: Refactor the x509_vaild_subject() helper to take an X509_NAME (which is of course the appropriate name for a type representing an X.501 distinguished name). This checks the details of RFC 6487, section 4.4, except that we still can't check for a printable string since afrinic has ~3000 EE certs that don't follow the spec, which would knock out ~45% of their ROAs. We're told that this is going to be fixed this year. looks good to claudio ok job
2024-05-30Adjust hmac test for removal of static buffer from HMAC()Theo Buehler
2024-05-30sem_open() uses /tmp/*.sem files. Exclude them from /tmp daily cleanupStuart Henderson
like is already done for /tmp/*.shm used by libc. ok millert@ tb@, same diff landry@
2024-05-30ssl(8): the history section hasn't aged well at all. zap it.Theo Buehler
discussed with naddy and jmc ok naddy
2024-05-30Properly setup the fts_state in the FTS_D case.Claudio Jeker
At fts_level 1 the state needs to be fully reset since we most probably exited from a directory at level 1 and entered a new dir at level 1. Without this empty directories remained since the fts_state.type was wrong for those entries. Noticed by job@, OK tb@
2024-05-30Ensure pmap_create() waits in case kernel virtual space shortage.Martin Pieuchot
Prevents a panic in pmap_pinit_pd_pae() when applying a lot of memory pressure and the kernel needs time to recover while swapping. Reported and fix tested by mvs@, also tested by sthen@ ok mlarkin@, mvs@, kettenis@
2024-05-30avoid potential use-after-freeJonathan Gray
found by smatch, ok tb@
2024-05-30Increase logging verbosity as to what exactly hit a limitJob Snijders
rpki-client: https://testbed.krill.cloud/rrdp/notification.xml: pulling from network rpki-client: https://testbed.krill.cloud/rrdp/notification.xml: downloading snapshot (bfb0a57e-d16b-44a1-9502-f15b4bc1ce1a#110135) rpki-client: parse failed, snapshot element for rsync://testbed.krill.cloud/repo/testbed/0/DDAF321520EE4817D716FA047FC05FE2934204DB.crl too big rpki-client: https://testbed.krill.cloud/rrdp/notification.xml: parse error at line 135: parsing aborted rpki-client: https://testbed.krill.cloud/rrdp/notification.xml: load from network failed, fallback to rsync OK tb@ claudio@
2024-05-30Fix copy-paste error in last commit. Fixes lladdr and l3vpn regress.Claudio Jeker
Noticed by anton@
2024-05-30arm64: move cpu_suspended out of #ifdef SUSPENDTheo Buehler
Matches amd64 and i386 and unbreaks the RAMDISK build ok deraadt
2024-05-30syncTheo Buehler
2024-05-29Convert SCHED_LOCK from a recursive kernel lock to a mutex.Claudio Jeker
Over the last weeks the last SCHED_LOCK recursion was removed so this is now possible and will allow to split up the SCHED_LOCK in a upcoming step. Instead of implementing an MP and SP version of SCHED_LOCK this just always uses the mutex implementation. While this makes the local s argument unused (the spl is now tracked by the mutex itself) it is still there to keep this diff minimal. Tested by many. OK jca@ mpi@
2024-05-29asn1object: zap trailing whitespaceTheo Buehler
2024-05-29Make it possible for the large OID test to failTheo Buehler
failed was set to 0 at the top of the function, so failure and success were indistinguishable. Move failed = 0 to the end so it can actually fail.
2024-05-29Add regress coverage for some corner cases of i2d_ASN1_OBJECT()Theo Buehler
2024-05-29Add regress coverage for i2d_ASN1_OBJECT() fixesTheo Buehler
2024-05-29Fix i2d_ASN1_OBJECT()Theo Buehler
When called with a pointer to NULL as an output buffer, one would expect an i2d API to allocate the buffer and return it. The implementation here is special and the allocation dance was forgotten, resulting in a SIGSEGV. Add said dance. ok jsing
2024-05-29Make i2d_ASN1_OBJECT() return -1 on errorTheo Buehler
This is what the (not quite appropriately) referenced ASN1_item_i2d() page documents for errors, matches what the RETURN VALUE section has been documenting for ages, matches BoringSSL, it's the usal behavior for i2d_*. It's also what OpenSSL (of course incorrectly) documents. discussed with jsing
2024-05-29Remove unnecessary parens from i2d_ASN1_OBJECT()Theo Buehler