J-Security Center

Title: Apple Mac OS X MallocStackLogging Local Arbitrary File Modification Vulnerability

Severity: HIGH

Description:

Apple Mac OS X contains extensive debugging support for the 'malloc()' heap memory allocator. By setting specific environment variables, users can alter the functionality of the 'malloc()' library to aid them in debugging software.

Mac OS X is susceptible to a local arbitrary file modification vulnerability. This issue is due to insecure file handling in the 'malloc()' library for setuid applications.

This issue occurs due to insufficient checks in the memory allocation library, leading to local users being able to utilize the debugging features on setuid applications.

Attackers use the debugging features by setting the 'MallocLogFile' variable to the name of an arbitrary file. Other debugging environment variables are then set to alter what the memory allocation library logs to the attacker-specified file. The attacker then executes a setuid-superuser application. This results in the file pointed to in the 'MallocLogFile' variable to be created or appended to with superuser privileges.

A local attacker could exploit this vulnerability to create, or append data to arbitrary files with superuser privileges. Depending on the purpose of the modified files, this may cause system crashes, or allow attackers to gain elevated privileges.

This issue was first described in BID 14914, but has been split into its own record due to further information availability.

Affected Products:

  • Apple Mac OS X 10.3.0
  • Apple Mac OS X 10.3.1
  • Apple Mac OS X 10.3.2
  • Apple Mac OS X 10.3.3
  • Apple Mac OS X 10.3.4
  • Apple Mac OS X 10.3.5
  • Apple Mac OS X 10.3.6
  • Apple Mac OS X 10.3.7
  • Apple Mac OS X 10.3.8
  • Apple Mac OS X 10.3.9
  • Apple Mac OS X 10.4.0
  • Apple Mac OS X 10.4.1
  • Apple Mac OS X 10.4.2
  • Apple Mac OS X Server 10.3.0
  • Apple Mac OS X Server 10.3.1
  • Apple Mac OS X Server 10.3.2
  • Apple Mac OS X Server 10.3.3
  • Apple Mac OS X Server 10.3.4
  • Apple Mac OS X Server 10.3.5
  • Apple Mac OS X Server 10.3.6
  • Apple Mac OS X Server 10.3.7
  • Apple Mac OS X Server 10.3.8
  • Apple Mac OS X Server 10.3.9
  • Apple Mac OS X Server 10.4.0
  • Apple Mac OS X Server 10.4.1
  • Apple Mac OS X Server 10.4.2

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.