CVS: cvs.openbsd.org: src

2022-02-22 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/02/23 00:16:26

Modified files:
sys/arch/arm64/include: asm.h 
sys/arch/riscv64/include: asm.h 

Log message:
unifdef __ELF__
ok guenther@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/02/22 16:25:44

Modified files:
usr.bin/seq: seq.c 

Log message:
whitespace



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/02/22 16:24:09

Modified files:
usr.bin/seq: seq.c 

Log message:
Check asprintf() return to avoid crashing in strcmp().

ok deraadt millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/02/22 13:37:19

Modified files:
sys/arch/arm64/dev: aplsmc.c 

Log message:
Fix thinko in construction of SMC key for the targeted GPIO pin.

visa@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 13:00:12

Modified files:
distrib/sets/lists/base: mi 
distrib/sets/lists/man: mi 

Log message:
sync



CVS: cvs.openbsd.org: src

2022-02-22 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/02/22 11:08:20

Modified files:
lib/libexpat   : Tag: OPENBSD_6_9 Changes 
lib/libexpat/lib: Tag: OPENBSD_6_9 xmlparse.c xmltok.c 
  xmltok_impl.c 
lib/libexpat/tests: Tag: OPENBSD_6_9 runtests.c 

Log message:
Backport security fixes from libexpat 2.4.5 and 2.4.6 to 2.2.10.
This fixes CVE-2022-25235, CVE-2022-25236 CVE-2022-25313, CVE-2022-25314,
and CVE-2022-25315.  Relevant for OpenBSD are security fixes #558
#559 #560 #561 #562 and bug fixes #566.

this is errata/6.9/031_expat.patch.sig



CVS: cvs.openbsd.org: src

2022-02-22 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/02/22 11:02:41

Modified files:
lib/libexpat   : Tag: OPENBSD_7_0 Changes README.md 
lib/libexpat/doc: Tag: OPENBSD_7_0 reference.html 
lib/libexpat/examples: Tag: OPENBSD_7_0 elements.c outline.c 
lib/libexpat/lib: Tag: OPENBSD_7_0 expat.h xmlparse.c xmlrole.c 
  xmltok.c xmltok_impl.c 
lib/libexpat/tests: Tag: OPENBSD_7_0 runtests.c 
lib/libexpat/tests/benchmark: Tag: OPENBSD_7_0 benchmark.c 

Log message:
Update libexpat to 2.4.6.  This fixes CVE-2022-25235, CVE-2022-25236
CVE-2022-25313, CVE-2022-25314, and CVE-2022-25315.  Relevant for
OpenBSD are security fixes #558 #559 #560 #561 #562 and bug fixes
#566.  No library bump necessary.  Revert XML_MICRO_VERSION to the
value of OpenBSD 7.0 release.

this is errata/7.0/015_expat.patch.sig



CVS: cvs.openbsd.org: src

2022-02-22 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2022/02/22 10:42:52

Modified files:
bin/ps : keyword.c 
usr.sbin/sa: extern.h 

Log message:
Use sizeof() instead of KI_MAXCOMLEN and KI_WMESGLEN in structs.
This way we keep the size of the strings in the private struct in
sync with what the kernel gives us.  OK deraadt@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 10:35:01

Modified files:
lib/libkvm : kvm.c kvm_file2.c kvm_proc.c kvm_proc2.c 
usr.bin/kdump  : mksubr 
usr.bin/ktrace : ktrace.c subr.c 
usr.bin/systat : pigs.c vmstat.c 
usr.bin/tmux   : procname.c 
usr.bin/top: machine.c 
usr.bin/vmstat : vmstat.c 
usr.bin/w  : proc_compare.c w.c 
usr.sbin/procmap: procmap.c 
usr.sbin/pstat : pstat.c 
usr.sbin/tcpdump: print-pflog.c 

Log message:
MAXCOMLEN is no longer needed in these programs, so remove the annotation
from sys/param.h include lines, or remove the include lines entirely if
it this was the least requirement.
ok millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 10:31:31

Modified files:
usr.bin/kdump  : kdump.c 

Log message:
Since ktr_comm is now a string, we do not need MAXCOMLEN to limit printf.
And thus, sys/param.h is not needed either.
ok millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 10:30:07

Modified files:
bin/ps : keyword.c 

Log message:
Instead of using MAXCOMLEN from sys/param.h, use KI_MAXCOMLEN as width,
from sysctl.h.  This isn't a perfect transition, still thinking about
other ways to do it.
ok millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 10:26:04

