exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ksrt.006.deliver

ksrt.006.deliver
Posted Sep 23, 1999

ksrt.006.deliver

SHA-256 | f66578e27fcc6cd9bfebb0c395ec6170b9e1d4b90b3314afa8d923c00eae571c

ksrt.006.deliver

Change Mirror Download

From ksrt@DEC.NET Fri Jan 16 10:16:23 1998
From: "KSR[T]" <ksrt@DEC.NET>
To: BUGTRAQ@NETSPACE.ORG
Date: Mon, 12 Jan 1998 08:48:26 -0800
Subject: KSR[T] Advisory #6: deliver

-----
KSR[T] Website : http://www.dec.net/ksrt
E-mail: ksrt@dec.net
-----

KSR[T] Advisory #006
Date: Jan 14, 1998
ID #: lin-dlvr-007

Operating System(s): Linux ( Debian 1.3.1, Slackware 2.x )

Affected Program: deliver

Problem Description: deliver ( version 2.0.12 and below ) is a program
that delivers mail once it has arrived at a given
system.

In the function copy_message(), there is a stack
overwrite that can allow local users execute arbitrary
code as root.

From copymsg.c:

int
copy_message()
{
char buf[BUFSIZ];
:
:
b = (fgets(buf, GETSIZE(buf), stdin) ? TRUE : FALSE);
:
from_line = copystr(buf);
:
:
(void) strcpy(from_line, buf);
(void) strcpy(buf, "Invalid-UUCP-From: ");
(void) strcat(buf, from_line);

If, in the above, buf contains size BUFSIZ amount
of data, we can overwrite 19 bytes ( the size of
"Invalid-UUCP-From: " ) past buf. Unfortunately, that
is enough to overwrite the return stack frame.


Compromise: Users with an account on the machine can gain
root access. Under certain situations this might
be exploitable remotely.

Patch/Fix:

----------------
For Debian users
----------------

Please find the appropriate packages at these places:

For the stable release

ftp://ftp.debian.org/debian/bo-updates/deliver_2.1.13-0_i386.deb
until it's merged into the stable release, "-updates" have to be
left out then.

Until the file has been merged it can be grabbed from a mirror of the
incoming directory, e.g. at

ftp://llug.sep.bnl.gov/pub/debian/Incoming/deliver_2.1.13-0_i386.deb

For the unstable release:

ftp://ftp.debian.org/debian/hamm/hamm/binary-<arch>/mail/deliver_2.1.13-1_i386.deb

Where <arch> is one of i386, m68k, powerpc, sparc or alpha.

Until the file has been merged it can be grabbed from a mirror of the
incoming directory, e.g. at

ftp://llug.sep.bnl.gov/pub/debian/Incoming/deliver_2.1.13-1_i386.deb

------------
Source Patch
------------

-*- begin deliver patch -*-
diff -u deliver/copymsg.c deliver.new/copymsg.c
--- deliver/copymsg.c Mon Dec 7 14:48:44 1992
+++ deliver.new/copymsg.c Tue Dec 9 02:13:53 1997
@@ -36,6 +36,8 @@
#define ISFROM(p) ((p)[0] == 'F' && (p)[1] == 'r' && (p)[2] == 'o' \
&& (p)[3] == 'm' && (p)[4] == ' ')

+#define INVUUCP "Invalid-UUCP-From: "
+
/*----------------------------------------------------------------------
* Copy the message on the standard input to two temp files:
* one for the header and one for the body.
@@ -162,8 +164,9 @@
/* Print invalid From_ line in a harmless way. */

(void) strcpy(from_line, buf);
- (void) strcpy(buf, "Invalid-UUCP-From: ");
- (void) strcat(buf, from_line);
+ (void) strcpy(buf, INVUUCP);
+ (void) strncat(buf, from_line, BUFSIZ - strlen(INVUUCP));
+ buf[BUFSIZ-1] = '\0';
b = TRUE;
}
}
Common subdirectories: deliver/samples and deliver.new/samples
diff -u deliver/unctime.y deliver.new/unctime.y
--- deliver/unctime.y Mon Dec 7 14:48:56 1992
+++ deliver.new/unctime.y Tue Dec 9 02:49:34 1997
@@ -232,7 +232,7 @@
yylex()
{
register i;
- char token[40]; /* Probably paranoid. */
+ char token[BUFSIZ]; /* Probably paranoid. */

for (;;)
{
@@ -243,7 +243,7 @@
else if (isascii(*lexptr) && isalpha(*lexptr))
{
i = 0;
- while (isascii(*lexptr) && isalpha(*lexptr))
+ while (isascii(*lexptr) && isalpha(*lexptr) && i < BUFSIZ)
token[i++] = *lexptr++;
token[i] = '\0';
for (i = 0; months[i]; i++)
@@ -287,7 +287,7 @@
else if (isascii(*lexptr) && isdigit(*lexptr))
{
i = 0;
- while (isascii(*lexptr) && isdigit(*lexptr))
+ while (isascii(*lexptr) && isdigit(*lexptr) && i < BUFSIZ )
token[i++] = *lexptr++;
token[i] = '\0';
yylval = atoi(token);
-*- end deliver patch -*-
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close