OpenBSD/src b667MI5 — lib/libc/gen getgrouplist.c, lib/libutil passwd.c

   Incorrect upper bound for uid and gid can result in -1 being used.
   smtpd and YP/ldap situations are the most worrying.
   Different fix from -current, because -stable avoids API/ABI changes.
   from deraadt@

   this is errata/7.9/030_uidrange.patch.sig
VersionDeltaFile
1.55.6.1+5-5usr.sbin/ypldap/ldapclient.c
1.22.12.1+4-4usr.sbin/ypldap/yp.c
1.51.2.1+3-3usr.sbin/smtpd/to.c
1.57.2.1+3-3lib/libutil/passwd.c
1.32.2.1+3-3lib/libc/gen/getgrouplist.c
1.359.2.1+3-2usr.sbin/smtpd/smtpd.c
+21-201 files not shown
+23-227 files

OpenBSD/src FOyI6na — lib/libc/gen getgrouplist.c, lib/libutil passwd.c

   Incorrect upper bound for uid and gid can result in -1 being used.
   smtpd and YP/ldap situations are the most worrying.
   Different fix from -current, because -stable avoids API/ABI changes.
   from deraadt@

   this is errata/7.8/066_uidrange.patch.sig
VersionDeltaFile
1.55.2.1+5-5usr.sbin/ypldap/ldapclient.c
1.22.8.1+4-4usr.sbin/ypldap/yp.c
1.50.8.1+3-3usr.sbin/smtpd/to.c
1.56.24.1+3-3lib/libutil/passwd.c
1.31.2.1+3-3lib/libc/gen/getgrouplist.c
1.357.2.2+3-2usr.sbin/smtpd/smtpd.c
+21-201 files not shown
+23-227 files

OpenBSD/src XcRJRYt — lib/libcrypto/x509 x509_verify.c, lib/libssl d1_pkt.c d1_both.c

   Don't drop X509_V_ERR_HOSTNAME_MISMATCH when verify callback returns 1

   While not the advised way of using the verify callback (either by OpenSSL
   or by us) in production, sometimes folks like to return 1 from everything
   in the callback and then check the error return and make decicions about
   things.

   This fix ensures that such callbacks will see the hostname mismatch and
   be able to act upon them.

   Reported by Alexander Aleksandrovic Klimov
   from beck, ok tb@

   Correct botched size check in dtls1_preprocess_fragment().

   Check message length against max, rather than fragment offset and length.
   Due to a various questionable code, this allows for a crafted messsage
   to be sent that results in a 21MB allocation, which then promptly results
   in an error. Providing that the SSL context is cleared or freed, the

    [136 lines not shown]
VersionDeltaFile
1.85.2.1+18-8lib/libssl/d1_both.c
1.73.2.1+14-6lib/libcrypto/x509/x509_verify.c
1.26.4.1+2-10lib/libtls/tls_ocsp.c
1.130.2.1+3-3lib/libssl/d1_pkt.c
1.34.2.1+2-3usr.sbin/ocspcheck/ocspcheck.c
+39-305 files

OpenBSD/src NTH4cJG — lib/libcrypto/x509 x509_verify.c, lib/libssl d1_pkt.c d1_both.c

   Don't drop X509_V_ERR_HOSTNAME_MISMATCH when verify callback returns 1

   While not the advised way of using the verify callback (either by OpenSSL
   or by us) in production, sometimes folks like to return 1 from everything
   in the callback and then check the error return and make decicions about
   things.

   This fix ensures that such callbacks will see the hostname mismatch and
   be able to act upon them.

   Reported by Alexander Aleksandrovic Klimov
   from beck, ok tb@

   Correct botched size check in dtls1_preprocess_fragment().

   Check message length against max, rather than fragment offset and length.
   Due to a various questionable code, this allows for a crafted messsage
   to be sent that results in a 21MB allocation, which then promptly results
   in an error. Providing that the SSL context is cleared or freed, the

    [77 lines not shown]
VersionDeltaFile
1.85.6.1+18-8lib/libssl/d1_both.c
1.29.2.1+2-10lib/libtls/tls_ocsp.c
1.76.2.1+5-2lib/libcrypto/x509/x509_verify.c
1.130.6.1+3-3lib/libssl/d1_pkt.c
1.34.6.1+2-3usr.sbin/ocspcheck/ocspcheck.c
+30-265 files