Modified files:
sys/dev/dt : dt_dev.c dtvar.h 
usr.sbin/btrace: btrace.c 

Log message:
Since other exported commandnames were increased to 24 and graduated into
proper strings, adapt dt's exported string in the same way.
Old/new files/tools will not work the same way.
That this interface needs to also change was pointed out by jsg



CVS: cvs.openbsd.org: src

2022-02-22 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/02/22 10:24:13

Modified files:
usr.sbin/bgpd  : parse.y 

Log message:
Convert parse.y to use stdint.h types uintX_t instead of u_intX_t
OK tb@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 10:22:29

Modified files:
sys/sys: acct.h 
sys/kern   : kern_acct.c 
share/man/man5 : acct.5 
usr.sbin/sa: extern.h main.c 

Log message:
Since other exported commandnames were increased to 24 and graduated into
proper strings, adapt struct acct's ac_comm similarily.  While here increase
ac_mem to 32-bits, increase ac_flag from 8 to 32 bits for future extensions,
add ac_pid for forensics, and reorder the structure to avoid compiler pads.
More work remains in the sa(8) command to use ac_pid better.
This is a flag day for the acct file format, new/old files/tools are 
incompatible.
ok bluhm millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 10:14:14

Modified files:
sys/sys: core.h ktrace.h proc.h 
sys/kern   : kern_exec.c kern_ktrace.c 

Log message:
Start using new _MAXCOMLEN (a proper string expanded to 24 bytes
including the NUL), in all internal interafaces, and expose this
in ktrace, core, or proc.h visibility.
ok millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 10:05:51

Modified files:
sys/sys: sysctl.h 

Log message:
sysctl already passed the commandname as a 24-byte string KI_MAXCOMLEN
because it was padded.  Define it in terms of _MAXCOMLEN from syslimits.h
ok millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 10:04:29

Modified files:
sys/sys: param.h 

Log message:
Define MAXCOMLEN in terms of _MAXCOMLEN (-1, because MAXCOMLEN does not
have the terminating NUL).  In the near future, fewer programs will use
this yucky non-string, some kernel:userland interfaces will to change to
pass a proper string.
ok millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/02/22 09:58:08

Modified files:
sys/sys: syslimits.h 

Log message:
Add _MAXCOMLEN to syslimits, it is 24, and includes the NUL.  Following
commits will change sys/param.h MAXCOMLEN, sys/sysctl.h KI_MAXCOMLEN,
sys/acct.h ac_comm[], dev/ic/dtvar.h DTMAXCOMLEN to use this, and also
adapt most to the included NUL correctly.  This will allow us to remove
sys/param.h include from userland base.
sys/syslimits.h is chosen as the best place for this define because it
has very small namespace which is already pulled in often.
ok millert



CVS: cvs.openbsd.org: src

2022-02-22 Thread Rob Pierce
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2022/02/22 09:14:38

Modified files:
usr.bin/seq: seq.c 

Log message:
Pledge stdio.
Ok millert@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Rob Pierce
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2022/02/22 09:08:59

Modified files:
usr.bin/seq: seq.c 

Log message:
Remove -v option from usage.
Ok millert@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Martijn van Duren
CVSROOT:/cvs
Module name:src
Changes by: mart...@cvs.openbsd.org 2022/02/22 08:59:13

Modified files:
usr.sbin/snmpd : application.c 

Log message:
requestid is a 32 bit integer, make sure that we request that with
ober_scanf_elements.

Found the hard way on octeon and patch tested by sebastian  rostwald
 de
OK tb



CVS: cvs.openbsd.org: src

2022-02-22 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2022/02/22 08:15:34

Modified files:
usr.bin: Makefile 
Added files:
usr.bin/seq: Makefile seq.1 seq.c 

Log message:
Add a seq(1) command, similar to what is present in GNU and Plan9.
Adapted from the NetBSD version with some changes from FreeBSD.
OK gnezdo@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2022/02/22 08:14:55

src/usr.bin/seq

Update of /cvs/src/usr.bin/seq
In directory cvs.openbsd.org:/tmp/cvs-serv74396/seq

Log Message:
Directory /cvs/src/usr.bin/seq added to the repository



CVS: cvs.openbsd.org: src

2022-02-22 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/02/22 06:47:21

Modified files:
regress/sbin/iked/parser: test_parser_fuzz.c 

