OpenBSD/src 9sGDTW3usr.bin/rpcgen rpc_util.c

   locase() in usr.bin/rpcgen/rpc_util.c copies an identifier into
   a static buffer without bounds checking

   OK deraadt@
VersionDeltaFile
1.18+3-1usr.bin/rpcgen/rpc_util.c
+3-11 files

OpenBSD/src tu8NutHlib/libc/gen getcap.c

   cgetnext() in lib/libc/gen/getcap.c copies a record name into a
   stack buffer without bounds checking

   OK deraadt@
VersionDeltaFile
1.39+5-1lib/libc/gen/getcap.c
+5-11 files

OpenBSD/src GJJIiHBsys/dev/wscons wsdisplay.c

   Some mapchar emulops require a question mark character, so don't permit
   loading if that is missing (bounded by firstchar and numchars).
   An AI triage report made a hastly conclusion there were bigger problems
   here but Miod figures it is just this ? problem.
   diff from miod
   report from Bruce Dang of Calif.io
VersionDeltaFile
1.156+8-1sys/dev/wscons/wsdisplay.c
+8-11 files

OpenBSD/src XXNmJh4usr.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.

   ok deraadt
VersionDeltaFile
1.29+2-2usr.bin/ipcs/ipcs.c
+2-21 files

OpenBSD/src qmPFLELusr.sbin/vmctl main.c vmctl.h

   vmctl(8): switch to new disk format enum.

   Replace int's with the new enum type used by vmd.

   Discussed with mlarkin@
VersionDeltaFile
1.89+5-5usr.sbin/vmctl/main.c
1.45+4-4usr.sbin/vmctl/vmctl.h
1.98+3-3usr.sbin/vmctl/vmctl.c
+12-123 files

OpenBSD/src t0qMo4Jsys/dev/pv if_vio.c

   vio: recover from missed RX interrupts

   It seems at least on Oracle Cloud (arm64, KVM) and on vmd, sometimes rx
   interrupts get lost. As a workaround, check the virtqueues in vio_rxtick(),
   which allows to recover from this situation.

   Diff from renaud@
   tested by mbuhl@
   ok stsp@
VersionDeltaFile
1.79+2-1sys/dev/pv/if_vio.c
+2-11 files

OpenBSD/src RkiB1C8sys/kern kern_sysctl.c

   The struct kfino_vmentry copied to userland is 80, and (depending
   on architecture?) has 7 bytes of padding at the end, which is
   uninitialized.  Use M_ZERO.
   from tgs
VersionDeltaFile
1.491+2-2sys/kern/kern_sysctl.c
+2-21 files

OpenBSD/src 4AVKrlXusr.sbin/smtpd smtpd-filters.7 smtpd-tables.7

   smtpd: bump version to 7.9
VersionDeltaFile
1.17+4-4usr.sbin/smtpd/smtpd-filters.7
1.7+3-3usr.sbin/smtpd/smtpd-tables.7
1.694+2-2usr.sbin/smtpd/smtpd.h
+9-93 files

OpenBSD/src HGFlmGJusr.sbin/smtpd table.c

   don't lowercase K_AUTH lookups

   this diff has circulated for a while, being written and re-written by
   different people.  In this case, I'm taking Pietro Cerutti's version.
VersionDeltaFile
1.55+3-1usr.sbin/smtpd/table.c
+3-11 files

OpenBSD/src JCeymYMusr.sbin/bgpd rde_community.c

   Avoid undefined behaviour in the community code by checking nentries to
   be not 0 before memcmp, bsearch or siphash calls.

   Calling these functions with a NULL pointer is UB even with a zero len.
   While I did fix some code already during a review of all such possible
   NULL, 0 calls I missed the bsearch one and introduced the community_equal
   memcmp after that.

   Reported by Synmac Oliver
   OK tb@ deraadt@
VersionDeltaFile
1.25+12-4usr.sbin/bgpd/rde_community.c
+12-41 files

OpenBSD/src VUOLvaIsbin/slaacd engine.c

   Prevent buffer overflow by checking the correct counter.

   An attacker on the same layer 2 network can send rogue router
   advertisements, potentially crashing slaacd.

   From Maurice Hieronymus (mhi AT mailbox.org), thanks!

   OK deraadt
