Re: less strlen in bgpctl

2014-11-17 Thread Tobias Stoeckmann
On Sun, Nov 16, 2014 at 06:38:24PM -0500, Ted Unangst wrote: Not sure how I ended up reading this file, but all the redundant strlen calls make me twitchy. I agree, but have you considered the other parser.c files with match_token and same use of strlen(word), too?

ospf6ctl: memleak in parser

2014-11-17 Thread Tobias Stoeckmann
Hi, after using the temporary buffer ps for parse_addr, it is not released after successful operation. Tobias Index: parser.c === RCS file: /cvs/src/usr.sbin/ospf6ctl/parser.c,v retrieving revision 1.12 diff -u -p -r1.12 parser.c

patch: always validate hunk size

2014-11-17 Thread Tobias Stoeckmann
Hi, the hunk size is basically limitated to MAXHUNKSIZE, although the implementation consideres it as a soft limit: it's possible to get one step above this limit. It's set to 100,000 but hunkmax can be legally set to 128,000... This diff unifies the grow check and avoids calling realloc()

patch: properly check NULL return values

2014-11-17 Thread Tobias Stoeckmann
Hi, savestr is a function very similar to strdup. If it runs into an out of memory condition, its behavior depends on the current status of the program. If patch is in plan a mode, it will set an out_of_memory flag, returns NULL and patch will try later on with plan b again. If it is in plan b,

relayd errata Nov 17

2014-11-17 Thread Florian Obser
This patch fixes a relayd crash for the 5.6 release. untrusted comment: signature from openbsd 5.6 base private key RWR0EANmo9nqhgFKMGabOlUXoxAuey9xQyKcm0OULFMOSkyd3ReQHQjwA1psSBbqu1ex9j28D/nyEh6U8uj8f2oFZtXoHA7njAg= OpenBSD 5.6 errata 6, Nov 17, 2014: Fix for relayd crash Apply patch using:

Re: remvoe some copystr

2014-11-17 Thread Mark Kettenis
Date: Sun, 16 Nov 2014 19:10:41 -0500 From: Ted Unangst t...@tedunangst.com The historic copystr API is like copyinstr/copyoutstr but only for kernel strings. A much more familiar API is strlcpy. This converts three examples in kern. One where the return value is unchecked. One where

Re: LibreSSL: GOST ciphers implementation

2014-11-17 Thread Miod Vallat
So I've finally sit down and tested interoperability of LibreSSL with the various gost-enabled sites you've listed, starting with simple things such as: openssl s_client -debug -connect zakupki.gov.ru:443 Unfortunately, this fails because of the failure checks I've added to the GOST code

pfctl errata Nov 17

2014-11-17 Thread Stuart Henderson
Patches are now available for 5.5 and 5.6 to fix an issue with pfctl and certain rules combining IPv4 and IPv6 addresses (in that order) with a dynamic interface address using the (interface) format. The patch for 5.6 follows. This problem can be worked around by reversing the order of addresses

gethostbyname errata

2014-11-17 Thread Ted Unangst
Due to a bug in the libc asr resolver, querying an invalid hostname can cause a crash. Patches are available for 5.5 and 5.6. untrusted comment: signature from openbsd 5.6 base private key RWR0EANmo9nqhl31oIXbJYtUWXNHHNzHGhJ+v2XZAAlwH5TwYDkTp2NHqjhnrJayp37glapQejDsm/LDGm1M5bnpkmHh7FGNGQ4=

Re: LibreSSL: GOST ciphers implementation

2014-11-17 Thread Dmitry Eremin-Solenikov
2014-11-17 22:28 GMT+03:00 Miod Vallat m...@online.fr: So I've finally sit down and tested interoperability of LibreSSL with the various gost-enabled sites you've listed, starting with simple things such as: openssl s_client -debug -connect zakupki.gov.ru:443 Unfortunately, this fails

