STEWARD, Curtis (Jamestown)
2003-Sep-09 19:40 UTC
3.6p2 build errors on buffer_get with latest portable/SNAP
Tried the user discussion list to no avail, can't get 3.6.p2 portable running due to buffer_get errors. Does the latest portable SNAP incorporate the latest patches? Running Red Hat 8.0 AS SHIPPED /usr/sbin/sshd ... cool, listens on 22 with 3.4p1 WITH 3.6.1p2 ./configure make make install ... /usr/local/sbin/sshd -t -f /usr/local/etc/sshd_config buffer_get: trying to get more bytes 1 than in buffer 0 make: [check-config] Error 255 (ignored) WITH 3.5p1 ./configure make make install ... cool, listens on 22 with 3.5p1 WITH SNAP-20030830 (had to go to 8/30 since strlcat.h was missing!? ./configure make make install ... /usr/local/sbin/sshd -t -f /usr/local/etc/sshd_config buffer_get: trying to get more bytes 1 than in buffer 0 make: [check-config] Error 255 (ignored) What's up? cs
Darren Tucker
2003-Sep-10 01:31 UTC
3.6p2 build errors on buffer_get with latest portable/SNAP
"STEWARD, Curtis (Jamestown)" wrote:> Tried the user discussion list to no avail, can't get 3.6.p2 > portable running due to buffer_get errors. Does the > latest portable SNAP incorporate the latest patches?The snapshots contain everything committed to the CVS tree at the point that they were generated.> Running Red Hat 8.0[snip]> /usr/local/sbin/sshd -t -f /usr/local/etc/sshd_config > buffer_get: trying to get more bytes 1 than in buffer 0 > make: [check-config] Error 255 (ignored)I build and test on Redhat 8 and I've never seen those errors. What versions of OpenSSL and zlib do you have? Which version of gcc? -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
STEWARD, Curtis (Jamestown)
2003-Sep-10 13:08 UTC
3.6p2 build errors on buffer_get with latest portable/SNAP
I've been running gcc 3.2, OpenSSL 0.9.7b and zlib 1.1.4. After receiving your reply I tried both OpenSSL 0.9.6.b and pulled /usr/local/bin and /usr/local/sbin out of the PATH only to get the same results. I don't have any OS patches on 8.0, so I can only guess I have something flakey on my box since your up and running with the same release? Let me know if you have any other ideas. Thanks, cs -----Original Message----- From: Darren Tucker [mailto:dtucker at zip.com.au] Sent: Tuesday, September 09, 2003 8:32 PM To: STEWARD, Curtis (Jamestown) Cc: 'openssh-unix-dev at mindrot.org' Subject: Re: 3.6p2 build errors on buffer_get with latest portable/SNAP "STEWARD, Curtis (Jamestown)" wrote:> Tried the user discussion list to no avail, can't get 3.6.p2 > portable running due to buffer_get errors. Does the > latest portable SNAP incorporate the latest patches?The snapshots contain everything committed to the CVS tree at the point that they were generated.> Running Red Hat 8.0[snip]> /usr/local/sbin/sshd -t -f /usr/local/etc/sshd_config > buffer_get: trying to get more bytes 1 than in buffer 0 > make: [check-config] Error 255 (ignored)I build and test on Redhat 8 and I've never seen those errors. What versions of OpenSSL and zlib do you have? Which version of gcc? -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
STEWARD, Curtis (Jamestown)
2003-Sep-10 13:49 UTC
3.6p2 build errors on buffer_get with latest portable/SNAP
I took out /usr/local path's just to eliminate something that might be interfering. I've tested both sshd_config and ssh_host_rsa_key as provided by the "make install" with the same errors. Here's the debug: # /usr/local/sbin/sshd -ddd -t debug2: read_server_config: filename /usr/local/etc/sshd_config debug1: sshd version OpenSSH_3.7p1 buffer_get: trying to get more bytes 1 than in buffer 0 But look at my 8.0 rpm's... ?! # rpm -q openssl openssl-devel zlib zlib-devel gcc glibc-devel openssl-0.9.6b-29 openssl-devel-0.9.6b-29 zlib-1.1.4-4 zlib-devel-1.1.4-4 gcc-3.2-7 glibc-devel-2.2.93-5 -----Original Message----- From: Darren Tucker [mailto:dtucker at zip.com.au] Sent: Wednesday, September 10, 2003 8:32 AM To: STEWARD, Curtis (Jamestown) Cc: 'openssh-unix-dev at mindrot.org' Subject: Re: 3.6p2 build errors on buffer_get with latest portable/SNAP "STEWARD, Curtis (Jamestown)" wrote:> I've been running gcc 3.2, OpenSSL 0.9.7b and zlib 1.1.4. After > receiving your reply I tried both OpenSSL 0.9.6.b and pulled > /usr/local/bin and /usr/local/sbin out of the PATH only > to get the same results. I don't have any OS patches on 8.0, > so I can only guess I have something flakey on my box since > your up and running with the same release? Let me know if > you have any other ideas.Do you have openssl or zlib libraries in /usr/local? Something odd in your sshd_config triggering the problem? Corrupt public/private keys? You can use "-ddd" for a little more debug info: # ./sshd -ddd -t debug2: read_server_config: filename /usr/local/etc/sshd_config debug1: sshd version OpenSSH_3.7p1 debug3: Not a RSA1 key file /usr/local/etc/ssh_host_rsa_key. debug1: read PEM private key done: type RSA debug1: private host key: #0 type 1 RSA debug3: Not a RSA1 key file /usr/local/etc/ssh_host_dsa_key. debug1: read PEM private key done: type DSA debug1: private host key: #1 type 2 DSA Here's the versions I have: # rpm -q openssl openssl-devel zlib zlib-devel gcc glibc-devel openssl-0.9.6b-33 openssl-devel-0.9.6b-33 zlib-1.1.4-8.8x zlib-devel-1.1.4-8.8x gcc-3.2-7 glibc-devel-2.3.2-4.80.6 -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
STEWARD, Curtis (Jamestown)
2003-Sep-10 16:42 UTC
3.6p2 build errors on buffer_get with latest portable/SNAP
Darren, FYI, I tried a 2nd machine (this time with VMWare and 8.0) had the same results. The 2nd machine had identical gcc, ssl, zlib, etc. Here's the debug. From what I could figure out I could get the error on both buffer_init() and buffer_get(). xmalloc()? BUFFER_INIT # gdb -q ./sshd (gdb) set args -t (gdb) break buffer.c:30 Breakpoint 1 at 0x80687ce: file buffer.c, line 30. (gdb) break buffer.c:31 Breakpoint 2 at 0x8068670: file buffer.c, line 31. (gdb) info break Num Type Disp Enb Address What 1 breakpoint keep y 0x080687ce in buffer_init at buffer.c:30 2 breakpoint keep y 0x08068670 in buffer_free at buffer.c:31 (gdb) run Starting program: /root/gz/openssh/sshd -t Breakpoint 1, buffer_init (buffer=0xbffff1f0) at buffer.c:30 30 } (gdb) c Continuing. buffer_get: trying to get more bytes 1 than in buffer 0 Program exited with code 0377. (gdb) bt No stack. (gdb) BUFFER_GET # gdb -q ./sshd (gdb) set args -t (gdb) break buffer.c:124 Breakpoint 1 at 0x8068896: file buffer.c, line 124. (gdb) break buffer.c:125 Breakpoint 2 at 0x806886f: file buffer.c, line 125. (gdb) info break Num Type Disp Enb Address What 1 breakpoint keep y 0x08068896 in buffer_get at buffer.c:124 2 breakpoint keep y 0x0806886f in buffer_get at buffer.c:125 (gdb) run Starting program: /root/gz/openssh/sshd -t Breakpoint 1, buffer_get (buffer=0xbffff1f0, buf=0x0, len=1) at buffer.c:124 124 fatal("buffer_get: trying to get more bytes %d than in buffer %d", (gdb) c Continuing. buffer_get: trying to get more bytes 1 than in buffer 0 Program exited with code 0377. (gdb) bt No stack. (gdb) Regards, cs -----Original Message----- From: Darren Tucker [mailto:dtucker at zip.com.au] Sent: Wednesday, September 10, 2003 9:14 AM To: STEWARD, Curtis (Jamestown) Cc: 'openssh-unix-dev at mindrot.org' Subject: Re: 3.6p2 build errors on buffer_get with latest portable/SNAP "STEWARD, Curtis (Jamestown)" wrote:> > I took out /usr/local path's just to eliminate something > that might be interfering. I've tested both sshd_config and > ssh_host_rsa_key as provided by the "make install" with > the same errors. Here's the debug: > > # /usr/local/sbin/sshd -ddd -t > debug2: read_server_config: filename /usr/local/etc/sshd_config > debug1: sshd version OpenSSH_3.7p1 > buffer_get: trying to get more bytes 1 than in buffer 0Try moving the host keys and generating new ones (particularly the SSH V1 ssh_host_key which was not shown in my debugging) for a test. That would be my guess. If it's not that, you can use gdb to set a breakpoint for that line of code, then use "bt" to get a stack trace to fund out where in the code the failing call is coming from: # gdb -q ./sshd (gdb) set args -t (gdb) break buffer.c:124 Breakpoint 1 at 0x8062bfc: file ../buffer.c, line 124. (gdb) run [wait for failure] (gdb) bt> But look at my 8.0 rpm's... ?! > # rpm -q openssl openssl-devel zlib zlib-devel gcc glibc-develYou could try updating those. -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
STEWARD, Curtis (Jamestown)
2003-Sep-11 13:00 UTC
3.6p2 build errors on buffer_get with latest portable/SNAP
I'm new to some of this so bear with me, I did post a buffer_get() error but while debugging I could make it fail on buffer_init() 31, weird. Here's the bt without the continue: gdb -q ./sshd (gdb) set args -t (gdb) break buffer.c:124 Breakpoint 1 at 0x8068896: file buffer.c, line 124. (gdb) run Starting program: /root/gz/openssh/sshd -t Breakpoint 1, buffer_get (buffer=0xbffff210, buf=0x0, len=1) at buffer.c:124 124 fatal("buffer_get: trying to get more bytes %d than in buffer %d", (gdb) bt #0 buffer_get (buffer=0xbffff210, buf=0x0, len=1) at buffer.c:124 #1 0x00000000 in ?? () (gdb) -----Original Message----- From: Darren Tucker [mailto:dtucker at zip.com.au] Sent: Wednesday, September 10, 2003 7:41 PM To: STEWARD, Curtis (Jamestown) Cc: 'openssh-unix-dev at mindrot.org' Subject: Re: 3.6p2 build errors on buffer_get with latest portable/SNAP "STEWARD, Curtis (Jamestown)" wrote:> FYI, I tried a 2nd machine (this time with VMWare and 8.0) > had the same results. The 2nd machine had identical gcc, > ssl, zlib, etc. Here's the debug. From what I could figure > out I could get the error on both buffer_init() > and buffer_get(). xmalloc()?The error you posted earlier shows the error coming from buffer_get. [snip]> # gdb -q ./sshd > (gdb) set args -t > (gdb) break buffer.c:124 > Breakpoint 1 at 0x8068896: file buffer.c, line 124. > (gdb) break buffer.c:125 > Breakpoint 2 at 0x806886f: file buffer.c, line 125. > (gdb) info break > Num Type Disp Enb Address What > 1 breakpoint keep y 0x08068896 in buffer_get at buffer.c:124 > 2 breakpoint keep y 0x0806886f in buffer_get at buffer.c:125 > (gdb) run > Starting program: /root/gz/openssh/sshd -t > > Breakpoint 1, buffer_get (buffer=0xbffff1f0, buf=0x0, len=1) atbuffer.c:124> 124 fatal("buffer_get: trying to get more bytes %dthan> in buffer %d", > (gdb) cThe bit I wanted to see is the stack trace at this point. Could you plese repeat this test, but do "bt" here instead of continuing?> Continuing. > buffer_get: trying to get more bytes 1 than in buffer 0-- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
STEWARD, Curtis (Jamestown)
2003-Sep-15 22:02 UTC
3.6p2 build errors on buffer_get with latest portable/SNAP
Ok, this is what I did: 1) I reinstalled psyche (8.0) w/3.7p1 - no problems with OpenSSH. 2) Put on 3.7p1 on a vm (VMWare) - no problems with OpenSSH. 3) Put on my usual config onto vm - no problems with OpenSSH. 4) At this point I can only assume the other two examples fail because of some bogus configuration that I can't duplicate... Anyways I proceeded in forcing the core dump and received a memory access error on the old machine: # gdb -q ./sshd core.27823 Core was generated by `./sshd -t'. Program terminated with signal 6, Aborted. Reading symbols from /lib/libutil.so.1...done. Loaded symbols for /lib/libutil.so.1 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libcrypto.so.2...done. Loaded symbols for /lib/libcrypto.so.2 Reading symbols from /lib/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/i686/libc.so.6...done. Loaded symbols for /lib/i686/libc.so.6 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0x42028cc1 in kill () from /lib/i686/libc.so.6 (gdb) bt #0 0x42028cc1 in kill () from /lib/i686/libc.so.6 #1 0x42028ac8 in raise () from /lib/i686/libc.so.6 #2 0x4202a019 in abort () from /lib/i686/libc.so.6 #3 0x080688b2 in buffer_get () Cannot access memory at address 0x3 (gdb) It looks like I can run now despite the above, if you want to continue to pursue the memory problem let me know, I'll hang onto the problematic machine :) cs -----Original Message----- From: Darren Tucker [mailto:dtucker at zip.com.au] Sent: Thursday, September 11, 2003 9:31 PM To: STEWARD, Curtis (Jamestown) Cc: 'openssh-unix-dev at mindrot.org' Subject: Re: 3.6p2 build errors on buffer_get with latest portable/SNAP "STEWARD, Curtis (Jamestown)" wrote:> I'm new to some of this so bear with me, I did post a > buffer_get() error but while debugging I could make it fail > on buffer_init() 31, weird. Here's the bt without > the continue:> (gdb) bt > #0 buffer_get (buffer=0xbffff210, buf=0x0, len=1) at buffer.c:124 > #1 0x00000000 in ?? ()Hmm, there should be more here, I don't know what there isn't. Plan B: if you insert an abort(); immediately before the fatal at buffer.c:124 then run it normally, you should get a core dump which you can generate the backtrace from. It should look something like this: # ./sshd -t [core dumps] # gdb -q ./sshd core Core was generated by `./sshd -t'. [snip] #0 0x4020bfd1 in kill () from /lib/libc.so.6 (gdb) bt #0 0x4020bfd1 in kill () from /lib/libc.so.6 #1 0x4020bc94 in raise () from /lib/libc.so.6 #2 0x4020d04d in abort () from /lib/libc.so.6 #3 0x08062bd7 in buffer_get () at ../buffer.c:123 #4 0x08062a1c in buffer_get_char (buffer=0xbfffd4f0) at ../bufaux.c:262 #5 0x08061ac5 in key_load_public_rsa1 (fd=3, filename=0x8079e80 "/usr/local/etc/ssh_host_rsa_key", commentp=0x0) at ../authfile.c:268 #6 0x080622f3 in key_load_private ( filename=0x8079e80 "/usr/local/etc/ssh_host_rsa_key", passphrase=0x8078c1a "", commentp=0x0) at ../authfile.c:573 #7 0x0804d8ae in main (ac=2, av=0x8092f68) at ../sshd.c:978 #8 0x401fa4ed in __libc_start_main () from /lib/libc.so.6 -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Apparently Analagous Threads
- scp fails where ssh succeeds; buffer_get?
- [Bug 243] New: fatal: buffer_get
- [Bug 243] fatal: buffer_get
- [Bug 1084] provide better error message if keys in authorized_keys contain CR/LF (was " sshd[6895]: fatal: buffer_get: trying to get more bytes 129 than in buffer 34")
- [Bug 243] fatal: buffer_get