VersionDeltaFile
1.101+2-2sbin/slaacd/engine.c
+2-21 files

OpenBSD/src nAw443Psys/arch/octeon/dev octciu.c

   sys/octeon: cleanup all interrupts

   octciu_next_irq() operates on a uint64_t pending interrupt bitmap, and
   irq spans the full 0..63 range. Using 1u << irq therefore builds a 32
   bit mask for a 64 bit word; once irq >= 32, the selected pending bit is
   no longer cleared correctly.

   The immediate consequence is loss of forward progress in the dispatcher
   loop: the same interrupt can remain logically pending in the local copy
   of isr, the loop can revisit it indefinitely, and the CPU can remain
   trapped in interrupt handling.

   OK: kettenis@, jca@, deraadt@
VersionDeltaFile
1.21+2-2sys/arch/octeon/dev/octciu.c
+2-21 files

OpenBSD/src 80a4oBxsys/netinet tcp_input.c

   Properly handle the FIN flag in tcp_flush_queue.

   Once a FIN packet is received all following data should simply be
   discarded.  Normally this is done in tcp_input but once traffic
   needs reassembly the FIN handling in the reassembly queue was not
   quite correct. Data directly following the FIN packet was also
   reassembled and the FIN was actually lost. The check if packets
   should be dropped only checked for SS_CANTRCVMORE which is only
   set after tcp_flush_queue returned TH_FIN.

   Reported by Xint Code
   OK sashan@ deraadt@
VersionDeltaFile
1.466+4-4sys/netinet/tcp_input.c
+4-41 files

OpenBSD/src peGTkwdsys/netinet ip_input.c

   Don't mix heap and stack pointers in offset calculation

   OK canacar@ claudio@ deraadt@
VersionDeltaFile
1.427+2-4sys/netinet/ip_input.c
+2-41 files

OpenBSD/src d4iMxv0usr.sbin/fw_update patterns.c

   Add pattern for riscv64-spacemit-dtb that matches smtgpio(4).

   ok deraadt@, jca@
VersionDeltaFile
1.20+2-1usr.sbin/fw_update/patterns.c
+2-11 files

OpenBSD/src J8gtX54sys/kern tty.c

   For sysctl({CTL_KERN, KERN_TTY, KERN_TTY_INFO), only export the
   t_session kernel address pointer if the caller is root.
   Reported by Bruce Dang of Calif.io
   ok claudio
VersionDeltaFile
1.183+4-2sys/kern/tty.c
+4-21 files

OpenBSD/src HRYmeG1sys/sys sysctl.h

   do not expose p_addr kernel address unless root
   from Bruce Dang of Calif.io
   ok claudio kettenis
VersionDeltaFile
1.248+4-3sys/sys/sysctl.h
+4-31 files

OpenBSD/src FFcnP6Bshare/man/man4 pfsync.4

   Fix missing word, that rather changed the meaning, spotted by "schalken" on IRC.
VersionDeltaFile
1.41+3-3share/man/man4/pfsync.4
+3-31 files

OpenBSD/src KyN2LTelib/libtls tls_signer.c tls_ocsp.c

   libtls: consistently handle allocation failures

   Use tls_set_errorx() or tls_error_setx() rather than the versions without
   x for TLS_ERROR_OUT_OF_MEMORY. ENOMEM adds no further info.

   From Michael Forney

   ok bcook
VersionDeltaFile
1.15+4-4lib/libtls/tls_signer.c
1.29+2-2lib/libtls/tls_ocsp.c
+6-62 files

OpenBSD/src otMPdS1lib/libtls tls_config.c

   libtls: use TLS_ERROR_OUT_OF_MEMORY after malloc failure

   tls_config_load_file() hat a spot that used TLS_ERROR_UNKNOWN, so switch
   that to the usual error code. Use tls_error_setx() since strerror(ENOMEM)
   adds nothing.

   From Michael Forney

   ok bcook
VersionDeltaFile
1.73+2-2lib/libtls/tls_config.c
+2-21 files

OpenBSD/src EUZWKsZlib/libtls tls_keypair.c

   libtls: use tls_error_setx() after BIO_new_mem_buf()

   This is the only place where tls_error_set() was used. While the new length
   check now guarantees that the failure is due to ENOMEM, this info does not
   add value.

   From Michael Forney

   ok bcook
VersionDeltaFile
1.12+2-2lib/libtls/tls_keypair.c
+2-21 files

OpenBSD/src QBOAOc0lib/libtls tls_ocsp.c tls_server.c

   libtls: prefer x version of error setting

   If a check fails and errno is not necessarily set by the previous API call
   use tls_set_errorx() or tls_error_setx() since turning an unrelated errno
   into an error string is unhelpful.

   From Michael Forney

   ok bcook
VersionDeltaFile
1.28+5-5lib/libtls/tls_ocsp.c
1.53+5-5lib/libtls/tls_server.c
1.11+3-3lib/libtls/tls_keypair.c
1.105+2-2lib/libtls/tls.c
1.52+2-2lib/libtls/tls_client.c
+17-175 files

OpenBSD/src TetivHnsys/kern kern_sysctl.c

   Similar to sysctl KERN_SYSVIPC_SEMINFO, KERN_SYSVIPC_SHM_INFO also leaks
   the same kernel pointer that shminfo() leaks.
   ok dgl
VersionDeltaFile
1.490+2-1sys/kern/kern_sysctl.c
+2-11 files

OpenBSD/src kzZDrXHsys/kern kern_sysctl.c, usr.bin/ipcs ipcs.c

   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).
   ok deraadt