OpenBSD/src xp6DSxi — sys/kern sysv_sem.c

   Avoid sleeping while recording SEM_UNDO information

   sys_semop(), by way of semundo_adjust() and semu_alloc(), could sleep in
   pool_get(PR_WAITOK) after it had already applied the semaphore operations.
   Another process can remove the set with IPC_RMID while we sleep; we then write
   sempid and sem_otime through the freed semid_ds_kern and sem_base, and record
   an undo entry for a set semundo_clear() has already swept, which panics
   semexit() when the process exits.

   This was introduced as a fallback in rev 1.14, after moving the
   structures from a static array to a pool made the allocation able to
   fail at all.  semop(2) documents ENOSPC, so drop the fallback with the
   extra complexity to work around the sleep.

   semundo_adjust() must then stop freeing an emptied structure in the middle of
   an operation: sys_semop()'s rollback can need it again, and re-creating it
   there is allowed to fail, which is a panic.  Keep it until done2.  That also
   takes a second sleeping pool_put() out of the done: region.


    [8 lines not shown]
VersionDeltaFile
1.66.2.2+41-44sys/kern/sysv_sem.c
+41-441 files

OpenBSD/src niZpBUM — sys/kern sysv_sem.c

   Avoid sleeping while recording SEM_UNDO information

   sys_semop(), by way of semundo_adjust() and semu_alloc(), could sleep in
   pool_get(PR_WAITOK) after it had already applied the semaphore operations.
   Another process can remove the set with IPC_RMID while we sleep; we then write
   sempid and sem_otime through the freed semid_ds_kern and sem_base, and record
   an undo entry for a set semundo_clear() has already swept, which panics
   semexit() when the process exits.

   This was introduced as a fallback in rev 1.14, after moving the
   structures from a static array to a pool made the allocation able to
   fail at all.  semop(2) documents ENOSPC, so drop the fallback with the
   extra complexity to work around the sleep.

   semundo_adjust() must then stop freeing an emptied structure in the middle of
   an operation: sys_semop()'s rollback can need it again, and re-creating it
   there is allowed to fail, which is a panic.  Keep it until done2.  That also
   takes a second sleeping pool_put() out of the done: region.


    [8 lines not shown]
VersionDeltaFile
1.65.2.2+41-44sys/kern/sysv_sem.c
+41-441 files

OpenBSD/src Nts9fb4 — sys/net if_wg.c

   In wg_bind() close IPv4 socket while failed to bind IPv6 socket with
   automatic port selection.
   from mvs@; From Acts1631.

   this is errata/7.9/028_wgbind.patch.sig
VersionDeltaFile
1.48.2.1+6-4sys/net/if_wg.c
+6-41 files

OpenBSD/src 7lfKyF5 — sys/net if_wg.c

   In wg_bind() close IPv4 socket while failed to bind IPv6 socket with
   automatic port selection.
   from mvs@; From Acts1631.

   this is errata/7.8/064_wgbind.patch.sig
VersionDeltaFile
1.47.2.1+6-4sys/net/if_wg.c
+6-41 files

OpenBSD/src IEV73EJ — sbin/iked iked.h ca.c

   iked: Reject malformed and out-of-state IKEv2 messages

   A malicious or malformed IKEv2 peer could crash iked, or cause a
   certificate validation verdict to be applied to the wrong peer
   identity. Reject malformed DELETE payloads and EAP responses for
   which no matching server state exists, and bind CA and OCSP verdicts
   to the identity they were computed for.

   Reported by Stefan Rinkes and acts1631kjv at proton me.
   from hshoexer@; OK markus@

   this is errata/7.9/027_iked.patch.sig
VersionDeltaFile
1.398.2.1+52-1sbin/iked/ikev2.c
1.138.4.1+24-9sbin/iked/ikev2_pld.c
1.14.6.1+26-2sbin/iked/radius.c
1.105.6.2+8-6sbin/iked/ca.c
1.25.12.1+10-4sbin/iked/ocsp.c
1.233.8.1+2-2sbin/iked/iked.h
+122-246 files

