what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Vpopmail / QmailAdmin Integer Overflows

Vpopmail / QmailAdmin Integer Overflows
Posted May 10, 2009
Authored by Jacobo Avariento Gimeno

Vpopmail and QmailAdmin are prone to several integer overflows related to quotas.

tags | advisory, overflow
SHA-256 | 3ae67e29f30c5c88ee23c1b3fb7614eee4d7c2f24fb9d30828dae15db1d02410

Vpopmail / QmailAdmin Integer Overflows

Change Mirror Download

Author: Jacobo Avariento Gimeno (Sofistic S.L.)
Contact: [jacobo [at] sofistic.net]
Release Date: May 8, 2009
CVE/bugtraq id: Not assigned yet
Severity: Low/Medium


Vendor's Description of Software:
-------------------------------------------------------------------------------------
„Vpopmail is a free GPL package developed by Inter7 to provide an easy
way to manage virtual email domains and non /etc/passwd email accounts
for qmail or postfix mail servers.“ [1]

„qmailAdmin is a free software package that provides a web interface
for managing a qmail system with virtual domains.“ [2]



Description of Vulnerability:
-------------------------------------------------------------------------------------
Vpopmail and QmailAdmin are prone to several Integer Overflows due that
numeric types of more range are needed to store user's quota nowadays.
Using an integer is not enough because gets overflowed when the user
has more than 2 Gigabytes in his/her mailbox, furthermore a long
integer is neither the solution because a long integer has the same
range than an integer in 32-bits machines.



Vulnerable versions:
-------------------------------------------------------------------------------------
*ALL*



Analysis of the vulnerable code:
-------------------------------------------------------------------------------------
There are several functions/files to fix in vpopmail and qmailadmin:

* vpopmail-5.5.0: quota.c, function quota_percent
* vpopmail-5.5.0: vuserinfo.c, function display_user
* qmailadmin-1.2.12: function quota_to_megabytes
* qmailadmin-1.2.12: function maildirquota.c, wrapreaduserquota,
readdomainquota, readuserquota
* …

In general, any variable that holds user's quota.



Proof of Concept:
-------------------------------------------------------------------------------------
Just try to set more than 2GB quota to a user ("./vsetuserquota
user@domain $((3*1024*1024*1024))") and see with ("./vuserinfo
user@domain") that the user's quota usage is always 100%, or with
qmailadmin the quota never grows, gets stalled at 2048 MB.

Put more than 2 GB of data in a mailbox and see that the quota
overflows, i.e. -1114.49 / unlimited.



Solution:
-------------------------------------------------------------------------------------
There are no official patches yet, all the sysadmins that use
vpopmail/qmailadmin should be aware of this because vendor gave me no
date to release a new version or patch.

To fix that, no "int" neither "long" neither "off_t" should be used,
using a "long long int" the problem is just fixed until the near
future :) Also, casting is neither a solution when the variable was
already overflowed as in newest version (vpopmail 5.5.0: maildirquota.c
line 294).



Disclosure Timeline:
-------------------------------------------------------------------------------------
* 20/Apr/2009: Vendor is first time notified.
* 20/Apr/2009: Vendor responses that was already fixed in 5.5 branch.
* 23/Apr/2009: Vendor is notified again that the problem was not fixed.
* 23/Apr/2009: Vendor responses that there is no qmailadmin version
compatible with 5.5 branch yet.
* 29/Apr/2009: Vendor is asked when they are planning to release patch
or new version and no response was received.
* 8/May/2009: Public Disclosure of the vulnerability.



References:
-------------------------------------------------------------------------------------
[1] https://www.inter7.com/index.php?page=vpopmail
[2] https://www.inter7.com/index.php?page=qmailadmin



This advisory was also published at
https://www.sofistic.net/advisories/0901


--
Jacobo Avariento Gimeno
IT Security Department @ Sofistic
Your security, our concern!
https://sofistic.net


"En los momentos débiles, las acciones más fuertes"
Login or Register to add favorites

File Archive:

November 2024

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