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 achieve

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 > du

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: 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 well

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: 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?

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: 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,

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: > > https://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/opencrypto/sys/opencrypt

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,

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

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

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 into

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

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 concr

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 m

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 an

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 CL

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

2015-05-10 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 y

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: > Index: imxesdhc.c > === > RCS file: /cvs/src/sys/arch/armv7/imx/imxesdhc.c,v > retrieving revision 1.7 > diff -u -p -r1.7 imxesdhc.c > --- imxesdhc.c8 May 2015 03:38:26 - 1

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: "NT

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, > > > > T

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: [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 regress/sys/crypto

Re: OpenSSH and -current out-of-tree patched for ~C?

2022-11-30 Thread Damien Miller
On Wed, 30 Nov 2022, Theo de Raadt wrote: > >> It allows a much tighter pledge in the client, so less attack surface > >> against a bad server. > > > >So it's to prevent a malicious SSH server from exploiting a client who > >choses to use ~C to open up the ssh> prompt and create or destro

Re: clang 15 and zlib

2022-12-28 Thread Damien Miller
On Wed, 28 Dec 2022, Todd C. Miller wrote: > OK millert@ as well. There is no point in trying to fix this locally > when upstream zlib will be changing it in the near(?) future. He committed to removing the K&R function declarations when C23 is finalised: https://github.com/madler/zlib/issues

Re: libcbor v0.10.0

2022-12-29 Thread Damien Miller
On Fri, 30 Dec 2022, Theo Buehler wrote: > On Fri, Dec 30, 2022 at 10:09:16AM +1100, Damien Miller wrote: > > This updates libcbor to upstream version v.0.10.0. This version includes > > clang15 header fixes and fixes a few memory leaks. Full release notes > > are at h

Re: openssh: update ed25519 and squash into a single file

2023-01-13 Thread Damien Miller
On Fri, 13 Jan 2023, Damien Miller wrote: > Hi, > > Forewarning: this is a big, noisy diff. Also on Github at > https://github.com/djmdjm/openssh-wip/pull/18 > > This updates the ED25519 code to the latest version of SUPERCOP (20221122), > but the real motivation fo

KRL 1/4: extension mechanism

2023-01-15 Thread Damien Miller
Hi, This is the first of a few changes to krl.c and related code. This defines and implements an extension mechanism for KRLs. This takes the form of new (sub-)section types that contain named extensions. These may be flagged as "critical" which causes the KRL parser to treat them as mandatory-t

KRL 2/4: Refactor parsing and signature verification

2023-01-16 Thread Damien Miller
Hi, This is the second of the OpenSSH key revocation list (KRL) diffs. This one refactors KRL parsing, and particularly signature verification. It splits the KRL parsing logic into three phases: signature verification, key trust verification and everything else. The idea is to make this easier to

KRL 3/4: plumb in signing and verification to ssh-keygen

2023-01-16 Thread Damien Miller
Hi, This is another OpenSSH key revocation list (KRL) change: to support KRL signing and verification in ssh-keygen(1). The KRL format has supported signing of KRLs and verification of KRL signatures for a long time, but there is currently no way to generate a signed KRL or check the signature on

KRL 4/4: regression test for signing/verification

2023-01-16 Thread Damien Miller
Hi, The final OpenSSH key revocation list (KRL) diff for now :) This extends the existing krl.sh regression test to exercise signing and verification. (This depends on the last two diffs) ok? Index: krl.sh === RCS file: /cvs/src/re

Re: ssh-pkcs11.c: fix some error messages