OpenBSD/src xV7ehPG — sbin/iked iked.h ca.c

   iked: Reject malformed and out-of-state IKEv2 messages

   A malicious or malformed IKEv2 peer could crash iked, or cause a
   certificate validation verdict to be applied to the wrong peer
   identity. Reject malformed DELETE payloads and EAP responses for
   which no matching server state exists, and bind CA and OCSP verdicts
   to the identity they were computed for.

   Reported by Stefan Rinkes and acts1631kjv at proton me.
   from hshoexer@; OK markus@

   this is errata/7.8/063_iked.patch.sig
VersionDeltaFile
1.394.2.3+52-1sbin/iked/ikev2.c
1.136.4.2+24-9sbin/iked/ikev2_pld.c
1.14.2.1+26-2sbin/iked/radius.c
1.105.2.2+8-6sbin/iked/ca.c
1.25.6.1+10-4sbin/iked/ocsp.c
1.233.2.1+2-2sbin/iked/iked.h
+122-246 files

OpenBSD/src 6jb3xs0 — sys/kern kern_sysctl.c sysv_shm.c

   Introduce in-kernel 'shmid_ds_kern' structure where `shm_nattch' has the
   type of uint64_t. The original 'shmid_ds' used to deliver data to the
   userland, so API/ABI is not broken. The delivered `shm_nattch' value is
   clamped with SHRT_MAX.
   from mvs@; OK deraadt@

   Do missing shmid_ds_kern to shmid_ds conversion in the IPC_SET case of
   sys_shmctl().
   from deraadt@

   the visual hint for sys_shmctl_args became incorrect with the _kernl adjustment
   from deraadt@

   this is errata/7.9/026_sysvipc.patch.sig
VersionDeltaFile
1.82.2.2+64-28sys/kern/sysv_shm.c
1.491.2.3+46-4sys/kern/kern_sysctl.c
+110-322 files

OpenBSD/src oN4wnFT — sys/kern kern_sysctl.c sysv_shm.c

   Introduce in-kernel 'shmid_ds_kern' structure where `shm_nattch' has the
   type of uint64_t. The original 'shmid_ds' used to deliver data to the
   userland, so API/ABI is not broken. The delivered `shm_nattch' value is
   clamped with SHRT_MAX.
   from mvs@; OK deraadt@

   Do missing shmid_ds_kern to shmid_ds conversion in the IPC_SET case of
   sys_shmctl().
   from deraadt@

   the visual hint for sys_shmctl_args became incorrect with the _kernl adjustment
   from deraadt@

   this is errata/7.8/062_sysvipc.patch.sig
VersionDeltaFile
1.81.2.2+69-31sys/kern/sysv_shm.c
1.483.2.3+46-4sys/kern/kern_sysctl.c
+115-352 files

OpenBSD/src GD5A8VI — usr.sbin/httpd server.c

   zap dead statistics leftover;  OK kirill

   Stubbed since import in 2014, last touched in 2016.
VersionDeltaFile
1.139+1-8usr.sbin/httpd/server.c
+1-81 files

OpenBSD/src ZHDVzXE — usr.bin/ipcs ipcs.c

   In ipcs(1) use shm_cpid to determine whether a shared memory segment is in use.
   As since kern_sysctl.c r1.490 shm_internal is always NULL.
   from dgl@; OK deraadt@

   sysctl KERN_SYSVIPC_SEM_INFO was leaking the sem_base kernel pointer to userland.
   This was used by ipcs(1), so change to use sem_ctime instead to decide if it
   should show the semaphore.
   Found independently by me and a report from Bruce Dang of Calif.io (minutes apart).
   from dgl@; OK deraadt@

   this is errata/7.8/062_sysvipc.patch.sig
VersionDeltaFile
1.27.24.1+3-3usr.bin/ipcs/ipcs.c
+3-31 files

OpenBSD/src yQQk8Q8 — sys/kern kern_sysctl.c

   In sysctl KERN_PROC_ARGS "cnt" is an int, read directly from a userspace
   process. The while loop has a "cnt > 0" check, but on 32-bit platforms a value
   can overflow and result in the querying process having data written past the
   supplied buffer. Limit the number of elements in the array to ARG_MAX.
   from dgl@; OK deraadt@

   this is errata/7.9/025_procargs.patch.sig
VersionDeltaFile
1.491.2.2+12-1sys/kern/kern_sysctl.c
+12-11 files

