Re: libfido2 update

2022-08-28 Thread Damien Miller
On Sun, 28 Aug 2022, Stuart Henderson wrote: > On 2022/08/24 17:09, Damien Miller wrote: > > Hi, > > > > https://www.mindrot.org/misc/libfido2-1.11.0.diff contains an update > > for src/libfido2 from 1.8 to 1.11 (about 10 months of upstream > > development). >

Re: libfido2 update

2022-08-24 Thread Damien Miller
On Wed, 24 Aug 2022, Damien Miller wrote: > Hi, > > https://www.mindrot.org/misc/libfido2-1.11.0.diff contains an update > for src/libfido2 from 1.8 to 1.11 (about 10 months of upstream > development). > > I've tested it with OpenSSH, which is the only thing in src/ t

libfido2 update

2022-08-24 Thread Damien Miller
Hi, https://www.mindrot.org/misc/libfido2-1.11.0.diff contains an update for src/libfido2 from 1.8 to 1.11 (about 10 months of upstream development). I've tested it with OpenSSH, which is the only thing in src/ that uses it as well as compiling www/chromium and performing a FIDO login with it.

Re: ksh: PROMPT_COMMAND

2022-08-03 Thread Damien Miller
On Thu, 4 Aug 2022, Christian Weisgerber wrote: > Damien Miller: > > > bash has a PROMPT_COMMAND that allows a command to be executed before > > each PS1 prompt is displayed. I've found this useful on occasion, so > > this is the same thing for ksh(1). > > PS1 is

ksh: PROMPT_COMMAND

2022-08-02 Thread Damien Miller
Hi, bash has a PROMPT_COMMAND that allows a command to be executed before each PS1 prompt is displayed. I've found this useful on occasion, so this is the same thing for ksh(1). In particular, this allows PROMPT_COMMAND to be set to a user-defined shell function that can modify PS1, though it

Re: randomise arc4random() rekey interval

2022-07-30 Thread Damien Miller
On Fri, 29 Jul 2022, Theo de Raadt wrote: > The question is what _rs_random_u32() will do when it calls > _rs_stir_if_needed(). > > There is one potential problem. lib/libcrypto/arc4random/*.h contains > portable wrappers for _rs_forkdetect(), which actually do things. > memset(rs, 0,

Re: randomise arc4random() rekey interval

2022-07-27 Thread Damien Miller
On Thu, 28 Jul 2022, Damien Miller wrote: > On Wed, 27 Jul 2022, Theo de Raadt wrote: > > > + rs->rs_count += rekey_fuzz & (REKEY_BASE - 1); > > > > I mean, why not use % here > > Sure, that's reasonable.

Re: randomise arc4random() rekey interval

2022-07-27 Thread Damien Miller
On Wed, 27 Jul 2022, Theo de Raadt wrote: > + rs->rs_count += rekey_fuzz & (REKEY_BASE - 1); > > I mean, why not use % here Sure, that's reasonable. > And then, set the default to a pow2. > > But if someone changes it to not pow2, it still works. > > The & is premature

Re: randomise arc4random() rekey interval

2022-07-27 Thread Damien Miller
On Wed, 27 Jul 2022, Theo de Raadt wrote: > I love it. > > > +#define REKEY_BASE (1<<20) /* NB. *must* be a power of 2 */ > > Why insist on that? Because I need to do this later: + rs->rs_count += rekey_fuzz & (REKEY_BASE - 1); because we can't use arc4random_uniform() in this context.

randomise arc4random() rekey interval

2022-07-27 Thread Damien Miller
Hi, arc4random() rekeys currently rekeys from the kernel every 1.6MB. It costs us almost nothing to make this interval non-deterministic, so let's do that. With the below it will rekey randomly somewhere between 1MB and 2MB. ok? Index: crypt/arc4random.c

Re: vsw.4: mention veb next to bridge

2022-07-20 Thread Damien Miller
On Wed, 20 Jul 2022, Chris Cappuccio wrote: > Klemens Nanni [k...@openbsd.org] wrote: > > veb(4) works just fine in this setup, so don't give the impression only > > bridge(4) would work. > > In related items, is it time to tedu bridge(4) and vether(4) ? Is there > anything veb(4) and vport(4)

Re: Picky, but much more efficient arc4random_uniform!

