J-Security Center

Title: Fetchmail POP3 Reply Signed Integer Index Vulnerability

Severity: HIGH

Description:

Fetchmail is a unix utility for downloading email from mail servers via POP3.

Fetchmail contains a vulnerability that may allow for remote attackers to gain access to client systems. The vulnerability has to do with the use of a remotely supplied signed integer as the index to an array when writing data to memory.

After issuing the LIST command, the client recieves email numbers and sizes. Fetchmail converts both string representations to signed integers and stores them in an array. The message number is used as the index to the array when storing the message size.

'buf' is server output:

else if (sscanf(buf, "%d %d", &num, &size) == 2)
sizes[num - 1] = size;

It is possible to write outside of the array by suppling a negative message number. Since the value written to the location is remotely supplied as well, attackers can use this vulnerability to overwrite almost any double word they wish to with an arbitrary value.

It is be possible for attackers to overwrite critical variables in memory with arbitrary values if the target client's POP3 server can be impersonated. Successful exploitation can lead to the exectution of arbitrary code on the client host.

Affected Products:

  • Caldera OpenLinux Server 3.1.0
  • Caldera OpenLinux Server 3.1.1
  • Caldera OpenLinux Workstation 3.1.0
  • Caldera OpenLinux Workstation 3.1.1
  • Cobalt Qube 3.0.0
  • Debian Linux 2.2.0
  • Debian Linux 2.2.0 68k
  • Debian Linux 2.2.0 IA-32
  • Debian Linux 2.2.0 alpha
  • Debian Linux 2.2.0 arm
  • Debian Linux 2.2.0 powerpc
  • Debian Linux 2.2.0 sparc
  • EnGarde Secure Linux 1.0.1
  • Eric Raymond Fetchmail 5.0.0
  • Eric Raymond Fetchmail 5.1.0
  • Eric Raymond Fetchmail 5.2.0
  • Eric Raymond Fetchmail 5.3.0
  • Eric Raymond Fetchmail 5.3.1
  • Eric Raymond Fetchmail 5.3.2
  • Eric Raymond Fetchmail 5.3.3
  • Eric Raymond Fetchmail 5.3.4
  • Eric Raymond Fetchmail 5.3.5
  • Eric Raymond Fetchmail 5.3.6
  • Eric Raymond Fetchmail 5.3.7
  • Eric Raymond Fetchmail 5.3.8
  • Eric Raymond Fetchmail 5.4.0 .0
  • Eric Raymond Fetchmail 5.4.1
  • Eric Raymond Fetchmail 5.4.2
  • Eric Raymond Fetchmail 5.4.3
  • Eric Raymond Fetchmail 5.4.4
  • Eric Raymond Fetchmail 5.4.5
  • Eric Raymond Fetchmail 5.5.0
  • Eric Raymond Fetchmail 5.5.1
  • Eric Raymond Fetchmail 5.5.2
  • Eric Raymond Fetchmail 5.5.3
  • Eric Raymond Fetchmail 5.5.4
  • Eric Raymond Fetchmail 5.5.5
  • Eric Raymond Fetchmail 5.5.6
  • Eric Raymond Fetchmail 5.6.0
  • Eric Raymond Fetchmail 5.6.1
  • Eric Raymond Fetchmail 5.6.2
  • Eric Raymond Fetchmail 5.6.3
  • Eric Raymond Fetchmail 5.6.4
  • Eric Raymond Fetchmail 5.6.5
  • Eric Raymond Fetchmail 5.6.6
  • Eric Raymond Fetchmail 5.6.7
  • Eric Raymond Fetchmail 5.6.8
  • Eric Raymond Fetchmail 5.7.0
  • Eric Raymond Fetchmail 5.7.1
  • Eric Raymond Fetchmail 5.7.2
  • Eric Raymond Fetchmail 5.7.3
  • Eric Raymond Fetchmail 5.7.4
  • Eric Raymond Fetchmail 5.8.0 .0
  • Eric Raymond Fetchmail 5.8.1
  • Eric Raymond Fetchmail 5.8.10
  • Eric Raymond Fetchmail 5.8.11
  • Eric Raymond Fetchmail 5.8.12
  • Eric Raymond Fetchmail 5.8.13
  • Eric Raymond Fetchmail 5.8.14
  • Eric Raymond Fetchmail 5.8.15
  • Eric Raymond Fetchmail 5.8.16
  • Eric Raymond Fetchmail 5.8.2
  • Eric Raymond Fetchmail 5.8.3
  • Eric Raymond Fetchmail 5.8.4
  • Eric Raymond Fetchmail 5.8.5
  • Eric Raymond Fetchmail 5.8.6
  • Eric Raymond Fetchmail 5.8.7
  • Eric Raymond Fetchmail 5.8.8
  • Eric Raymond Fetchmail 5.8.9
  • S.u.S.E. Linux 7.1.0
  • S.u.S.E. Linux 7.1.0 alpha
  • S.u.S.E. Linux 7.1.0 ppc
  • S.u.S.E. Linux 7.1.0 sparc
  • S.u.S.E. Linux 7.1.0 x86
  • S.u.S.E. Linux 7.2.0

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.