OpenBSD/src gzwEKlj — sys/kern kern_sysctl.c

   In sysctl KERN_PROC_ARGS "cnt" is an int, read directly from a userspace
   process. The while loop has a "cnt > 0" check, but on 32-bit platforms a value
   can overflow and result in the querying process having data written past the
   supplied buffer. Limit the number of elements in the array to ARG_MAX.
   from dgl@; OK deraadt@

   this is errata/7.8/061_procargs.patch.sig
VersionDeltaFile
1.483.2.2+12-1sys/kern/kern_sysctl.c
+12-11 files

OpenBSD/src 7riphCY — usr.sbin/unbound configure, usr.sbin/unbound/daemon remote.c

   import Unbound 1.26.1, tests from phessler, ok florian
   merge Unbound 1.26.1
   from sthen@

   this is errata/7.9/023_unbound.patch.sig
VersionDeltaFile
1.61.2.1+2,416-2,779usr.sbin/unbound/configure
1.56.4.1+1,091-0usr.sbin/unbound/doc/Changelog
1.31.4.1+571-150usr.sbin/unbound/services/authzone.c
1.4.2.1+552-127usr.sbin/unbound/doc/unbound.conf.rst
1.55.2.1+512-135usr.sbin/unbound/doc/unbound.conf.5.in
1.44.2.1+575-17usr.sbin/unbound/daemon/remote.c
+5,717-3,208157 files not shown
+13,441-5,285163 files

OpenBSD/src YVwKx4O — usr.sbin/unbound aclocal.m4 ltmain.sh, usr.sbin/unbound/doc unbound.conf.rst Changelog

   import Unbound 1.26.1, tests from phessler, ok florian
   merge Unbound 1.26.1
   from sthen@

   this is errata/7.8/059_unbound.patch.sig
VersionDeltaFile
1.59.2.1+1,621-438usr.sbin/unbound/configure
1.6.2.1+967-599usr.sbin/unbound/ltmain.sh
1.56.2.1+1,091-0usr.sbin/unbound/doc/Changelog
1.11.2.1+509-348usr.sbin/unbound/aclocal.m4
1.31.2.1+571-150usr.sbin/unbound/services/authzone.c
1.2.2.1+559-126usr.sbin/unbound/doc/unbound.conf.rst
+5,318-1,661159 files not shown
+14,097-3,772165 files

OpenBSD/src QzftiQ2 — sbin/unwind/libunbound/services listen_dnsport.c mesh.c, sbin/unwind/libunbound/util configlexer.c

   Sync to unbound 1.26.1; heavy lifting by sthen
   from florian@

   this is errata/7.9/023_unbound.patch.sig
VersionDeltaFile
1.24.2.1+3,640-3,547sbin/unwind/libunbound/util/configlexer.c
1.23.4.1+571-150sbin/unwind/libunbound/services/authzone.c
1.20.4.1+439-79sbin/unwind/libunbound/services/outside_network.c
1.23.4.1+338-175sbin/unwind/libunbound/services/mesh.c
1.17.4.1+256-44sbin/unwind/libunbound/validator/validator.c
1.21.4.1+193-103sbin/unwind/libunbound/services/listen_dnsport.c
+5,437-4,09887 files not shown
+8,955-5,02093 files

OpenBSD/src E7T5HeR — sbin/unwind/libunbound/services listen_dnsport.c mesh.c, sbin/unwind/libunbound/util configlexer.c

   Sync to unbound 1.26.1; heavy lifting by sthen
   from florian@

   this is errata/7.8/059_unbound.patch.sig
VersionDeltaFile
1.23.2.1+3,638-3,533sbin/unwind/libunbound/util/configlexer.c
1.23.2.1+571-150sbin/unwind/libunbound/services/authzone.c
1.20.2.1+439-79sbin/unwind/libunbound/services/outside_network.c
1.23.2.1+338-175sbin/unwind/libunbound/services/mesh.c
1.17.2.1+256-44sbin/unwind/libunbound/validator/validator.c
1.21.2.1+193-103sbin/unwind/libunbound/services/listen_dnsport.c
+5,435-4,08487 files not shown
+8,975-5,00993 files

OpenBSD/src mZMxgCb — usr.sbin/httpd httpd.conf.5

   Sprinkle tags to be able to navigate to [no] keywords;  OK schwarze

   None of these were reachable by tags, e.g. ":t log" wouldn't jump to the
   "log" keyword's definition because auf how auto-tagging works;
   see `man -Otag=Tg mdoc' for details.
VersionDeltaFile
1.136+14-2usr.sbin/httpd/httpd.conf.5
+14-21 files

OpenBSD/src 2ZkZwN2 — usr.sbin/nsd config.h.in metrics.c, usr.sbin/nsd/doc ChangeLog

   import NSD 4.15.2, tests from phessler, ok florian
   merge NSD 4.15.2
   from sthen@

   this is errata/7.9/022_nsd.patch.sig
VersionDeltaFile
1.64.2.1+1,345-1,818usr.sbin/nsd/configure
1.1.1.3.2.1+338-417usr.sbin/nsd/simdzone/configure
1.30.2.1+302-61usr.sbin/nsd/nsec3.c
1.1.1.2.2.1+195-157usr.sbin/nsd/metrics.c
1.21.2.1+267-0usr.sbin/nsd/doc/ChangeLog
1.47.2.1+122-125usr.sbin/nsd/config.h.in
+2,569-2,57865 files not shown
+4,484-3,35171 files

OpenBSD/src TSqlfwY — usr.sbin/nsd rdata.h ixfr.c, usr.sbin/nsd/simdzone configure

   import NSD 4.15.2, tests from phessler, ok florian
   merge NSD 4.15.2
   from sthen@

   this is errata/7.8/058_nsd.patch.sig
VersionDeltaFile
1.19.2.1+3,972-974usr.sbin/nsd/rdata.c
1.23.2.1+981-866usr.sbin/nsd/dns.c
1.1.1.2.2.1+338-417usr.sbin/nsd/simdzone/configure
1.24.2.1+492-251usr.sbin/nsd/difffile.c
1.5.2.1+386-350usr.sbin/nsd/ixfr.c
1.3.8.1+668-31usr.sbin/nsd/rdata.h
+6,837-2,88980 files not shown
+10,844-4,77286 files

OpenBSD/src 4cm9P7m — usr.sbin/edquota edquota.c

   Use strtonum() instead of strtoul().
   OK deraadt@
VersionDeltaFile
1.63+11-29usr.sbin/edquota/edquota.c
+11-291 files

OpenBSD/src DAfTSAW — usr.sbin/vmd pci.c

   vmd(8): unbreak arm64 build
VersionDeltaFile
1.44+7-1usr.sbin/vmd/pci.c
+7-11 files

OpenBSD/src PZhcIFN — sys/conf newvers.sh

   leave -beta
VersionDeltaFile
1.218+3-3sys/conf/newvers.sh
+3-31 files

OpenBSD/src K1hQ5wq — distrib/special/doas doas.c

   Stop using non-standard UID_MAX and GID_MAX because a variety of code
   uses inclusive comparisons such that the UINT_MAX value aliases on top
   of -1 and causes issues.  First instance of this reported by Acts1631.
   joint work with millert
VersionDeltaFile
1.5+3-3distrib/special/doas/doas.c
+3-31 files

OpenBSD/src qc19ESN — lib/libc/gen getpwent.c getgrouplist.c, lib/libutil passwd.c

   Stop using non-standard UID_MAX and GID_MAX because a variety of code
   uses inclusive comparisons such that the UINT_MAX value aliases on top
   of -1 and causes issues.  First instance of this reported by Acts1631.
   joint work with millert
VersionDeltaFile
1.58+3-3lib/libutil/passwd.c
1.75+3-3lib/libc/gen/getpwent.c
1.33+3-3lib/libc/gen/getgrouplist.c
1.53+3-3lib/libc/gen/getgrent.c
+12-124 files

OpenBSD/src SyAzYeS — sys/kern kern_acct.c

   use UNVEIL_WRITE for acct; from Acts1631
VersionDeltaFile
1.51+2-2sys/kern/kern_acct.c
+2-21 files

OpenBSD/src PLwcd22 — sys/sys limits.h

   remove UID_MAX and GID_MAX defines.  base no longer uses them.  The
   few cases in ports will be purged sometime today.
VersionDeltaFile
1.11+1-6sys/sys/limits.h
+1-61 files