uslcom(4): fix for CP2110 USB HID-UART misdetection

2014-11-17 Thread SASANO Takayoshi
Hi all, I bought Silicon Labs CP2110-EK USB HID-to-UART evaluation kit and connected to OpenBSD box. uslcom(4) tries to use CP2110, but the device is different from CP210x series. How about to fix usbdevs and uslcom.c like this? Index: usbdevs

Re: LibreSSL: GOST ciphers implementation

2014-11-17 Thread Miod Vallat
Is the offending patch in CVS? If so I'll take a look as it hits the LibreSSL mirror at GitHub. Yes, it's in HEAD.

Re: LibreSSL: GOST ciphers implementation

2014-11-17 Thread Dmitry Eremin-Solenikov
2014-11-17 23:35 GMT+03:00 Miod Vallat m...@online.fr: Is the offending patch in CVS? If so I'll take a look as it hits the LibreSSL mirror at GitHub. Yes, it's in HEAD. I found the issue. In param_copy_gost01() change int ret = 0; to int ret = 1; If there is no private key set in eto,

Re: remvoe some copystr

2014-11-17 Thread Ted Unangst
On Mon, Nov 17, 2014 at 20:01, Mark Kettenis wrote: Date: Sun, 16 Nov 2014 19:10:41 -0500 From: Ted Unangst t...@tedunangst.com The historic copystr API is like copyinstr/copyoutstr but only for kernel strings. A much more familiar API is strlcpy. This converts three examples in kern. One

Re: less strlen in bgpctl

2014-11-17 Thread Ted Unangst
On Mon, Nov 17, 2014 at 11:24, Tobias Stoeckmann wrote: On Sun, Nov 16, 2014 at 06:38:24PM -0500, Ted Unangst wrote: Not sure how I ended up reading this file, but all the redundant strlen calls make me twitchy. I agree, but have you considered the other parser.c files with match_token and

siphash for inode caches, or when you have a hammer everything looks like a nail

2014-11-17 Thread David Gwynne
this cuts all the hashes in the filesystems over to using siphash to get keys into their hashes. i have compiled all of them, and will start on testing them as much as i can. so far i have done softdep and started on the nfs srv cache. id like help and review though. Index:

Re: siphash for inode caches, or when you have a hammer everything looks like a nail

2014-11-17 Thread Ted Unangst
On Tue, Nov 18, 2014 at 11:06, David Gwynne wrote: +#include dev/rndvar.h Sorry to interrupt :), but I think it's become clear that rndvar.h is the wrong header for arc4random() to live in. The diff below moves it to systm.h and fixes the two files that didn't compile. Index: dev/rndvar.h

Re: siphash for inode caches, or when you have a hammer everything looks like a nail

2014-11-17 Thread David Gwynne
On 18 Nov 2014, at 11:39, Ted Unangst t...@tedunangst.com wrote: On Tue, Nov 18, 2014 at 11:06, David Gwynne wrote: +#include dev/rndvar.h Sorry to interrupt :), but I think it's become clear that rndvar.h is the wrong header for arc4random() to live in. agreed. The diff below moves

Re: siphash for inode caches, or when you have a hammer everything looks like a nail

2014-11-17 Thread David Gwynne
On Tue, Nov 18, 2014 at 11:46:56AM +1000, David Gwynne wrote: On 18 Nov 2014, at 11:39, Ted Unangst t...@tedunangst.com wrote: On Tue, Nov 18, 2014 at 11:06, David Gwynne wrote: +#include dev/rndvar.h Sorry to interrupt :), but I think it's become clear that rndvar.h is the

Re: LibreSSL: GOST ciphers implementation

2014-11-17 Thread Miod Vallat
I found the issue. In param_copy_gost01() change int ret = 0; to int ret = 1; If there is no private key set in eto, param_copy_gost01() will skip all ret assignments and happily return 0 (= error). Doh, of course! Sorry for introducing this bug. Miod