2022-05-18 Thread Damien Miller
On Wed, 18 May 2022, Otto Moerbeek wrote: > instrumenting the code to count the number of arc4random calls I see thsi: > > openbsd; elapsed = 2.835819; calls = 12340949 > bitmask; elapsed = 4.335576; calls = 17836216 > bitmask+reuse; elapsed = 3.710277; calls = 15245337 > > (this is a different

Re: Picky, but much more efficient arc4random_uniform!

2022-05-17 Thread Damien Miller
On Tue, 17 May 2022, Raimo Niskanen wrote: > Why reinvent the wheel? > > Here is a pretty good walkthrough of established methods: > > https://www.pcg-random.org/posts/bounded-rands.html > > It sounds to me as if your suggested methor essentially is > "Bitmask with Rejection -- Apple's

Re: Picky, but much more efficient arc4random_uniform!

2022-05-16 Thread Damien Miller
On Mon, 16 May 2022, Luke Small wrote: > Yeah, I see your point. > > I suppose it depends on how conservative you want to be and whether > you want to supply options to people like getchar_unlocked when it > isn’t essential. > > It could be made manually fork-safe if I could make a simple feature

Re: Picky, but much more efficient arc4random_uniform!

2022-05-15 Thread Damien Miller
On Sat, 14 May 2022, Luke Small wrote: > Look at my code. I don’t even use a modulus operator. I perform hit and > miss with a random bitstream. > > How can I have a bias of something I don’t do? I return a bitstream which > meets the parameters of being a value less than the upper bound. Much

Re: Picky, but much more efficient arc4random_uniform!

2022-05-15 Thread Damien Miller
On Sun, 15 May 2022, Luke Small wrote: > Do I really have to use specific terminology to make a point? > > I'm not educated enough on chacha20 enough to know whether, like I > pointed out, whether choosing 5 bits from the middle of (or even from > the tail end of one and the beginning of another)

Re: Reserved address behavior (alternate broadcast and 240/4)

2022-05-04 Thread Damien Miller
On Wed, 4 May 2022, Seth David Schoen wrote: [snip] > Anyway, one thing we would like to propose that OpenBSD update is the > in_canforward treatment of 240/4 (former class E) addresses. Apparently > mainly as a result of proposals in 2008 to make these addresses more > usable, most OSes now no

Re: ssh: sshkey.c: reduce code duplication

2022-05-04 Thread Damien Miller
On Wed, 4 May 2022, Martin Vahlensieck wrote: > Hi > > I noticed that sshkey_unshield_private contains a exact duplicate > of the code in private2_check_padding. So by pulling > private2_check_padding up, the code can be reused. Or is there > a reason for this split? Thanks - this has been

Re: ssh: channels.c: Fix comment and add a const

2022-05-04 Thread Damien Miller
applied On Wed, 4 May 2022, Martin Vahlensieck wrote: > Hi > > channel_new no longer frees remote_name. So update the comment > accordingly. As remote_name is not modified, it can be const > as well. > > Best, > > Martin > > Index: channels.c >

Re: ssh: mux.c: mark argument as const

2022-05-04 Thread Damien Miller
applied - thanks On Wed, 4 May 2022, Martin Vahlensieck wrote: > Index: mux.c > === > RCS file: /home/reposync/cvs/src/usr.bin/ssh/mux.c,v > retrieving revision 1.92 > diff -u -p -r1.92 mux.c > --- mux.c 11 Jan 2022 01:26:47

Re: Security support status of xnf(4) and xbf(4)

2022-03-27 Thread Damien Miller
On Fri, 25 Mar 2022, Demi Marie Obenour wrote: > Linux’s netfront and blkfront drivers recently had a security > vulnerability (XSA-396) that allowed a malicious backend to potentially > compromise them. In follow-up audits, I found that OpenBSD’s xnf(4) > currently trusts the backend domain. I

Re: Mention Smart Battery Data Spec in smbus.h

2022-03-05 Thread Damien Miller
without commenting on the substance of this change, it should definitely not be added to the copyright block On Fri, 4 Mar 2022, patrick keshishian wrote: > Hello, > > I took a wrong turn, and got interested in where the SMBATT_CMD_* > defines were sourced. > > Adding a reference to Smart

Re: ssh/sshd change in snaps

2021-11-16 Thread Damien Miller
On Wed, 17 Nov 2021, Damien Miller wrote: > On Tue, 16 Nov 2021, Damien Miller wrote: > > > Another couple of fixes in tomorrow's snaps. One to avoid errors like: > > > > > channel 3: chan_read_failed for istate 3 > > > > Another avoids a situation wher

Re: ssh/sshd change in snaps

2021-11-16 Thread Damien Miller
On Tue, 16 Nov 2021, Damien Miller wrote: > Another couple of fixes in tomorrow's snaps. One to avoid errors like: > > > channel 3: chan_read_failed for istate 3 > > Another avoids a situation where sshd could get stuck spinning on poll() > if it fails. > > (Bot

Re: ssh/sshd change in snaps

2021-11-15 Thread Damien Miller
On Sat, 13 Nov 2021, Damien Miller wrote: > On Thu, 11 Nov 2021, Damien Miller wrote: > > > Hi, > > > > Snaps is now carrying a change to ssh/sshd that converts their > > mainloops from select(2) to poll/ppoll(2). This change should be > > completely trans

Re: ssh/sshd change in snaps

2021-11-12 Thread Damien Miller
On Thu, 11 Nov 2021, Damien Miller wrote: > Hi, > > Snaps is now carrying a change to ssh/sshd that converts their > mainloops from select(2) to poll/ppoll(2). This change should be > completely transparent, but please be on the lookout for any weird > behaviour. Bugs in th

ssh/sshd change in snaps

2021-11-10 Thread Damien Miller
Hi, Snaps is now carrying a change to ssh/sshd that converts their mainloops from select(2) to poll/ppoll(2). This change should be completely transparent, but please be on the lookout for any weird behaviour. Bugs in the revised mainloop are most likely to appear as crashes, hangs or ssh/sshd

Re: New hw.perfpolicy behavior

2021-11-03 Thread Damien Miller
On Wed, 3 Nov 2021, Stuart Henderson wrote: > > See also https://en.wikichip.org/wiki/race-to-sleep - it's generally > > more energy efficient to run the CPU at full speed so it can finish its > > work faster and get back to a low-power state sooner > > So there's not really any point in doing

Re: New hw.perfpolicy behavior

2021-11-02 Thread Damien Miller
On Tue, 2 Nov 2021, Theo de Raadt wrote: > Paul de Weerd wrote: > > > A recent commit by Theo changed the hw.perfpolicy behavior to always > > run at full speed when AC power is on. This means that my workstation > > (and servers, once I upgrade them) now consumes significantly more > > power,

Re: OpenSSH: RSA/SHA1 disabled by default

2021-09-07 Thread Damien Miller
On Tue, 7 Sep 2021, Martijn van Duren wrote: > On Mon, 2021-08-30 at 10:08 +1000, Damien Miller wrote: > > Hi, > > > > RSA/SHA1, a.k.a the "ssh-rsa" signature type is now disabled by default > > in OpenSSH. > > > > While The SSH pr

snaps: scp uses SFTP protocol by default

2021-09-05 Thread Damien Miller
Hi, Just letting you know that the snaps rolling out now have scp defaulting to use the SFTP protocol by default. We hope to keep this change in the next release, so please report any problems you encounter either here (tech@), to bugs@ or to openssh@. One thing to be aware of: copying to/from a

OpenSSH: RSA/SHA1 disabled by default

2021-08-29 Thread Damien Miller
-- Date: Mon, 30 Aug 2021 09:53:10 From: Damien Miller To: source-chan...@cvs.openbsd.org Subject: CVS: cvs.openbsd.org: src CVSROOT:/cvs Module name:src Changes by: d...@cvs.openbsd.org2021/08/29 17:53:10 Modified files: usr.bin/ssh: myproposal.h Log

Re: ssh match.c: Remove always true condition

2021-08-19 Thread Damien Miller
On Thu, 19 Aug 2021, Martin Vahlensieck wrote: > Ping. > > On Tue, Aug 10, 2021 at 04:33:52PM +0200, Martin Vahlensieck wrote: > > Ping, diff reattached with extra context for easier review. > > > > On Wed, Jul 21, 2021 at 12:10:31PM +0200, Martin Vahlensieck wrote: > > > Hi > > > > > > After

Re: scp(1) changes in snaps

2021-08-07 Thread Damien Miller
On Fri, 6 Aug 2021, Christian Weisgerber wrote: > Damien Miller: > > > Just a head-up: snaps currently contain a set of changes[1] to > > make scp(1) use the SFTP protocol by default. > > > Please report any incompatibilities or bugs that you encounter here > >

scp(1) changes in snaps

2021-08-05 Thread Damien Miller
Hi, Just a head-up: snaps currently contain a set of changes[1] to make scp(1) use the SFTP protocol by default. This has a number of advantages, mostly relating to the improved security that comes from avoiding the use of a protocol that shambled out of the 1980s (SCP/RCP). A certain amount in

ssh/sshd configuration parsing

2021-06-08 Thread Damien Miller
Hi, I just committed some changes to ssh/sshd configuration parsing that have been in snaps for the last few days. These changes switch parsing from using a naive tokeniser to one that better follows shell-style rules for quoting and comments. This does make config parsing stricter in a number

Re: ssh: zap unused family parameter from ssh_connect_direct()

2020-10-11 Thread Damien Miller
ok djm On Sun, 11 Oct 2020, Klemens Nanni wrote: > CVS log shows that the following commit removed usage of it: > > sshconnect.c > revision 1.241 > date: 2013/10/16 02:31:46; author: djm; state: Exp; lines: +29 -45; > Implement client-side hostname canonicalisation to

Re: sync libfido2 with upstream

2020-08-20 Thread Damien Miller
On Mon, 17 Aug 2020, Damien Miller wrote: > On Mon, 10 Aug 2020, Damien Miller wrote: > > > Hi, > > > > This syncs libfido2 with the current state of upstream. It includes > > a few new APIs that I want to use in OpenSSH to improve FIDO token > > support (req

Re: sync libfido2 with upstream

2020-08-17 Thread Damien Miller
On Mon, 10 Aug 2020, Damien Miller wrote: > Hi, > > This syncs libfido2 with the current state of upstream. It includes > a few new APIs that I want to use in OpenSSH to improve FIDO token > support (require-PIN and fixing some corner-case bugs around multiple > inserte

Re: Fwd: explicit_bzero vs. alternatives

2020-08-10 Thread Damien Miller
On Mon, 10 Aug 2020, Amit Kulkarni wrote: > moving to tech@ > > -- Forwarded message - > From: Philipp Klaus Krause > Date: Mon, Aug 10, 2020 at 4:34 AM > Subject: explicit_bzero vs. alternatives > To: > > > OpenBSD has the explicit_bzero function to reliably (i.e. even if

sync libfido2 with upstream

2020-08-09 Thread Damien Miller
Hi, This syncs libfido2 with the current state of upstream. It includes a few new APIs that I want to use in OpenSSH to improve FIDO token support (require-PIN and fixing some corner-case bugs around multiple inserted tokens). ok? (major crank for ABI change) Index: Makefile

sync libcbor to 0.7.0

2020-07-29 Thread Damien Miller
Hi, This syncs lib/libcbor from our v0.5.0+patches to the released v0.7.0 AFAIK the changes are mostly inconsequential to the current uses in-tree (there is a stack exhaustion fix that is worth having), but being at an actual release rather than a frankenpatch will make future updates a bit

Re: ssh: Register tun channel cleanup callback when ExitOnForwardFailure is set

2020-02-17 Thread Damien Miller
On Mon, 17 Feb 2020, Remi Pommarel wrote: > When remote side fails to create tun (e.g. tun device is already opened) > it notifies the client with an SSH2_MSG_CHANNEL_OPEN_FAILURE message and > channel is marked dead on client side. But because tun forward channel > is not an interactive channel

Add #define for RFC8622 IPTOS_DSCP_LE codepoint

2020-01-25 Thread Damien Miller
Hi, This adds a #define for the "lower effort" DSCP code point specified by https://tools.ietf.org/html/rfc8622 People have asked to be able to use this OpenSSH for "don't care" traffic. ok? Index: sys/netinet/ip.h === RCS file:

Re: sshd proctitle [Re: CVS: cvs.openbsd.org: src]

2020-01-24 Thread Damien Miller
On Fri, 24 Jan 2020, Stuart Henderson wrote: > That works - etc/rc.d/sshd diff to match as follows: > > Index: sshd > === > RCS file: /cvs/src/etc/rc.d/sshd,v > retrieving revision 1.5 > diff -u -p -r1.5 sshd > --- sshd 22 Jan

Re: sshd proctitle [Re: CVS: cvs.openbsd.org: src]

2020-01-24 Thread Damien Miller
On Fri, 24 Jan 2020, Antoine Jacoutot wrote: > Great :-) > Ok aja committed, the proctitle looks like this now in case the rc scripts need further tweaking: $ pgrep -lf sshd 12844 sshd: /usr/sbin/sshd -f /etc/ssh/sshd_config [listener] 0 of 10-100 startups

Re: sshd proctitle [Re: CVS: cvs.openbsd.org: src]

2020-01-23 Thread Damien Miller
On Thu, 23 Jan 2020, Damien Miller wrote: > On Thu, 23 Jan 2020, Damien Miller wrote: > > > What information would you like there? We could put the first N listen > > addrs in the proctitle if that would help. > > Maybe like this: > > 63817 ?? S0:00.05

Re: sshd proctitle [Re: CVS: cvs.openbsd.org: src]

2020-01-22 Thread Damien Miller
On Thu, 23 Jan 2020, Damien Miller wrote: > On Wed, 22 Jan 2020, Stuart Henderson wrote: > > > On 2020/01/21 15:39, Damien Miller wrote: > > > CVSROOT: /cvs > > > Module name: src > > > Changes by: d...@cvs.openbsd.org2020/01/

Re: sshd proctitle [Re: CVS: cvs.openbsd.org: src]

2020-01-22 Thread Damien Miller
On Wed, 22 Jan 2020, Stuart Henderson wrote: > On 2020/01/21 15:39, Damien Miller wrote: > > CVSROOT:/cvs > > Module name:src > > Changes by: d...@cvs.openbsd.org2020/01/21 15:39:57 > > > > Modified files: > > usr.bin/ssh: s

Re: GRE datagram socket support

2020-01-21 Thread Damien Miller
On Wed, 22 Jan 2020, David Gwynne wrote: > Has anyone got an opinion on this? I am still interested in doing more > packet capture things on OpenBSD using GRE as a transport, and the idea > of maintaining this out of tree just makes me feel tired. This is cool. I don't spot any major problems

OpenSSH U2F/FIDO support in base

2019-11-14 Thread Damien Miller
Hi, I just committed all the dependencies for OpenSSH security key (U2F) support to base and tweaked OpenSSH to use them directly. This means there will be no additional configuration hoops to jump through to use U2F/FIDO2 security keys. Hardware backed keys can be generated using "ssh-keygen -t

Re: tcpdump(8) mention USB interfaces in -i

2019-11-07 Thread Damien Miller
goddamn it, I could have used this last week :/ (ok djm) On Wed, 6 Nov 2019, Stuart Henderson wrote: > Found this diff when updating an old tree, ok? > > > Index: usr.sbin/tcpdump/tcpdump.8 > === > RCS file:

Re: HID devices without numbered reports

2019-10-29 Thread Damien Miller
On Tue, 29 Oct 2019, Patrick Wildt wrote: > Ok, so it turns out that this is related with opening/closing > the uhid(4) device. Because every open(2) and close(2) also > opens and closes the pipe. I think for ehci we somehow can > save the toggle and restore it on re-open, and for xhci we >

Re: HID devices without numbered reports

2019-10-27 Thread Damien Miller
On Mon, 28 Oct 2019, Damien Miller wrote: > BTW, the token still becomes unresponsive after the first transaction, > but looking at a sniff (using an OpenViszla), it seems we're getting the > DATA0/DATA1 flipping incorrect on the wire. > > On OpenBSD, this is the last rx of

Re: HID devices without numbered reports

2019-10-27 Thread Damien Miller
On Fri, 25 Oct 2019, Patrick Wildt wrote: > > So from what I understood the Yubikey expects the transfer to happen > > on the Interrupt OUT pipe instead of doing a control transfer. Read- > > ing some code and documentation, it looks like that we should by de- > > fault send our reports on the

HID devices without numbered reports

2019-10-24 Thread Damien Miller
Hi, Some HID devices do not list any report IDs for communication, e.g. my Yubikey5: > uhidev0: iclass 3/0 > uhid0 at uhidev0: input=64, output=64, feature=0 > ugen0 at uhub0 port 2 configuration 1 "Yubico YubiKey FIDO+CCID" rev > 2.00/5.12 addr 2 on Linux, these can be talked to by sending to

Re: Potential null pointer dereference in sshkey shielding

2019-06-26 Thread Damien Miller
On Wed, 26 Jun 2019, Reynir Björnsson wrote: > Hello, > > I have noticed a potential NULL pointer dereference in the recent code > for ssh key shielding. Essentially, during error handling > explicit_bzero(enc, enclen) is called. This should be fine when enc is > NULL as long as enclen is zero.

Re: ssh-askpass(1): fix indicator size with multiple screens

2019-06-16 Thread Damien Miller
On Sun, 16 Jun 2019, Matthieu Herrb wrote: > On Sun, Jun 09, 2019 at 04:47:53PM +0200, Matthieu Herrb wrote: > > Hi, > > > > ssh-askpass(1) is trying to be clever and computes the size of its > > indicator relatively to the screen resolution. > > > > Unfortunatly, when multiple screens are

Re: register DoT in /etc/services?

2019-01-27 Thread Damien Miller
On Sun, 27 Jan 2019, Theo de Raadt wrote: > I need to add I worry for the future, the 512-1023 reserved space is > being gobbled at a rapid pace by new services, which not only decreases > the port# entropy but reduces the total number of reserved ports which > can be allocated. Fewer software

Re: qsort comparision function bug

2019-01-21 Thread Damien Miller
On Mon, 21 Jan 2019, Dariusz Sendkowski wrote: > Wouldn't it lead to undefined behavior? > According to the standard: "... The value of the result of an integer > arithmetic or conversion function cannot be represented (7.8.2.1, 7.8.2.2, > 7.8.2.3, 7.8.2.4, 7.22.6.1, 7.22.6.2, 7.22.1) ..." > This

Re: www/64.html - OpenSSH version 7.8 or 7.9?

2018-10-19 Thread Damien Miller
On Thu, 18 Oct 2018, jungle boogie wrote: > I see the release notes are alive: > https://www.openssh.com/txt/release-7.9 > > Might want to change the link on https://www.openssh.com leading to the > release, still showing 7.8. not everything updates at once, some things need to be committed

Re: close filedescriptors of children

2018-03-07 Thread Damien Miller
On Wed, 7 Mar 2018, Gerhard Roth wrote: > Below is an updated patch that includes proc.c of switchd and vmd. > It also passes the 'debug' flag to proc_init() so that it won't touch > std* in that case. FWIW sshd unconditionally clobbers stdin and stdout and will also clobber stderr if the debug

Re: ssh: don't close fds multiple times and don't close(-1)

2018-02-04 Thread Damien Miller
ok djm On Mon, 5 Feb 2018, Theo Buehler wrote: > In channel_close_fd(), the file descriptors for the socket, stdin, > stdout and stderr aren't necessarily distinct, so closing them results > in EBADF. In addition, the diff adds a couple of positivity checks to > avoid calling close(-1). > >

Re: base system multi-booting in MBR

2018-02-01 Thread Damien Miller
On Wed, 31 Jan 2018, Alexei Malinin wrote: > Hello. > > If the base system supported multi-booting in MBR would the community be > interested in it? Doesn't it already? "machine boot sd0X"

Re: use inline functions instead of __statement

2018-01-03 Thread Damien Miller
On Thu, 4 Jan 2018, David Gwynne wrote: > my theory is that __statement (a gcc extension) was used to allow > macros to evaluate their argument(s) once by assigning it to a local > variable, and then returning a value. this is difficult with normal > macros. Not understanding - doesn't this: >

Re: sshd(8) logging of client disconnect from ClientAliveInterval

2017-10-17 Thread Damien Miller
ok by me On Wed, 18 Oct 2017, Darren Tucker wrote: > On Tue, Oct 17, 2017 at 09:10:38PM +0300, Lars Noodén wrote: > > Here is a replacement patch. > > I meant reusing the existing function rather than cloning it. It's > currently static so it needs to be exported but IMO that's better than >

freezero(NULL, 0)

2017-08-23 Thread Damien Miller
Hi, memset(NULL, 0, 0) is (strictly speaking) undefined behaviour, but there's no reason that freezero(3) needs to follow suit. This mentions that freezero(NULL, 0) is valid in the manpage, so that anyone who copies this API should get it right too. ok? Index: malloc.3

Re: systemd compat for doas

2017-07-03 Thread Damien Miller
On Mon, 3 Jul 2017, Franco Fichtner wrote: > > > On 2. Jul 2017, at 8:59 PM, Ted Unangst wrote: > > > > If the username starts with a digit, but isn't a number, treat it like root. > > I question the simplicity of this patch due to the fact that it leaves > no head room

Re: [PATCH 02/04] Adjust AES testcase to the new implementation

2017-04-24 Thread Damien Miller
ok On Mon, 24 Apr 2017, Mike Belopuhov wrote: > Adjusts the regress test. > > --- > regress/sys/crypto/aes/Makefile | 2 +- > regress/sys/crypto/aes/aestest.c | 10 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git regress/sys/crypto/aes/Makefile

Re: tcpdump: decode BGP Administrative Shutdown Communication

2017-04-19 Thread Damien Miller
On Wed, 19 Apr 2017, Job Snijders wrote: > The realisation that a shutdown communication may contain \0 (since NUL is a > valid UTF-8 char) \0 isn't a valid UTF-8 character. UTF-8 sets the MSB on code points > 127: https://en.wikipedia.org/wiki/UTF-8#Description

Re: rebound quantum entanglement

2016-09-15 Thread Damien Miller
On Thu, 15 Sep 2016, Chris Cappuccio wrote: > That rebound acts like a nameserver is what prompted the idea to > hijack the resolver. But it's really a tool that takes over certain > duties from the libc resolver, so the libc resolver should be properly > configurable to hand over duties, or not.

Re: Default softraid crypto PBKDF2 rounds

2016-09-07 Thread Damien Miller
On Wed, 7 Sep 2016, Andreas Bartelt wrote: > yes, due to the larger internal state of the blowfish algorithm which is > harder to efficiently realize in dedicated hardware. However, since bcrypt's > internal state effectively is of fixed size, scrypt would be an even better > option since it

Re: Default softraid crypto PBKDF2 rounds

2016-09-07 Thread Damien Miller
On Tue, 6 Sep 2016, David Coppa wrote: > Il 6 settembre 2016 14:56:32 CEST, Filippo Valsorda ha > scritto: > >Hello, > > > >I recently had the occasion to dive into the softraid crypto code [1] > >and was quite pleased with the cleanliness of it all. However, I found >

Announce: OpenSSH 7.3 released

2016-08-01 Thread Damien Miller
h.com/report.html Security bugs should be reported directly to open...@openssh.com OpenSSH is brought to you by Markus Friedl, Niels Provos, Theo de Raadt, Kevin Steves, Damien Miller, Darren Tucker, Jason McIntyre, Tim Rice and Ben Lindstrom.

Re: [armv7] introducing tipru(4)

2016-07-06 Thread Damien Miller
On Wed, 6 Jul 2016, Ian Sutton wrote: > * tipru comes disabled by default. Attempts to enable tipru, and > following modification of the instruction/data/shared memory > spaces, are only allowed when the system's securelevel(7) is equal > or lesser than zero. When the system's

Re: [ntpd] Simultaneously listen on IPv4 and IPv6

2016-05-17 Thread Damien Miller
On Tue, 17 May 2016, Henning Brauer wrote: > > What about systems with net.inet6.ip6.v6only=0? > > Those haven't been taken into consideration by yours truly and might be > the compelling argument to have this code :) That sysctl isn't hooked up to anything, it should be removed. (compare

Re: spamd - blacklists

2016-03-15 Thread Damien Miller
On Tue, 15 Mar 2016, li...@wrant.com wrote: > What's going on with the BGP as a transport then, is it available to > the general public? Must be much better than the fubar DNS. Nackts > thing and we'd be attempting carping on tunnelled over DNS syndrome. Years ago I added the pftable keyword

OpenSSH Security Advisory: xauth command injection

2016-03-10 Thread Damien Miller
OpenSSH Security Advisory: x11fwd.adv This document may be found at: http://www.openssh.com/txt/x11fwd.adv 1. Affected configurations All versions of OpenSSH prior to 7.2p2 with X11Forwarding enabled. 2. Vulnerability Missing sanitisation of untrusted input allows an

Re: Xorg stipple

2016-03-09 Thread Damien Miller
On Wed, 9 Mar 2016, joshua stein wrote: > Is anyone seriously finding video/Xorg bugs through the default X > stipple pattern anymore? Xorg changed the default to draw a black > background a while ago (with stipple enabled using the -retro flag), > but we have this local change that reverted it

Re: utf8 hack for ls

2015-10-26 Thread Damien Miller
rather than scattering hacks in each program that needs to output utf8 to the console, how about making something for libutil that they all can use? On Sun, 25 Oct 2015, Ted Unangst wrote: > it only gets deeper and thicker... > > this decodes chars and prints ? for bytes it doesn't like, as

Re: ChachaPoly-03: Chacha20-Poly1305 AEAD construction as per RFC7634

2015-10-26 Thread Damien Miller
On Mon, 26 Oct 2015, Mike Belopuhov wrote: > OK? Will this get the nonce right on BE systems? > + /* initial counter is 1 */ > + ctx->nonce[0] = 1; > + memcpy(ctx->nonce + CHACHA20_CTR, key + CHACHA20_KEYSIZE, > + CHACHA20_SALT);

Re: [PATCH] SSH tunnels without root permissions

2015-10-06 Thread Damien Miller
On Tue, 6 Oct 2015, Ossi Herrala wrote: > ping? > > On Fri, Sep 18, 2015 at 06:46:20PM +0300, Ossi Herrala wrote: > > Hi everyone, > > > > The following patch makes it possible to build SSH layer 2 (and layer > > 3) tunnels without using root permissions when connecting. > > > > This is

Re: UTF-8 string filtering

2015-09-20 Thread Damien Miller
On Sat, 12 Sep 2015, Stefan Sperling wrote: > > On Fri, Sep 04, 2015 at 03:17:31PM +1000, Damien Miller wrote: > > Hi, > > > > For a long time OpenBSD has been careful about filtering potentially- > > hostile strings that were destined for logs or TTYs u

UTF-8 string filtering

2015-09-03 Thread Damien Miller
0x206D, 0x206D }, + { 0x206E, 0x206E }, + { 0x206F, 0x206F }, + /* C.9 Tagging characters */ + { 0xE0001, 0xE0001 }, + { 0xE0020, 0xE007F }, +}; diff --git a/utf8_stringprep.c b/utf8_stringprep.c new file mode 100644 index 000..dcbd304 --- /dev/null +++

Re: NTRU Open Source Project / Post-quantum era

2015-05-25 Thread Damien Miller
On Sat, 23 May 2015, ertetlen barmok wrote: Hello, https://github.com/NTRUOpenSourceProject When will LibreSSL have ciphers for the Post-quantum era? http://tech.slashdot.org/story/15/05/15/007248/are-we-entering-a-golden-age-of-quantum-computing-research From wikipedia: NTRU is a

Re: OpenBSD/NTRU policy mismatch [Was: NTRU Open Source Project / Post-quantum era]

2015-05-25 Thread Damien Miller
No clarification needed: NTRU is patented, with no free for all patent grant. It is a complete non-starter for OpenBSD or OpenSSH. On Tue, 26 May 2015, Douglas Ray wrote: Thanks William and Ertetlen for clarifying: On 25/05/15 10:09 PM, William Whyte wrote: Hi Ertetlen, The base

Re: OpenBSD on Kosagi Novena open-source ARM board/desktop/laptop

2015-05-11 Thread Damien Miller
On Mon, 11 May 2015, Jonathan Gray wrote: If you can get an installation completed (the imxenet is pretty flaky, possibly because of an all-0 MAC address), then you'll also need to copy bsd*.IMX.umg to the /boot partition of the sdcard under Linux (OpenBSD can't access the sdcard yet) and

OpenBSD on Kosagi Novena open-source ARM board/desktop/laptop

2015-05-10 Thread Damien Miller
Hi, Thanks to jsg@, the latest snapshot releases of OpenBSD will boot on the Novenai open-source laptop (http://www.kosagi.com/w/index.php?title=Novena_Main_Page). It's still very rough: no SMP, flaky USB and support for the eeprom (so no MAC addr on the IMX ethernet), but it gets to multi-user

Re: GSoC project: KMS driver for Cirrus Logic graphics

2015-05-10 Thread Damien Miller
On Mon, 11 May 2015, L?o Grange wrote: The goal of the project is to port the current Cirrus userland driver from X.Org to an OpenBSD KMS driver, and to document the process in order to make easier the addition of new KMS drivers for various graphics adapter. As QEMU emulates a Cirrus CLGD

Re: seccomp system call

2015-05-05 Thread Damien Miller
On Mon, 4 May 2015, Todd C. Miller wrote: On Sun, 03 May 2015 20:44:25 -, Loganaden Velvindron wrote: OpenBSD already has systrace. Last I checked, systrace doesn't work well with multi-threaded programs and was trivial to bypass. The basic design where you have a userland monitor

Re: seccomp system call

2015-05-05 Thread Damien Miller
On Mon, 4 May 2015, Theo de Raadt wrote: Personally, I think seccomp-bpf could be a superior alternative to systrace and I'd love to see an implementation. Other developers (inc. Theo) are skeptical though, but this is probably a case where the argument won't be settled without a concrete

Re: seccomp system call

2015-05-03 Thread Damien Miller
On Sun, 3 May 2015, Nicolas Bedos wrote: I am wondering if the seccomp system call [1] would be welcomed in the OpenBSD tree. I remember it was among the subjects of last year's Google Summer of Code. If there is still interest in having it implemented, I am willing to work on it: I have a

OpenSSH: ssh protocol 1 now disabled at compile time

2015-03-23 Thread Damien Miller
Hi, I just committed a change to src/usr.bin/ssh/Makefile.inc to compile- time disable SSH protocol 1. This protocol is old, unsafe and really, really shouldn't be used at all any more. If you have need of it, then you can re-enable it for yourself using the knob in Makefile.inc. If you run

Re: ksh version lies

2015-02-15 Thread Damien Miller
On Sun, 15 Feb 2015, Ted Unangst wrote: ksh (and sh) have a version string embedded in them: @(#)PD KSH v5.2.14 99/07/13.2 This is clearly a lie. We've added, removed, and fixed bugs and features since then. I first noticed the lie in the man page, then saw that it's also exported via the

Re: permuate lines in random

2014-12-22 Thread Damien Miller
On Mon, 22 Dec 2014, Ted Unangst wrote: I would like to generate a permutation of some lines. We have random, which is vageuly similar. This adds a -p option to instead permute instead of randomly select. + for (j = numlines; j 1; j--) { + size_t s = arc4random_uniform(j);

Re: improving OpenBSD's gmac.c...

2014-11-12 Thread Damien Miller
On Wed, 12 Nov 2014, Mike Belopuhov wrote: isn't this likely to make it more likely to be subject to timing attacks? then how is this different to our table based aes implementation? and it's the same C code as in openssl which also uses table based gcm implementation. Yeah, that's

Re: improving OpenBSD's gmac.c...

2014-10-09 Thread Damien Miller
On Thu, 9 Oct 2014, Christian Weisgerber wrote: John-Mark Gurney: I also have an implementation of ghash that does a 4 bit lookup table version with the table split between cache lines in p4 at:

Re: reduce the number of missed PCB cache with tcpbench -su

2014-08-29 Thread Damien Miller
On Fri, 29 Aug 2014, Daniel Jakots wrote: Hi, When running tcpbench -su, a lot of them are counted as missed PCB cache. ... + n = recvfrom(fd, ptb-dummybuf, ptb-dummybuf_len, 0, + (struct sockaddr *)ss, slen); + if (n 0 connect(fd, (const struct

Re: slightly stricter check for genentropy_urandom

2014-06-25 Thread Damien Miller
On Wed, 25 Jun 2014, Martijn van Duren wrote: Hello tech@, Here is a minor diff to do a little more strict checking on the device id for urandom. It would be a shame if someone replaced a genuine urandom with a /dev/null or some other predictable device. that's what the ioctl is for

Re: compare memcmp with 0

2014-06-19 Thread Damien Miller
On Thu, 19 Jun 2014, Ted Unangst wrote: Always explicitly compare memcmp with 0. I find this adds clarity. If you don't care which way a different comparison points, then why not use bcmp?

  1   2   >