[krbdev.mit.edu #2615] Fwd: Patch for telnet / telnetd to avoid crashes when used with MS kdc and PAC field
Markus Moeller via RT
rt-comment at krbdev.mit.edu
Thu Jun 24 20:06:58 EDT 2004
Received: from [160.83.32.14] by web86604.mail.ukl.yahoo.com via HTTP;
Mon, 21 Jun 2004 10:55:18 BST
Date: Mon, 21 Jun 2004 10:55:18 +0100 (BST)
From: =?iso-8859-1?q?Markus=20Moeller?= <huaraz at btinternet.com>
Subject: Patch for telnet / telnetd to avoid crashes when used with MS kdc and
PAC field
To: kerberos at mit.edu
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="0-566444439-1087811718=:60831"
Content-Transfer-Encoding: 8bit
Content-Length: 1844
--0-566444439-1087811718=:60831
Content-Type: multipart/alternative; boundary="0-303064894-1087811718=:60831"
--0-303064894-1087811718=:60831
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
I intoduced a TELNET_BUFSIZ to increase several buffers to be able to handle tickets received by a MS kdc and a big pac field (e.g. more than 200 group memberships). I also increased the FTP_BUFSIZ fro the same reason.
Regards
Markus
--0-303064894-1087811718=:60831
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<DIV>
<DIV>
<DIV>
<DIV id=message>
<DIV>
<DIV>
<DIV>
<DIV>
<DIV>
<DIV>I intoduced a TELNET_BUFSIZ to increase several buffers to be able to handle tickets received by a MS kdc and a big pac field (e.g. more than 200 group memberships). I also increased the FTP_BUFSIZ fro the same reason.</DIV>
<DIV> </DIV>
<DIV>Regards</DIV>
<DIV>Markus</DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV></DIV></DIV><!-- END TOC --></DIV></DIV></DIV>
--0-303064894-1087811718=:60831--
--0-566444439-1087811718=:60831
Content-Type: text/plain; name="telnet_ftp_mspac.patch"
Content-Description: telnet_ftp_mspac.patch
Content-Disposition: inline; filename="telnet_ftp_mspac.patch"
diff -r -c krb5-1.3.4/src/appl/gssftp/ftp/Makefile.in krb5-1.3.4-new/src/appl/gssftp/ftp/Makefile.in
*** krb5-1.3.4/src/appl/gssftp/ftp/Makefile.in 2002-12-23 22:42:57.000000000 +0000
--- krb5-1.3.4-new/src/appl/gssftp/ftp/Makefile.in 2004-06-21 10:34:13.000000000 +0100
***************
*** 5,11 ****
#
# appl/gssftp/ftp/Makefile.in
#
! DEFINES = -DGSSAPI -DFTP_BUFSIZ=10240
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)
--- 5,11 ----
#
# appl/gssftp/ftp/Makefile.in
#
! DEFINES = -DGSSAPI -DFTP_BUFSIZ=65535
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)
diff -r -c krb5-1.3.4/src/appl/telnet/libtelnet/Makefile.in krb5-1.3.4-new/src/appl/telnet/libtelnet/Makefile.in
*** krb5-1.3.4/src/appl/telnet/libtelnet/Makefile.in 2003-06-09 22:57:10.000000000 +0100
--- krb5-1.3.4-new/src/appl/telnet/libtelnet/Makefile.in 2004-06-21 10:30:58.000000000 +0100
***************
*** 26,32 ****
AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION -DKRB5 -DFORWARD \
-UNO_LOGIN_F -DLOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN
LOCALINCLUDES=-I.. -I$(srcdir)/.. @KRB4_INCLUDES@
! DEFINES = $(AUTH_DEF)
LIBOBJS=@LIBOBJS@
SETENVSRC=@SETENVSRC@
--- 26,32 ----
AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION -DKRB5 -DFORWARD \
-UNO_LOGIN_F -DLOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN
LOCALINCLUDES=-I.. -I$(srcdir)/.. @KRB4_INCLUDES@
! DEFINES = -DTELNET_BUFSIZE=65535 $(AUTH_DEF)
LIBOBJS=@LIBOBJS@
SETENVSRC=@SETENVSRC@
diff -r -c krb5-1.3.4/src/appl/telnet/libtelnet/kerberos.c krb5-1.3.4-new/src/appl/telnet/libtelnet/kerberos.c
*** krb5-1.3.4/src/appl/telnet/libtelnet/kerberos.c 2003-04-11 05:23:53.000000000 +0100
--- krb5-1.3.4-new/src/appl/telnet/libtelnet/kerberos.c 2004-06-21 10:32:12.000000000 +0100
***************
*** 112,118 ****
int kerberos4_cksum (unsigned char *, int);
! static unsigned char str_data[1024] = { IAC, SB, TELOPT_AUTHENTICATION, 0,
AUTHTYPE_KERBEROS_V4, };
#if 0
static unsigned char str_name[1024] = { IAC, SB, TELOPT_AUTHENTICATION,
--- 112,118 ----
int kerberos4_cksum (unsigned char *, int);
! static unsigned char str_data[TELNET_BUFSIZE] = { IAC, SB, TELOPT_AUTHENTICATION, 0,
AUTHTYPE_KERBEROS_V4, };
#if 0
static unsigned char str_name[1024] = { IAC, SB, TELOPT_AUTHENTICATION,
diff -r -c krb5-1.3.4/src/appl/telnet/libtelnet/kerberos5.c krb5-1.3.4-new/src/appl/telnet/libtelnet/kerberos5.c
*** krb5-1.3.4/src/appl/telnet/libtelnet/kerberos5.c 2003-05-12 23:20:17.000000000 +0100
--- krb5-1.3.4-new/src/appl/telnet/libtelnet/kerberos5.c 2004-06-21 10:32:30.000000000 +0100
***************
*** 99,105 ****
#endif /* FORWARD */
! static unsigned char str_data[8192] = {IAC, SB, TELOPT_AUTHENTICATION, 0,
AUTHTYPE_KERBEROS_V5, };
/*static unsigned char str_name[1024] = { IAC, SB, TELOPT_AUTHENTICATION,
TELQUAL_NAME, };*/
--- 99,105 ----
#endif /* FORWARD */
! static unsigned char str_data[TELNET_BUFSIZE] = {IAC, SB, TELOPT_AUTHENTICATION, 0,
AUTHTYPE_KERBEROS_V5, };
/*static unsigned char str_name[1024] = { IAC, SB, TELOPT_AUTHENTICATION,
TELQUAL_NAME, };*/
diff -r -c krb5-1.3.4/src/appl/telnet/telnet/Makefile.in krb5-1.3.4-new/src/appl/telnet/telnet/Makefile.in
*** krb5-1.3.4/src/appl/telnet/telnet/Makefile.in 2003-12-16 23:18:57.000000000 +0000
--- krb5-1.3.4-new/src/appl/telnet/telnet/Makefile.in 2004-06-21 10:29:56.000000000 +0100
***************
*** 27,33 ****
AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DKRB5 -DFORWARD -UNO_LOGIN_F -DLOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN
OTHERDEFS=-DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON
LOCALINCLUDES=-I.. -I$(srcdir)/..
! DEFINES = $(AUTH_DEF) $(OTHERDEFS)
ARPA_TELNET= $(srcdir)/../arpa/telnet.h
PROG_LIBPATH=-L$(TOPLIBD)
--- 27,33 ----
AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DKRB5 -DFORWARD -UNO_LOGIN_F -DLOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN
OTHERDEFS=-DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON
LOCALINCLUDES=-I.. -I$(srcdir)/..
! DEFINES = $(AUTH_DEF) -DTELNET_BUFSIZE=65535 $(OTHERDEFS)
ARPA_TELNET= $(srcdir)/../arpa/telnet.h
PROG_LIBPATH=-L$(TOPLIBD)
diff -r -c krb5-1.3.4/src/appl/telnet/telnet/network.c krb5-1.3.4-new/src/appl/telnet/telnet/network.c
*** krb5-1.3.4/src/appl/telnet/telnet/network.c 2002-11-15 20:21:35.000000000 +0000
--- krb5-1.3.4-new/src/appl/telnet/telnet/network.c 2004-06-21 10:31:48.000000000 +0100
***************
*** 52,58 ****
#include "fdset.h"
Ring netoring, netiring;
! unsigned char netobuf[2*BUFSIZ], netibuf[BUFSIZ];
/*
* Initialize internal network data structures.
--- 52,58 ----
#include "fdset.h"
Ring netoring, netiring;
! unsigned char netobuf[2*TELNET_BUFSIZE], netibuf[TELNET_BUFSIZE];
/*
* Initialize internal network data structures.
diff -r -c krb5-1.3.4/src/appl/telnet/telnetd/Makefile.in krb5-1.3.4-new/src/appl/telnet/telnetd/Makefile.in
*** krb5-1.3.4/src/appl/telnet/telnetd/Makefile.in 2003-12-16 23:19:00.000000000 +0000
--- krb5-1.3.4-new/src/appl/telnet/telnetd/Makefile.in 2004-06-21 10:31:13.000000000 +0100
***************
*** 27,33 ****
AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DKRB5 -DFORWARD -UNO_LOGIN_F -ULOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN
OTHERDEFS=-DKLUDGELINEMODE -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON
LOCALINCLUDES=-I.. -I$(srcdir)/..
! DEFINES = $(AUTH_DEF) $(OTHERDEFS)
ARPA_TELNET= $(srcdir)/../arpa/telnet.h
PROG_LIBPATH=-L$(TOPLIBD) $(KRB4_LIBPATH)
--- 27,33 ----
AUTH_DEF=-DAUTHENTICATION -DENCRYPTION -DKRB5 -DFORWARD -UNO_LOGIN_F -ULOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN
OTHERDEFS=-DKLUDGELINEMODE -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON
LOCALINCLUDES=-I.. -I$(srcdir)/..
! DEFINES = -DTELNET_BUFSIZE=65535 $(AUTH_DEF) $(OTHERDEFS)
ARPA_TELNET= $(srcdir)/../arpa/telnet.h
PROG_LIBPATH=-L$(TOPLIBD) $(KRB4_LIBPATH)
diff -r -c krb5-1.3.4/src/appl/telnet/telnetd/state.c krb5-1.3.4-new/src/appl/telnet/telnetd/state.c
*** krb5-1.3.4/src/appl/telnet/telnetd/state.c 2002-11-15 20:21:51.000000000 +0000
--- krb5-1.3.4-new/src/appl/telnet/telnetd/state.c 2004-06-21 10:33:01.000000000 +0100
***************
*** 53,59 ****
* Buffer for sub-options, and macros
* for suboptions buffer manipulations
*/
! unsigned char subbuffer[4096], *subpointer= subbuffer, *subend= subbuffer;
#define SB_CLEAR() subpointer = subbuffer
#define SB_TERM() { subend = subpointer; SB_CLEAR(); }
--- 53,59 ----
* Buffer for sub-options, and macros
* for suboptions buffer manipulations
*/
! unsigned char subbuffer[TELNET_BUFSIZE], *subpointer= subbuffer, *subend= subbuffer;
#define SB_CLEAR() subpointer = subbuffer
#define SB_TERM() { subend = subpointer; SB_CLEAR(); }
--0-566444439-1087811718=:60831--
More information about the krb5-bugs
mailing list