Re: disable PPP_BSDCOMP by default

2021-03-25 Thread Theo de Raadt
Balder Oddson wrote: > On Thu, Mar 25, 2021 at 03:40:15PM -0600, Theo de Raadt wrote: > > Stuart Henderson wrote: > > > > > > Not having read the code, case in point on principle, I'm arguing that > > > > there should be solid reasoning to enable it by default, as those with a > > > > need for

Remove mandatory newline at end of armored openssh private keys

2021-03-25 Thread Allen Smith
Hi All, These days I live in the automation space where armored ssh keys get loaded in various automation tools. These get pulled out as strings, added to ssh-agents or handed to ssh as identity files. I have seen at a number of clients where various parts of that break down due to tools stripp

Re: veb(4) exceeds 1514 byte frame size while bridge(4) doesn't?

2021-03-25 Thread Kevin Lo
On Tue, Mar 23, 2021 at 08:24:56PM +1000, David Gwynne wrote: > > On Sun, Mar 21, 2021 at 04:24:24PM +0100, Jurjen Oskam wrote: > > Hi, > > > > When trying out veb(4), I ran into a situation where TCP sessions across a > > veb(4) bridge stalled while the exact same config using bridge(4) worked

Re: disable PPP_BSDCOMP by default

2021-03-25 Thread Balder Oddson
On Thu, Mar 25, 2021 at 03:40:15PM -0600, Theo de Raadt wrote: > Stuart Henderson wrote: > > > > Not having read the code, case in point on principle, I'm arguing that > > > there should be solid reasoning to enable it by default, as those with a > > > need for it can certainly enable it and buil

Re: monotonic time going back by wrong skews

2021-03-25 Thread Scott Cheloha
On Thu, Mar 25, 2021 at 07:24:23PM -0400, Josh Rickmar wrote: > On Thu, Mar 25, 2021 at 05:28:54PM -0500, Scott Cheloha wrote: > > Feel free to share your raw data. > > Attached. Hmmm, interesting stuff. $ ministat -q cpu* x cpu1-skew + cpu2-skew * cpu3-skew % cpu4-skew # cpu5-sk

cwfg: flag sensor as invalid on bogus reads