2023-03-07 Thread Damien Miller
On Tue, 7 Mar 2023, Theo Buehler wrote: > Some error messages don't match the function calls. There's still this > one that looks weird. Not sure what it should say to be helpful: > "unexpected ec signature length" perhaps? > > if (siglen < 64 || siglen > 132 || siglen % 2) { >

Re: ssh nits

2023-03-08 Thread Damien Miller
On Thu, 9 Mar 2023, Darren Tucker wrote: > On Thu, 9 Mar 2023 at 02:09, joshua stein wrote: > > cppcheck found these, are they worth fixing? > > > > In the non-fail case, done is set to NULL and then free()d. > > free(NULL) is legal but maybe worth removing? > > ssh uses this pattern a lot, a

Re: more /dev/ugen*

2013-09-13 Thread Damien Miller
On Fri, 13 Sep 2013, Martin Pieuchot wrote: > > 16097 pcscdNAMI "/dev/ugen2.00" > > Out of curiosity, can I see the dmesg for this machine? I'd like to > know which devices attach at ugen(4).s It's a Lenovo x61t. Two devices attach to ugen before I plug anything in, the built-in fingerpri

Re: Weird loop in ftp client

2013-11-22 Thread Damien Miller
On Fri, 22 Nov 2013, Stuart Henderson wrote: > do { > wr = write(fileno(fout), buf + d, rd); > - if (wr == -1 && errno == EPIPE) > - break; > - d += wr; >

Re: Boot network for remote unlock of fde

2014-03-05 Thread Damien Miller
On Wed, 5 Mar 2014, Stuart Henderson wrote: > What are you trying to protect against? > > If somebody has physical access, they can presumably replace the > kernel/initramfs with a trojanned version ... It protects against stolen machines, but not active attacks. Our cryptoraid doesn't protect a

Re: Switch OpenBSD manuals to DocBook

2014-04-01 Thread Damien Miller
On Tue, 1 Apr 2014, Christian Weisgerber wrote: > On 2014-04-01, Theo de Raadt wrote: > > > Another approach is to extend the usage() in every program so that it > > provides more information. > > Just embed the whole man page, as in curl -M. Putting stuff in usage() is pretty retro. Modern pr

Re: polling SSL kerberos and srp support

2014-04-28 Thread Damien Miller
On Mon, 28 Apr 2014, Ted Unangst wrote: > Hi there. I'm trying to find somebody who is actually using either > Kerberos or SRP support in libssl. I'm inclined to remove support for > them. While the bulk of the code sits off to the side, the integration > requires adding several additional cases t

Re: malloc freelists

2014-04-30 Thread Damien Miller
On Thu, 1 May 2014, Ted Unangst wrote: > What's better than a freelist? Four freelists! Apart from moar = better, what's the motivation? Do you have a particular attack in mind? The only thing I can think of where this change might help is an attack that speculatively spams small offsets from the

Re: Filesystem Hierarchy Standard (FHS) and OpenBSD

2011-05-09 Thread Damien Miller
On Mon, 9 May 2011, Jeff Licquia wrote: > (Sorry if this isn't the proper list for this discussion. If not, please > point me in the right direction.) > > The Linux Foundation's LSB workgroup has taken over maintenance of the > Filesystem Hierarchy Standard, and is working on a number of updates

support port ranges for sysctl net.inet.(tcp|udp).baddynamic

2011-05-10 Thread Damien Miller
Hi, This allows the use of port ranges in sysctl. E.g net.inet.tcp.baddynamic=+6-61000,-5-51000 # or net.inet.tcp.baddynamic=1-48000 It also simplifies the parsing a little. Ok? Index: sysctl.c === RCS file: /cvs/src/sbin/

Re: Bus Pirate: bus hacking tool for hardware developers

2011-05-14 Thread Damien Miller
On Thu, 12 May 2011, Jona Joachim wrote: > Hi, > I just wanted to share this board that I discovered today: > http://dangerousprototypes.com/bus-pirate-manual/ > > It's an uftdi(4) board that gives you access to the following bus > protocols: > 1-Wire, I2C, SPI, JTAG, RS-232, MIDI, ... > http://d

Re: ssh, consistent use of fcntl(2) with F_SETFD

2011-05-15 Thread Damien Miller
applied - thanks On Sat, 14 May 2011, Aaron Stellman wrote: > Please review the diff. > Thanks > > Index: usr.bin/ssh/authfd.c > === > RCS file: /cvs/src/usr.bin/ssh/authfd.c,v > retrieving revision 1.84 > diff -p -u -r1.84 authfd.c

Re: malloc: rework MALLOC_MAXSHIFT

2011-05-17 Thread Damien Miller
On Sun, 15 May 2011, Otto Moerbeek wrote: > Hi, > > define MALLOC_MAXSHIFT and related stuff more consistently. Also, zap > region_bits, it is not used. looks ok. some questions: > - struct chunk_head chunk_dir[MALLOC_MAXSHIFT]; > + struct chunk_head chunk_dir[MALLOC_MAXSHIFT + 1]; Why

Re: sysctl.conf example for tcp.always_keepalive

2011-07-11 Thread Damien Miller
On Mon, 11 Jul 2011, Ted Unangst wrote: > On Mon, Jul 11, 2011, Stuart Henderson wrote: > > Trying to work out a good way to describe always_keepalive in > > a short enough space for a sysctl.conf comment, this is the best > > I've come up with. Can anyone do better? OK? > > I think it'd be a big

Re: Shouldn't call munmap(2) if mmap(2) failed in catopen(3)

2011-07-12 Thread Damien Miller
ok djm@ On Tue, 12 Jul 2011, Matthew Dempsky wrote: > ok? > > Index: catopen.c > === > RCS file: /home/mdempsky/anoncvs/cvs/src/lib/libc/nls/catopen.c,v > retrieving revision 1.13 > diff -U5 -p -r1.13 catopen.c > --- catopen.c 26 Ju

Re: rdate no longer syncs on boot

2011-07-18 Thread Damien Miller
On Mon, 18 Jul 2011, Daniel C. Sinclair wrote: > I often plug this laptop in to unknown stuff (or mirror/span ports or > ethernet taps) and run tcpdump so I don't want to run any daemons that > generate traffic. It's a little netbook and I use it for network > troubleshooting only - it isn't a no

Re: TOS option to tcpbench ala pf.conf

2011-08-19 Thread Damien Miller
On Thu, 18 Aug 2011, Christiano F. Haesbaert wrote: > Hi, > > I'm tinkering with ToS->CoS (802.1p) translation in vlan(4) so I > needed something to test, tcpbench seems to deserve a tos option. > > It uses the same map_option() from pfctl with some minor tweeks. > So it accepts decimal, hexad

ksh wish

2011-09-01 Thread Damien Miller
Hi, While people are excited about hacking on ksh(1) - let me add my wish: unrestricted multibyte character binding so I can have ctrl-left_arrow (^[[1;5D on my terminal) bound to backward-word and so forth. Last time I checked the code for bind could only handle a couple of characters after ^[

use OpenSSL EVP for SSH umac and CTR cipher modes

2011-09-08 Thread Damien Miller
Hi, This diff needs testing, particularly on systems that support hardware acceleration of AES via the OpenSSL EVP layer (e.g. Intel Core i7). It uses OpenSSL's EVP AES API rather than the lower-level one and should give an opportunity for the acceleration to work. A useful benchmark would be dd

Re: use OpenSSL EVP for SSH umac and CTR cipher modes

2011-09-10 Thread Damien Miller
On Fri, 9 Sep 2011, Damien Miller wrote: > Hi, > > This diff needs testing, particularly on systems that support hardware > acceleration of AES via the OpenSSL EVP layer (e.g. Intel Core i7). > It uses OpenSSL's EVP AES API rather than the lower-level one and should > give

Re: sftp diff to allow uploading from command line

2011-09-21 Thread Damien Miller
On Wed, 21 Sep 2011, Loganaden Velvindron wrote: > s/similar/A little bit like > > The diff has issues with stuff like sftp 127.0.0.1. I've > fixed it. The way I'd like to see the sftp commandline go is to become mostly compatible with scp(1). So: sftp local [local...] remote:/path # do

Re: sftp diff to allow uploading from command line

2011-09-23 Thread Damien Miller
On Wed, 21 Sep 2011, Loganaden Velvindron wrote: > s/similar/A little bit like > > The diff has issues with stuff like sftp 127.0.0.1. I've > fixed it. I think this might get confused by something like: sftp blah user@host: foo user2@host: IMO it would be better to walk all the arguments and t

Re: rc.d/sshd reload test

2012-11-28 Thread Damien Miller
I like this - it's what -t is intended for. On Wed, 28 Nov 2012, Alexander Hall wrote: > Make sure new config is valid before SIGHUP'ing sshd, which would > otherwise just kill it. Invalid configuration now gives: > > # pgrep sshd > 18998 > # /etc/rc.d/sshd reload > sshd(failed) > # pgrep sshd

Re: [PATCH] Support for virtio random device

2013-01-27 Thread Damien Miller
On Fri, 25 Jan 2013, Stefan Fritsch wrote: > Hi, > > qemu 1.3 has added a virtio entropy device. Here is a driver for it. > Comments? > OKs? > > As the entropy reserve of the host may not be unlimited, the OpenBSD guest > should only ask for entropy when it actually needs it. Would it make sense

Re: IKEd support for ECDSA key authentication?

2013-03-11 Thread Damien Miller
On Sun, 10 Mar 2013, Jason Hall wrote: > Are there plans to support ECDSA keys? All other recommended > protocols (AES GCM, ECDH) are currently supported. > > When attempting to start IKEd (iked -dvv) with ECDSA keys, the error message > is: > ca_key_serialize: unsupported key type 408 > fatal:

Re: DPI for pf(4)

2013-05-02 Thread Damien Miller
On Wed, 1 May 2013, Franco Fichtner wrote: > Not sure if that's a fitting comparison; and I know too little OSPF > to answer. Let me try another route. The logic consists of an array > of application detection functions, which can be invoked via their > respective IP types. I don't like this ap

Re: DPI for pf(4)

2013-05-02 Thread Damien Miller
On Thu, 2 May 2013, Franco Fichtner wrote: > as stated before, breaking down complexity to the bare minimum is my > requirement for this to be happening at all. You all get to be the > judges. I'm just trying to work on something worth doing. Well, bare minimum complexity per-protocol * large_n

Re: DPI for pf(4)

2013-05-02 Thread Damien Miller
On Thu, 2 May 2013, Franco Fichtner wrote: > > Well, bare minimum complexity per-protocol * large_number_of_protocols = > > a lot of complexity. The incentive is always going to be to add more > > protocols and never retire them. > > I guess that's true for most software projects. We try not to

Re: DPI for pf(4)

2013-05-02 Thread Damien Miller
On Thu, 2 May 2013, Franco Fichtner wrote: > Moving implementations to user space does not necessarily make them > better or less of a problem. The big difference is that its possible to sandbox a userspace implementation so that small integer overflow bugs or length checking failures don't becom

Re: DPI for pf(4)

2013-05-02 Thread Damien Miller
On Thu, 2 May 2013, Franco Fichtner wrote: > OK, the implementation only pulls a couple of bytes from the packet's > payload. It will never pull bytes that are not verified. It will never > allocate anything. It will never test against something that's neither > hard-coded nor available in the ran

Re: DPI for pf(4)

2013-05-02 Thread Damien Miller
On Thu, 2 May 2013, Damien Miller wrote: > You've just described bpf, right down to "no endless loops" and the amount > of data it returns. > > For a little more code that it takes to write one packet parser > (basically: loading bpf rules from pf and making the

Re: add nl(1)

2013-05-09 Thread Damien Miller
On Wed, 8 May 2013, Ted Unangst wrote: > On Tue, Apr 30, 2013 at 18:57, Arto Jonsson wrote: > > Taken from netbsd with minor modifications. Comments? > > I don't think you've received much feedback. I don't know how other > developers feel, but the question I have is can't this be done with a > r

Re: bzip2

2013-06-06 Thread Damien Miller
On Thu, 6 Jun 2013, David Coppa wrote: > > But even more so than with nl(1), why would we want to use something > > that's different from what everybody else uses? If we want bzip2 in > > base (and I think there are good reasons for having it) we should > > simply use the standard bzip2 code. >

Re: base apache and HonorCipherOrder

2013-07-07 Thread Damien Miller
On Sun, 7 Jul 2013, Aaron Stellman wrote: > On Tue, Apr 23, 2013 at 09:08:19AM +0200, Otto Moerbeek wrote: > > If there is any interest, I might add the manual stuff, get ok's and > > commit it. > > I find it useful to have SSLHonorCipherOrder in OpenBSD's apache. More than that, AFAIK it is ne

Re: merging wpa-psk info ifconfig

2010-09-12 Thread Damien Miller
On Sun, 12 Sep 2010, Alexander Hall wrote: > For upcoming changes to the installer. > > PRE: # ifconfig wpi0 nwid mynet wpa wpapsk `wpa-psk mynet "my secret > passphrase"` > > POST: # ifconfig wpi0 nwid mynet wpa wpapsk "my secret passphrase" > > > A few conflicts arises; > > 1. You cannot

glob(3) extension to retain stat(2) data

2010-09-22 Thread Damien Miller
Hi, In sftp we use a few of the BSD extensions to glob(3), most notably the alternate open/readdir and stat functions so we can replace local fs access with remote operations tunnelled over sftp. In sftp these remote operations are slow, so we would like to do as few of them as possible. Unfortun

Re: glob(3) extension to retain stat(2) data

2010-09-22 Thread Damien Miller
... and here is a patch to sftp(1) to make use of it. Index: sftp.c === RCS file: /cvs/src/usr.bin/ssh/sftp.c,v retrieving revision 1.126 diff -u -p -r1.126 sftp.c --- sftp.c 22 Sep 2010 22:58:51 - 1.126 +++ sftp.c

Re: Kill suser() call in tunopen()?

2010-09-22 Thread Damien Miller
On Tue, 21 Sep 2010, Matthew Dempsky wrote: > /dev/tun* are already owned by root and mode 0600 by default, so it > seems redundant to check suser() in tunopen(). I agree in principle -d

Re: better random devices

2010-10-01 Thread Damien Miller
On Fri, 1 Oct 2010, Ted Unangst wrote: > nobody should really be using srandom, but we provide it and it's a > tempting target, so they do. let's give them arandom instead. they'll > never know the difference, except it may actually work. :) I don't like this. If I was generating a particula

Re: regress/lib/libssl: don't use non-standard CFLAGS

2010-10-03 Thread Damien Miller
ok djm This was probably originally done to avoid an ICE on some other platform, but we should make any overrides as specific as possible. On Sun, 3 Oct 2010, Christian Weisgerber wrote: > I don't think there is a good reason to use non-standard CFLAGS in > regress/lib/libssl. As a side effect,

Re: smtpd w/ async DNS

2010-10-15 Thread Damien Miller
On Thu, 14 Oct 2010, Christian Weisgerber wrote: > Ted Unangst wrote: > > > Why not use the evdns resolver in libevent? > > (1) It isn't part of the base system libevent. > (2) It doesn't understand all of our resolv.conf(5) syntax and it > can't talk to a nameserver over IPv6. (3) it does

warn for libraries with TEXT relocations

2010-10-15 Thread Damien Miller
Hi, This has been in my tree for a while, since fixing a bunch of TEXTREL in OpenSSL some time ago. Text relocations are cases where the linker has to modify the executable code of a library to fixup jump addresses to adjust for the library's load address. They waste memory because each program t

Re: warn for libraries with TEXT relocations

2010-10-15 Thread Damien Miller
On Fri, 15 Oct 2010, Philip Guenther wrote: > On Fri, Oct 15, 2010 at 3:58 AM, Damien Miller wrote: > ... > > This diff adds a warning to bsd.lib.mk when it finds a TEXTREL in a > > library. At the moment it finds one in /usr/X11R6/lib/libGL.so.10.0, but > > its ma

Re: requests for perl XS code

2010-10-17 Thread Damien Miller
On Sun, 17 Oct 2010, Marc Espie wrote: > Mostly some XS wrapper around the recvmsg/CMSG_DATA part. > Then some perl glue that would allow one to grab those data, and gets > the fds from it. > > It should probably only extract the msgs, let "normal" stuff grab non > out-of-band data IO, and creat

[no subject]

2010-10-26 Thread Damien Miller
Hi, Here are a couple of changes to the ECDH/ECDSA code: - Fix a NULL-deref on loading of invalid ECC private keys - Support 224-bit ECDSA and ECDH and make it the default. This is strength-equivalent to our current default of 2048-bit RSA keys. Presently it is a bit faster than 256 bit

Re: tcpbe...@libevent

2010-10-26 Thread Damien Miller
=== > RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.c,v > retrieving revision 1.18 > diff -d -u -p -w -r1.18 tcpbench.c > --- tcpbench.c28 Sep 2010 12:00:35 - 1.18 > +++ tcpbench.c14 Oct 2010 04:26:42 -0000 > @@ -1,5 +1,6 @@ > /*

Re: yield in pf_table

2010-10-28 Thread Damien Miller
On Fri, 29 Oct 2010, Ted Unangst wrote: > On Fri, 29 Oct 2010, Ted Unangst wrote: > > > now that the atomic flag is gone, the yield diff is simpler. once again, > > the idea is that unbounded (or of unknown bounds) loops in the kernel are > > bad because you hog the cpu. so be polite and yiel

Re: zap stats and ioctl from rnd

2010-11-22 Thread Damien Miller
On Sun, 21 Nov 2010, Ted Unangst wrote: > is any of this useful? has anybody ever manually stirred the random > device or tried interpreting the nonsense spit out by sysctl > kern.random? yes and yes

Re: no printing cache info

2010-11-27 Thread Damien Miller
On Sat, 27 Nov 2010, Ted Unangst wrote: > if you really really need to know that your cpu cache has 48 fully > associative entries, go consult the spec sheet. otherwise, save some > electrons. or, how about only print this (and flags) for the first attached CPU? Unless there are plans to suppo

Re: Allegations regarding OpenBSD IPSEC

2010-12-14 Thread Damien Miller
On Tue, 14 Dec 2010, Bob Beck wrote: > I wonder a lot about the motives of the original sender sending that message. Ignoring motive, and looking at opportunity: We have never allowed US citizens or foreign citizens working in the US to hack on crypto code (Niels Provos used to make trips to Can

Re: Allegations regarding OpenBSD IPSEC

2010-12-15 Thread Damien Miller
On Wed, 15 Dec 2010, patrick keshishian wrote: > It is easy to shoot one's mouth off like that about bounty offered, > given the ridiculously constrained "conditions" the bounty is offered > under. He might as well offered a million USD. No one will be able to > prove this under these restrictions

Re: MD5 Folding in kernel RNG

2010-12-28 Thread Damien Miller
On Mon, 27 Dec 2010, Kjell Wooding wrote: > The OpenBSD random number subsystem uses an in-kernel entropy pool. This > data isn't used directly. When entropy is requested, the contents of the > pool are hashed with MD5, and the massaged output used to seed an RC4 PRNG. > > In looking at the code,

Re: MD5 Folding in kernel RNG

2010-12-28 Thread Damien Miller
On Tue, 28 Dec 2010, Kjell Wooding wrote: > How would a preimage attack matter in this case? It gives you knowledge of the collection pool, which is what the very thing the design is supposed to avoid. > Even if I could pull one off, (i.e. guess the contents of the entropy pool > based on the ou

Re: tcpbench udp support + libevent.

2011-01-26 Thread Damien Miller
On Wed, 26 Jan 2011, Christiano F. Haesbaert wrote: > Hi there, > > This diff adds udp support with PPS (packet per second) accounting and > changes tcpbench to use libevent instead of poll(2). > > The sender/client is pretty stupid, it sends as much as possible until > a ENOBUFS is reached, then

Re: ssh -V double print

2011-01-30 Thread Damien Miller
On Sun, 30 Jan 2011, Laurent Ghigonis wrote: > Hello, > > When you do ssh -V on -current it outputs > OpenSSH_5.7, OpenSSL 1.0.0a 1 Jun 2010 > OpenSSH_5.7, OpenSSL 1.0.0a 1 Jun 2010 > > That fixes it, but maybe i miss some cases before or after again: I can't replicate this. Do you hav

Re: Adding support for AI_FQDN to getaddrinfo(3)?

2011-04-01 Thread Damien Miller
On Fri, 1 Apr 2011, Matthew Dempsky wrote: > Anyway, I'm interested in knowing what people think of adding this > feature. I don't know of any other getaddrinfo(3) implementations > that support it, but djm@ mentioned that it would be nice to have in > OpenSSH for host key validation. To expand

Re: Adding support for AI_FQDN to getaddrinfo(3)?

2011-04-02 Thread Damien Miller
On Sat, 2 Apr 2011, Damien Miller wrote: > AI_FQDN solves these problems quite nicely. It is also useful for web > browsers that face a similar problem (e.g. https://intranet/) but > getting them to adopt it might be more tricky. I'd love to see this get > deployed so we can

Re: pool_debug is good, but also bad

2011-04-03 Thread Damien Miller
On Sun, 3 Apr 2011, Theo de Raadt wrote: > based on a conversation at the bar. > > POOL_DEBUG is expensive. But we really want it because it finds bugs > before they hurt us. The solution to this is to make it simpler to > turn off. Is it expensive because it tests every pool entry? Could it be

<    1   2