VersionDeltaFile
1.28+2-2usr.bin/ipcs/ipcs.c
1.489+2-1sys/kern/kern_sysctl.c
+4-32 files

OpenBSD/src plggQbhlib/libtls tls_signer.c tls_keypair.c

   libtls: add missing length checks before BIO_new_mem_buf()

   Like all proper libcrypto APIs, BIO_new_mem_buf() takes an int as a length
   argument. Check the size_t passed in to be at most INT_MAX to avoid issues
   with truncation and overflow like it's done everywhere else. After release
   this should probably be clamped down further since legitimate files (certs
   and keys) are nowhere near this large.

   Prompted by a diff by Michael Forney

   ok jsing
VersionDeltaFile
1.14+11-1lib/libtls/tls_signer.c
1.10+6-1lib/libtls/tls_keypair.c
+17-22 files

OpenBSD/src UTM01t4sys/kern sysv_shm.c

   shmctl IPC_STAT was leaking the shm_internal kernel malloc pointer into userland
   The manual page calls this "sysv stupidity", .h calls it 'implementation
   specific data". It is surprising we didn't fix this before.
   Found by tsg@, ok millert
VersionDeltaFile
1.82+9-7sys/kern/sysv_shm.c
+9-71 files

OpenBSD/src RGzRbxBsys/arch/riscv64/dev smtcomphy.c

   Calibrate the PHY if the firmware didn't do so already.

   ok jsing@ (who came up with a very similar diff)
VersionDeltaFile
1.3+35-3sys/arch/riscv64/dev/smtcomphy.c
+35-31 files

OpenBSD/src geMWFxMsys/arch/riscv64/riscv64 pmap.c

   The riscv64 pmap implementation copies the kernel l1 page table entries
   into all other pmaps to allow access to KVA when running in kernel mode.
   Unfortunately when pmap_growkernel() creates new kernel l1 page table
   entries, existing pmaps are not updated.  This causes unexpected kernel
   page faults when KVAs that depend on those new kernel l1 page table
   entries are used.  Fix this by fully populating the kernel l1 page tables
   in pmap_bootstrap().

   ok mlarkin@, jca@
VersionDeltaFile
1.49+13-10sys/arch/riscv64/riscv64/pmap.c
+13-101 files

OpenBSD/src vWnz7Clregress/lib/libtls/keypair keypairtest.c

   keypairtest: zero out tls_error before running tests

   Otherwise tls_error_clear() (called e.g. via tls_error_vset()) will
   free the bad error->msg pointer.

   From Michael Forney
VersionDeltaFile
1.8+2-2regress/lib/libtls/keypair/keypairtest.c
+2-21 files

OpenBSD/src utmGg9zsys/kern kern_sysctl.c

   sysctl skips processes with pr->ps_pgrp == NULL.  comment said this
   was dying processes.  actually it is also brand new processes now.
VersionDeltaFile
1.488+2-2sys/kern/kern_sysctl.c
+2-21 files