Log message:
The fuzzer logs everything to syslog, this is not what we want.
Call log_init() and set debug but clear verbose afterwards with
log_setverbose(0) still the fuzzer is very verbose.
OK millert@ some time ago



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/02/22 06:45:09

Modified files:
usr.sbin/acme-client: key.c 

Log message:
Plug leak in ec_key_create()

EVP_PKEY_set1_EC_KEY() bumps the refcount of eckey, so eckey won't be
freed at the end of keyproc() or acctproc(), which means that secrets
aren't wiped. Move EC_KEY_free() to the out label, so that the refcount
is decremented or the key freed, as appropriate.

tested/ok claudio



CVS: cvs.openbsd.org: src

2022-02-22 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2022/02/22 06:34:23

Modified files:
sys/arch/powerpc64/dev: ipmi_opal.c kexec.c 
sys/arch/riscv64/riscv64: syscall.c 

Log message:
Remove extra ;

No functional change.



CVS: cvs.openbsd.org: src

2022-02-22 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2022/02/22 06:31:18

Modified files:
usr.bin/tmux   : session.c 

Log message:
Do not attempt to update focus (and crash) when there is no previous window.



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/02/22 05:38:30

Modified files:
usr.sbin/acme-client: key.c 

Log message:
whitespace/KNF



CVS: cvs.openbsd.org: src

2022-02-22 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/02/22 05:36:17

Modified files:
usr.sbin/acme-client: key.c 

Log message:
acme-client: only warn on PEM_write_ECPrivateKey() failure instead
of everytime ec_create_key() is called.

>From wolf at wolfsden dot cz

ok florian



CVS: cvs.openbsd.org: src

2022-02-22 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/02/22 05:08:22

Modified files:
usr.sbin/bgpd  : bgpd.conf.5 

Log message:
Clarify RTR and roa-set sections

OK claudio@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2022/02/22 04:10:41

Modified files:
usr.bin/tmux   : format.c session.c tmux.1 tmux.h 

Log message:
Add next_session_id format with the next session ID, GitHub issue 3078.



CVS: cvs.openbsd.org: src

2022-02-22 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2022/02/22 04:07:25

Modified files:
usr.bin/tmux   : format-draw.c 

Log message:
Initialize copy_width before adjusting it, GitHub issue 3079.



CVS: cvs.openbsd.org: src

2022-02-22 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2022/02/22 04:01:57

Modified files:
usr.bin/tmux   : popup.c 

Log message:
Use correct size for screen when popup is created without borders.



CVS: cvs.openbsd.org: src

2022-02-22 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2022/02/22 03:53:34

Modified files:
usr.bin/tmux   : tmux.1 

Log message:
Add window-resized hook to man page, from Thomas Adam.



CVS: cvs.openbsd.org: src

2022-02-22 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/02/22 03:53:11

Modified files:
lib/libexpat   : Changes README.md 
lib/libexpat/doc: reference.html 
lib/libexpat/examples: elements.c outline.c 
lib/libexpat/lib: expat.h xmlparse.c xmlrole.c xmltok.c 
  xmltok_impl.c 
lib/libexpat/tests: runtests.c 
lib/libexpat/tests/benchmark: benchmark.c 

Log message:
Update libexpat to 2.4.6.  This fixes CVE-2022-25235, CVE-2022-25236
CVE-2022-25313, CVE-2022-25314, and CVE-2022-25315.  Relevant for
OpenBSD are security fixes #558 #559 #560 #561 #562 and bug fixes
#566.  No library bump necessary.
OK tb@



CVS: cvs.openbsd.org: src

2022-02-22 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/02/22 02:55:54

Modified files:
sbin/ifconfig  : ifconfig.c 

Log message:
don't hide the mtu on "bridge" interfaces.

interfaces like vxlan and nvgre have bridges inside them and respond
to bridge ioctls, but they are still interfaces that handle l3
traffic so the mtu means something on them. if we don't want bridge
to show an mtu, that can be done by bridge(4) instead of having
ifconfig make assumptions like this.

noticed by jason tubnor
ok deraadt@ claudio@



CVS: cvs.openbsd.org: src

2022-02-22 Thread Ricardo Mestre
CVSROOT:/cvs
Module name:src
Changes by: mes...@cvs.openbsd.org  2022/02/22 01:20:35

Modified files:
libexec/rpc.rusersd: rusersd.c 

Log message:
disable further calls to unveil(2)

pointed out by brynet@