Re: sshd segfaults with incomplete /etc/hosts

2014-05-13 Thread Héctor Luis Gimbatti
On the same topic, $ man 5 hosts BUGS: Lines in /etc/hosts are limited to BUFSIZ characters (currently 1024). Longer lines will be ignored. I've made a couple of test: 1. If the line has the following pattern: 10.0.1.1 aa b c z $ getent hosts 10.0.1.1 10

Re: sshd segfaults with incomplete /etc/hosts

2014-05-13 Thread Seth Hanford
On 5/13/14, 2:59 AM, Eric Faurot wrote: > > Yes, but the check must be done for all cases. > The following diff also fixes getnetnamadr. > getaddrinfo is already fine. > > Eric. > Thanks, everyone! I see it's committed. http://marc.info/?l=openbsd-cvs&m=139998227611174&w=2 - Seth

Re: sshd segfaults with incomplete /etc/hosts

2014-05-13 Thread Eric Faurot
On Mon, May 12, 2014 at 09:47:19PM +, Florian Obser wrote: > > > Eric? > > > > I think the bug is in hostent_file_match. The following diff has the > > advantage that this works in /etc/hosts: > > > > 192.0.2.1 > > 192.0.2.1 foo > > > > $ getent hosts 192.0.2.1 > > 192.0.2.1 foo > >

Re: sshd segfaults with incomplete /etc/hosts

2014-05-12 Thread Florian Obser
On Mon, May 12, 2014 at 09:25:45PM +, Florian Obser wrote: > On Tue, May 13, 2014 at 06:51:16AM +1000, Darren Tucker wrote: > > On Mon, May 12, 2014 at 04:39:57PM -0400, Darren Tucker wrote: > > > Indeed. It looks like a bug in the libc resolver rather than sshd, > > > though. > > > I've bee

Re: sshd segfaults with incomplete /etc/hosts

2014-05-12 Thread Florian Obser
On Tue, May 13, 2014 at 06:51:16AM +1000, Darren Tucker wrote: > On Mon, May 12, 2014 at 04:39:57PM -0400, Darren Tucker wrote: > > Indeed. It looks like a bug in the libc resolver rather than sshd, though. > > I've been kinda busy recently so I haven't kept up with recent changes so > > I'm not

Re: sshd segfaults with incomplete /etc/hosts

2014-05-12 Thread Darren Tucker
On Mon, May 12, 2014 at 04:39:57PM -0400, Darren Tucker wrote: > Indeed. It looks like a bug in the libc resolver rather than sshd, though. > I've been kinda busy recently so I haven't kept up with recent changes so > I'm not sure exactly what's changed in there. Looks like it should be > readil

Re: sshd segfaults with incomplete /etc/hosts

2014-05-12 Thread Darren Tucker
On Sun, May 11, 2014 at 10:41 PM, Seth Hanford wrote: > While working on consolidating some firewalls, I ended up creating an > incomplete /etc/hosts file entry. One line of that file was simply an IP > address: > 192.168.100.25 > > Upon ssh from that host (.25) to my sshd server (192.168.100.4),

Re: sshd segfaults with incomplete /etc/hosts

2014-05-12 Thread sven falempin
It is working fine here (amd64/5.5) On Sun, May 11, 2014 at 10:41 PM, Seth Hanford wrote: > While working on consolidating some firewalls, I ended up creating an > incomplete /etc/hosts file entry. One line of that file was simply an IP > address: > 192.168.100.25 > > Upon ssh from that host (.25

sshd segfaults with incomplete /etc/hosts

2014-05-11 Thread Seth Hanford
While working on consolidating some firewalls, I ended up creating an incomplete /etc/hosts file entry. One line of that file was simply an IP address: 192.168.100.25 Upon ssh from that host (.25) to my sshd server (192.168.100.4), the sshd on .4 segfaulted. Log output of /usr/sbin/sshd included b