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

5-mailbugs.txt

5-mailbugs.txt
Posted Dec 20, 1999
Authored by Michal Zalewski

Five new vulnerabilities have been found in Berkeley Sendmail and 'procmail'.

tags | exploit, vulnerability
SHA-256 | 739a99c27c891bd518989d4459effe5d7dbae8f49924a28318fe663f8c8dbe7b

5-mailbugs.txt

Change Mirror Download
This mail discusses five
interesting vulnerabilities in Berkeley Sendmail and 'procmail' utility, I
think it's good to let you know - but don't panic - at least for now, we
are too lazy and we have no idea if any of these holes can be exploited -
that's why I'm sending it to VULN-DEV as well, to give some ideas to
young, brilliant hackers around :)

1. procmail

Months ago, we found a problem with LINEBUF variable defined in
.procmailrc files. By setting arbitrary values of it - eg. negative or
extremely large ones - we're able to at least overwrite memory locations
with zero value (used to properly terminate string buffer, unfortunately
there's no range checking on signed int arithmetic in C ;). Actually, it
splits in two vulnerabilities:

a) On some glibc 2.0 machines (eg. RedHat), malloc(negative_integer) won't
result in EINVAL, but with valid pointer, for which malloc_usable_size()
returns size of 12 bytes. Heap overflows possible? Hmm, at least SEGVs in
procmail :)

b) With glibc 2.0/2.1, there's also some way to overwrite mem with '\0'
due to lack of range checking and signed<->unsigned integer conversion.
Nasty memory hacking required to exploit it.

2. Sendmail

Another time, quite old vulnerabilities, but, as we haven't reported it
till now, hopefully present in newest releases as well:

a) Sendmail (tested with 8.9.3 and previous) allows you to put mail
addressed to eg. '|/bin/sh' (or any file) into mail queue. Fortunately,
this queue file should contain also line like 'Croot' to be processed
properly, while we have no idea how to put it there. But, anyway,
seems to be dangerous - Sendmail should reject such crap immediately:

/usr/sbin/sendmail -O 'DeliveryMode=d' '""|/bin/sh'

(without these double-quotes, it _will_ immediately drop your message)

b) Into queue files (qf*), Sendmail stores internal delivery information,
user-supplied headers (Hxxx) and server-added headers (H?x?xxx). These
headers are handled in several different ways, depending on letter
between '?' - but, in general, are used to store default values for
other headers (like 'Date:' and 'Return-Path:'). But, headers like:

?D?My-Own-Header: junk

are allowed in messages, and are put in unchanged form into queue
files, allowing possible conflicts or MTA confusion :P For example,
header '???This-Causes-Error: test' causes odd error messages during
message processing. What does it mean? Probably nothing dangerous,
but I haven't spend enough time investigating this issue to be
sure, maybe it's some way to cause undesirable MTA behaviour.

c) Sendmail won't put X-Authentication-Warning header (eg. about
protocol violations, suspected options etc) into message if there's
one already present - no matter how stupid it is. Minor bug.


_______________________________________________________________________
Michal Zalewski [lcamtuf@ids.pl] [link / marchew] [dione.ids.pl SYSADM]
[Marchew Industries] ! [http://lcamtuf.na.export.pl] bash$ :(){ :|:&};:
[voice phone: +48 22 813 25 86] <=-=> [cellular phone: +48 501 4000 69]
Iterowac jest rzecza ludzka, wykonywac rekursywnie - boska [P. Deutsch]


Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close