2021-03-25 Thread Klemens Nanni
Follow-up to "arm64: make cwfg(4) report battery information to apm(4)". This driver continues to report stale hw.sensors values when reading them fails, which can easily be observed on a Pinebook Pro after plugging in the AC cable. Running on battery looks like this (note sensors and apm are in

Re: monotonic time going back by wrong skews

2021-03-25 Thread Josh Rickmar
On Thu, Mar 25, 2021 at 05:28:54PM -0500, Scott Cheloha wrote: > Feel free to share your raw data. Attached. e485skews.tgz Description: application/tar-gz

Re: monotonic time going back by wrong skews

2021-03-25 Thread Scott Cheloha
On Thu, Mar 25, 2021 at 02:33:43PM -0400, Josh Rickmar wrote: > On Thu, Mar 25, 2021 at 01:18:04PM -0500, Scott Cheloha wrote: > > > On Mar 24, 2021, at 8:29 AM, Josh Rickmar wrote: > > > > > > [...] > > > > Which diff did you apply? Yasuoka provided two diffs. > > > > In any case, ignore this

Superflouous memcpy() in vmctl/main.c

2021-03-25 Thread Preben Guldberg
Looking through the code for vmctl, I came across a repeated memcpy() in vmctl/main.c. In the checks below, ret is either set by a memcpy() or defaulted to 0. If set by memcpy(), and ret != 0, the memcpy() is repeated verbatim, which seems unnecessary. diff 09b708f572d76de8db7f7948ea7359b19bbd1

Re: disable PPP_BSDCOMP by default

2021-03-25 Thread Theo de Raadt
Stuart Henderson wrote: > > Not having read the code, case in point on principle, I'm arguing that > > there should be solid reasoning to enable it by default, as those with a > > need for it can certainly enable it and build a kernel. > > It's not that simple, using a custom kernel means you ca

Re: disable PPP_BSDCOMP by default

2021-03-25 Thread Stuart Henderson
On 2021/03/25 20:53, Balder Oddson wrote: > On Thu, Mar 25, 2021 at 07:09:37PM +0100, Balder Oddson wrote: > > Compression in PPP was great in the age of ISDN to increase speeds. > > The more common use cases, and trends concerning TLS1.3 advancements. > > > > Having this enabled by default, and i

Re: Permit reading kern.somaxconn with unix pledge

2021-03-25 Thread Aaron Bieber
Theo de Raadt writes: > I have reviewed all the pledge using programs in the tree, and I do not > see additional risk from this change. > > Who wants to take care of the commit? I'll snag it! > > Josh Rickmar wrote: > >> The kern.somaxconn sysctl was previously permitted under the inet >> ple

Re: Permit reading kern.somaxconn with unix pledge

2021-03-25 Thread Theo de Raadt
I have reviewed all the pledge using programs in the tree, and I do not see additional risk from this change. Who wants to take care of the commit? Josh Rickmar wrote: > The kern.somaxconn sysctl was previously permitted under the inet > pledge, which allowed pledged Go applications to listen o

Re: vmd(8) support for gzipped kernels

2021-03-25 Thread Dave Voutila
Josh Rickmar writes: > On Fri, Mar 19, 2021 at 10:29:10AM -0400, Josh Rickmar wrote: >> Here's an updated version of the patch I had originally posted to >> bugs@ adding support for reading gzipped kernels (needed to boot amd64 >> bsd.rd without manually decompressing first), now that the suppor

Re: vmd(8): fix packet handling for dhcpleased(8)

2021-03-25 Thread Dave Voutila
Florian Obser writes: > This might not be a problem in practice. Agreed specifically on the renewal issue. The subtle 1 line change to process all packets in the tx ring is a different issue that so far nobody has reported observing. > > vmd(8) hands us a lease with "infinity" lease time. Thi

Re: vmctl: off-by-one error handling mixing -a with a VM id

2021-03-25 Thread Preben Guldberg
Theo Buehler wrote: > However, I think the current logic is both wrong and the wrong way > around. I believe the following is much clearer. It doesn't have a dead > else branch and it deletes 'ret', so it doesn't use it uninitialized when > checking 'res->action == CMD_STOPALL && ret != -1' (e.g.

Re: Permit reading kern.somaxconn with unix pledge

2021-03-25 Thread Josh Rickmar
On Mon, Feb 01, 2021 at 08:18:53PM +, Josh Rickmar wrote: > The kern.somaxconn sysctl was previously permitted under the inet > pledge, which allowed pledged Go applications to listen on AF_INET and > AF_INET6 domains. > > https://marc.info/?l=openbsd-tech&m=158069595809463&w=2 > https://marc.

Re: apmd: log ioctl failures

2021-03-25 Thread Sebastian Benoit
Klemens Nanni(k...@openbsd.org) on 2021.03.25 19:45:04 +0100: > On Sat, Mar 20, 2021 at 07:46:38PM +0100, Klemens Nanni wrote: > > Otherwise there is no way other than reading driver code to determine > > why running zzz(8) for example does not do anything on certain machines. > > > > apm(4/arm64)

Re: vmctl: off-by-one error handling mixing -a with a VM id

2021-03-25 Thread Theo Buehler
On Thu, Mar 25, 2021 at 08:07:53PM +0100, Preben Guldberg wrote: > Dave Voutila wrote: > > Preben Guldberg writes: > > > The patch below addresses an off-by-one error reading argv when > > > generating the error message. > > > > I personally find it clearer if the condition of mixing -a with an id

Re: disable PPP_BSDCOMP by default

2021-03-25 Thread Balder Oddson
On Thu, Mar 25, 2021 at 07:09:37PM +0100, Balder Oddson wrote: > Compression in PPP was great in the age of ISDN to increase speeds. > The more common use cases, and trends concerning TLS1.3 advancements. > > Having this enabled by default, and infrequently used could lead to > unintended conseque

mg list-buffers

2021-03-25 Thread Mark Lumsden
This is the current format of the output of the mg 'list-buffer' command: MR Buffer Size File -- -- *Buffer List* 0 .** file1.c 6810 /tmp/file1.c file2.c

Re: apm, apmd: ship manual pages on powerpc64

2021-03-25 Thread Klemens Nanni
On Sun, Mar 21, 2021 at 01:24:49PM +0100, Klemens Nanni wrote: > On Sun, Mar 21, 2021 at 06:50:23AM +, Jason McIntyre wrote: > > On Sat, Mar 20, 2021 at 07:29:11PM -0600, Theo de Raadt wrote: > > > There is a pattern we've followed in the past, that when a manpage applies > > > to more than 2 (

Re: vmctl: off-by-one error handling mixing -a with a VM id

2021-03-25 Thread Preben Guldberg
Dave Voutila wrote: > Preben Guldberg writes: > > The patch below addresses an off-by-one error reading argv when > > generating the error message. > > I personally find it clearer if the condition of mixing -a with an id > > is highlighted. I included a suggestion in the patch below. > Since -a

Re: vmctl: off-by-one error handling mixing -a with a VM id

2021-03-25 Thread Dave Voutila
Preben Guldberg writes: > Thanks to Dave, Theo and Klemens for accepting my previous patch > > In other tests, I noticed the following error: > > % vmctl stop -a testvm > vmctl: invalid id: (null) > > The patch below addresses an off-by-one error reading argv when > generating the error

Re: disable PPP_BSDCOMP by default

2021-03-25 Thread Theo de Raadt
No way for this diff. This is the wrong way. Surely there are ways to disable compression negotion on specific sessions, but removing the code from the kernel is the wrong knob. Balder Oddson wrote: > Compression in PPP was great in the age of ISDN to increase speeds. > The more common use cas

Re: apmd: log ioctl failures

2021-03-25 Thread Klemens Nanni
On Sat, Mar 20, 2021 at 07:46:38PM +0100, Klemens Nanni wrote: > Otherwise there is no way other than reading driver code to determine > why running zzz(8) for example does not do anything on certain machines. > > apm(4/arm64) for one currently does not implement suspend and resume, > i.e. it yiel

Re: monotonic time going back by wrong skews

2021-03-25 Thread Mark Kettenis
> From: Scott Cheloha > Date: Thu, 25 Mar 2021 13:18:04 -0500 > > > On Mar 24, 2021, at 8:29 AM, Josh Rickmar wrote: > > > > On Wed, Mar 24, 2021 at 05:40:21PM +0900, YASUOKA Masahiko wrote: > >> Hi, > >> > >> I hit a problem which is caused by going back of monotonic time. It > >> happens on

Re: monotonic time going back by wrong skews

2021-03-25 Thread Josh Rickmar
On Thu, Mar 25, 2021 at 01:18:04PM -0500, Scott Cheloha wrote: > > On Mar 24, 2021, at 8:29 AM, Josh Rickmar wrote: > > > > On Wed, Mar 24, 2021 at 05:40:21PM +0900, YASUOKA Masahiko wrote: > >> Hi, > >> > >> I hit a problem which is caused by going back of monotonic time. It > >> happens on ho

Re: monotonic time going back by wrong skews

2021-03-25 Thread Scott Cheloha
> On Mar 24, 2021, at 8:29 AM, Josh Rickmar wrote: > > On Wed, Mar 24, 2021 at 05:40:21PM +0900, YASUOKA Masahiko wrote: >> Hi, >> >> I hit a problem which is caused by going back of monotonic time. It >> happens on hosts on VMware ESXi. >> >> I wrote the program which repeats the problem. >>

disable PPP_BSDCOMP by default

2021-03-25 Thread Balder Oddson
Compression in PPP was great in the age of ISDN to increase speeds. The more common use cases, and trends concerning TLS1.3 advancements. Having this enabled by default, and infrequently used could lead to unintended consequences around how the data is passed around. Index: GENERIC =

smtpd: set protocols and ciphers

2021-03-25 Thread Eric Faurot
Hi. This diff allows to specify the protocol versions and ciphers to use for outgoing TLS sessions on a per relay basis. Eric. Index: mta.c === RCS file: /cvs/src/usr.sbin/smtpd/mta.c,v retrieving revision 1.235 diff -u -p -r1.235 m

vmctl: off-by-one error handling mixing -a with a VM id

2021-03-25 Thread Preben Guldberg
Thanks to Dave, Theo and Klemens for accepting my previous patch In other tests, I noticed the following error: % vmctl stop -a testvm vmctl: invalid id: (null) The patch below addresses an off-by-one error reading argv when generating the error message. I personally find it clearer if

Re: vmd(8): fix packet handling for dhcpleased(8)

2021-03-25 Thread Florian Obser
This might not be a problem in practice. vmd(8) hands us a lease with "infinity" lease time. This is expresed as UINT32_MAX, i.e. 2^32-1. dhcpleased(8) does not handle infinity explicitly, it's just a very long lease time (136 years). When we configure the lease we enter the BOUND state. After 0.

Re: [External] : [ICMP] IP options lead to malformed reply

2021-03-25 Thread Alexandr Nedvedicky
Hello, > > 1) ip_insertoptions() does not update length of IP header (ip_hl) > > > > 2) ip_hl is being overridden anyway later in ip_output() called > > by ip_send_dispatch() to send ICMP error packet out. Looks > > like ip_send_dispatch() should use IP_RAWOUTPUT fla

