Bug 527 - Bad packet length on SunOS 4.1.3U1
Summary: Bad packet length on SunOS 4.1.3U1
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: SPARC SunOS
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
: 545 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-02 12:53 AEST by Jay S. Rouman
Modified: 2004-04-14 12:24 AEST (History)
1 user (show)

See Also:


Attachments
patch to solve problem (642 bytes, text/plain)
2003-04-03 01:13 AEST, Ben Lindstrom
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jay S. Rouman 2003-04-02 12:53:11 AEST
IP_TOS is undefined in packet.c.  Setting it to 1 allows build to continue. 
When a Slackware Linux system running kernel 2.4.20 tries to slogin to the SunOS
system, it disconnects with a bad packet length message.  My "fix" to packet.c
may be to blame.

dex:/home/u/jsr(1)> slogin -v pontoon
OpenSSH_3.6.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Applying options for *
debug1: /usr/local/etc/ssh_config line 42: Deprecated option "FallBackToRsh"
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: Connecting to pontoon [192.168.200.30] port 22.
debug1: Connection established.
debug1: identity file /home/u/jsr/.ssh/identity type 0
debug1: identity file /home/u/jsr/.ssh/id_rsa type 1
debug1: identity file /home/u/jsr/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.6.1p1
debug1: match: OpenSSH_3.6.1p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.6.1p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'pontoon' is known and matches the RSA host key.
debug1: Found key in /home/u/jsr/.ssh/known_hosts:85
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/u/jsr/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149 lastkey 0x8084fa0 hint 1
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: channel 0: request pty-req
debug1: channel 0: request shell
debug1: channel 0: open confirm rwindow 0 rmax 32768
Last login: Tue Apr  1 21:38:59 2003
SunOS Release 4.1.3_U1 (EDCEN) #1: Wed Jun 10 22:54:45 EDT 1998
da8b 8996 0c22 f921 5ca3 5e07 1202 9e28

Disconnecting: Bad packet length 3666577814.
debug1: Calling cleanup 0x8050cec(0x0)
debug1: Calling cleanup 0x8058cd8(0x0)
debug1: channel_free: channel 0: client-session, nchannels 1
debug1: Calling cleanup 0x805f8b4(0x0)
dex:/home/u/jsr(2)>
Comment 1 Jay S. Rouman 2003-04-02 14:00:34 AEST
I see now that the bad packet length error is an artifact of my "fix."  You
probably just want to test for TP_TOS before packet_set_tos() near line 1316 in
packet.c  Sorry for the mis-fire.
Comment 2 Ben Lindstrom 2003-04-02 14:25:17 AEST
#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
        packet_set_tos(interactive);
#endif

If IP_TOS is not set.  It shoud skip it at line 1349.

I'm not seeing how it can get there.

- Ben
Comment 3 Jay S. Rouman 2003-04-02 21:58:44 AEST
The problem is slightly before that:

packet.c: In function `packet_set_tos':
packet.c:1325: `IP_TOS' undeclared (first use in this function)
packet.c:1325: (Each undeclared identifier is reported only once
packet.c:1325: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `packet.o'
Comment 4 Ben Lindstrom 2003-04-03 01:13:16 AEST
Created attachment 267 [details]
patch to solve problem

Apply this patch.  It was forgotten in 3.6 release to ensure it does not try to
compile packet_set_tos() if IP_TOS does not exist or is broken.

This will go into the CVS tree soon.
Comment 5 Ben Lindstrom 2003-04-03 02:09:11 AEST
Commited to CVS tree.
Comment 6 Darren Tucker 2003-04-23 18:18:43 AEST
*** Bug 545 has been marked as a duplicate of this bug. ***
Comment 7 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED