Re: rpki-client: plug leak in http_parse_header()

2022-02-09 Thread Theo Buehler
On Thu, Feb 10, 2022 at 07:51:45AM +0100, Theo Buehler wrote: > At this point conn->last_modified may or may not be allocated. > If it is, overriting it will leak 30 bytes. rrdp_input_handler() has a leak of the same kind. Index: http.c

Re: fw_update(8): lock pkg database while running

2022-02-09 Thread Marc Espie
On Wed, Feb 09, 2022 at 07:30:46PM -0800, Andrew Hewus Fresh wrote: > I was reminded that fw_update(8) updates the package database without > locking currently. That can cause issues when running it concurrently > with pkg_add, for example starting `pkg_add -u` in one terminal and > `sysupgrade`

rpki-client: plug leak in http_parse_header()

2022-02-09 Thread Theo Buehler
At this point conn->last_modified may or may not be allocated. If it is, overriting it will leak 30 bytes. Index: http.c === RCS file: /cvs/src/usr.sbin/rpki-client/http.c,v retrieving revision 1.52 diff -u -p -r1.52 http.c ---

fw_update(8): lock pkg database while running

2022-02-09 Thread Andrew Hewus Fresh
I was reminded that fw_update(8) updates the package database without locking currently. That can cause issues when running it concurrently with pkg_add, for example starting `pkg_add -u` in one terminal and `sysupgrade` in another. This diff checks to see if perl is available and if so starts a

Re: rpki-client: check crl validity times

2022-02-09 Thread Claudio Jeker
On Wed, Feb 09, 2022 at 02:59:41PM +0100, Theo Buehler wrote: > We should not use CRLs if now isn't between thisUpdate and nextUpdate. > This also ensures that thisUpdate <= nextUpdate. While the verifier will > catch all this, doing this early will often remove one of the two > possible choices

Re: explicit_bzero vs ASAN on linux

2022-02-09 Thread Todd C . Miller
On Wed, 09 Feb 2022 11:35:58 +0100, Theo Buehler wrote: > On clang we can use __has_feature(), but that doesn't exist on > gcc which defines __SANITIZE_ADDRESS__ if it compiles with > -fsanitize=address. > > This doesn't warn on sparc64 and works in my test setups. It's a little ugly but since

Re: look(1): drop "rpath" promise after open(2)/fstat(2)

2022-02-09 Thread Todd C . Miller
On Tue, 08 Feb 2022 19:37:26 -0600, Scott Cheloha wrote: > - pledge(2) initially with "stdio rpath" at the top of main(). > We know we need to read a file at this point but don't yet > know which one. > > - pledge(2) down to "stdio" after we have opened the file > in question and called

Re: add Surface GO3 hid to acpibat(4)

2022-02-09 Thread Mark Kettenis
> From: Dave Voutila > Date: Wed, 09 Feb 2022 10:28:48 -0500 > > I believe I got this from mlarkin@. Realized I've been carrying it in my > local tree. > > Microsoft decided to do all sorts of atypical things with the Go3 in > ACPI. One is the battery. > > ok? Funny how even Microsoft manages

add Surface GO3 hid to acpibat(4)

2022-02-09 Thread Dave Voutila
I believe I got this from mlarkin@. Realized I've been carrying it in my local tree. Microsoft decided to do all sorts of atypical things with the Go3 in ACPI. One is the battery. ok? -dv diff 555fd15dcf830b9fb7a50490d9996f605a238ab5 12b5e3cfa4623c60f84e61950df48b71cf2d8ef0 blob -

Re: Embed klist head in acpi_softc

2022-02-09 Thread Mark Kettenis
> Date: Wed, 9 Feb 2022 15:24:19 + > From: Visa Hankala > > This embeds klist head in struct acpi_softc so that explicit malloc is > not needed. The head is initialized as part of acpi_softc allocation. > > OK? ok kettenis@ > Index: dev/acpi/acpi.c >

Embed klist head in acpi_softc

2022-02-09 Thread Visa Hankala
This embeds klist head in struct acpi_softc so that explicit malloc is not needed. The head is initialized as part of acpi_softc allocation. OK? Index: dev/acpi/acpi.c === RCS file: src/sys/dev/acpi/acpi.c,v retrieving revision

rpki-client: check crl validity times

2022-02-09 Thread Theo Buehler
We should not use CRLs if now isn't between thisUpdate and nextUpdate. This also ensures that thisUpdate <= nextUpdate. While the verifier will catch all this, doing this early will often remove one of the two possible choices of a CRL to use for a MFT since these are typically short-lived. While

Re: hardware checksum ix and ixl

2022-02-09 Thread David Gwynne
On Wed, Jan 26, 2022 at 01:29:42AM +0100, Alexander Bluhm wrote: > Hi, > > There were some problems with ix(4) and ixl(4) hardware checksumming > for the output path on strict alignment architectures. > > I have merged jan@'s diffs and added some sanity checks and > workarounds. > > - If the

Re: explicit_bzero vs ASAN on linux

2022-02-09 Thread Theo Buehler
On Wed, Feb 09, 2022 at 08:45:09PM +1100, Jonathan Gray wrote: > On Wed, Feb 09, 2022 at 09:09:35AM +0100, Theo Buehler wrote: > > In libressl-portable we run the explicit_bzero tests as part of the > > builds. If we enable ASAN on linux, this test segfaults in > > __interceptor_memmem() in the

Re: explicit_bzero vs ASAN on linux

2022-02-09 Thread Jonathan Gray
On Wed, Feb 09, 2022 at 09:09:35AM +0100, Theo Buehler wrote: > In libressl-portable we run the explicit_bzero tests as part of the > builds. If we enable ASAN on linux, this test segfaults in > __interceptor_memmem() in the two test_with{,out}_bzero() functions, > presumably because the

Re: wskbd_set_mixervolume

2022-02-09 Thread Alexandre Ratchov
On Tue, Feb 08, 2022 at 06:59:39PM +0100, Anton Lindqvist wrote: > On Tue, Feb 08, 2022 at 07:32:38AM +0100, Alexandre Ratchov wrote: > > On Mon, Feb 07, 2022 at 06:55:21PM +0100, Anton Lindqvist wrote: > > > On Mon, Feb 07, 2022 at 11:21:43AM +0100, Alexandre Ratchov wrote: > > > > On Sun, Feb

explicit_bzero vs ASAN on linux

2022-02-09 Thread Theo Buehler
In libressl-portable we run the explicit_bzero tests as part of the builds. If we enable ASAN on linux, this test segfaults in __interceptor_memmem() in the two test_with{,out}_bzero() functions, presumably because the sigaltstack magic is too low level for ASAN to grok. Would the patch below