ieee80211_recv_auth: fix wrong seqnum wrap

2021-03-25 Thread Stefan Sperling
IEEE 802.11 sequence numbers wrap around at 0xfff, not 0x. ok? diff 567a54141cb7379326a3670b319b26530610e1e8 /usr/src blob - a44e88e5d0e94101a1966fc95d2daceba78c7246 file + sys/net80211/ieee80211_input.c --- sys/net80211/ieee80211_input.c +++ sys/net80211/ieee80211_input.c @@ -2056,7 +2056,7

Re: rpki-client http client adjustments

2021-03-25 Thread Theo Buehler
On Thu, Mar 25, 2021 at 10:46:18AM +0100, Claudio Jeker wrote: > This diff is mostly cleanup and adding the missing bits needed for RRDP. > Instead of a simple bool ok use an enum to report the state back. > Can be fail, ok or not-modified (the last is used for 304 Not Modified > answers (if a If-

Possible negative index on ieee80211_ra.c

2021-03-25 Thread Ricardo Mestre
Hi, As the comment already explains `mcs' may come invalid from the the hardware and then code uses it as index before actually checking its value. The patch below adjusts it so that it's only used after the check. Reported on CID 1502921. Only compile tested. Comments, OK? Index: ieee80211_ra.

Re: Possible negative index on ieee80211_ra.c

2021-03-25 Thread Stefan Sperling
On Thu, Mar 25, 2021 at 11:48:22AM +, Ricardo Mestre wrote: > Hi, > > As the comment already explains `mcs' may come invalid from the the hardware > and then code uses it as index before actually checking its value. The patch > below adjusts it so that it's only used after the check. > > Repo

Re: sdmmc(4) off-by-one on boundary check

2021-03-25 Thread Marcus Glocker
On Wed, Mar 24, 2021 at 09:23:22PM +0100, Mark Kettenis wrote: > > Date: Wed, 24 Mar 2021 20:58:48 +0100 > > From: Marcus Glocker > > > > On Tue, Mar 23, 2021 at 09:52:42AM -0600, Theo de Raadt wrote: > > > > > Mark Kettenis wrote: > > > > > > > > > Index: sys/dev/sdmmc/sdmmc_scsi.c > > > > >

rpki-client http client adjustments

2021-03-25 Thread Claudio Jeker
This diff is mostly cleanup and adding the missing bits needed for RRDP. Instead of a simple bool ok use an enum to report the state back. Can be fail, ok or not-modified (the last is used for 304 Not Modified answers (if a If-Modified-Since header was passed in the request). Additionally add 308

rge(4): move tx/rx descriptors into their own structs

2021-03-25 Thread Kevin Lo
Hi, The diff below moves tx/rx descriptors into their own structs. This is a first step toward making rge work with multiple queues and interrupts. Only one queue is currently used. While here, update the RTL8125B microcode. Index: sys/dev/pci/if_rge.c ===

Re: rpki-client adjust base64_decode

2021-03-25 Thread Theo Buehler
On Thu, Mar 25, 2021 at 09:57:51AM +0100, Claudio Jeker wrote: > RRDP has a lot of base64 strings to handle. Because of this adjust the > base64_decode function in tal.c to take a regular string as input. > For now keep the function static, will change that once RRDP is ready. > > OK? Since you t

rpki-client adjust base64_decode

2021-03-25 Thread Claudio Jeker
RRDP has a lot of base64 strings to handle. Because of this adjust the base64_decode function in tal.c to take a regular string as input. For now keep the function static, will change that once RRDP is ready. OK? -- :wq Claudio Index: tal.c ===

Re: httpd: Allow overriding global "no index"

2021-03-25 Thread Matthias Pressfreund
I've also noticed this some time ago. My suggestion was to simply permit auto-index locations inside no-index servers. https://marc.info/?l=openbsd-tech&m=160302351622195&w=2 On 2021-03-24 22:37, Quentin Rameau wrote: > Hello, > > It's been noted that the "directory no index" configuration > al

Re: [External] : [ICMP] IP options lead to malformed reply

2021-03-25 Thread Schreilechner, Dominik
> -Original Message- > From: Alexandr Nedvedicky > Sent: Mittwoch, 24. März 2021 23:09 > To: Schreilechner, Dominik (RC-AT DI FA DH-GRAZ ICO) > > Cc: tech@openbsd.org > Subject: Re: [External] : [ICMP] IP options lead to malformed reply > > Hello, > > > > > We really need to fix ip_send(