Exploit database

Vulnerability

CVE-2012-1182

Vulnerability details

Score
10.0
Severity
high

CVSS 2.0 · NVD

Vector string

AV:N/AC:L/Au:N/C:C/I:C/A:C

Description

The RPC code generator in Samba 3.x before 3.4.16, 3.5.x before 3.5.14, and 3.6.x before 3.6.4 does not implement validation of an array length in a manner consistent with validation of array memory allocation, which allows remote attackers to execute arbitrary code via a crafted RPC call.

CVE Program

Exploit source choices

2 sources
Samba SetInformationPolicy AuditEventsInfo Heap Overflow
MSF-linux--samba--setinfopolicy_heapMetasploitLinux,Unix / remote

This module triggers a vulnerability in the LSA RPC service of the Samba daemon because of an error on the PIDL auto-generated code. Making a specially crafted call to SetInformationPolicy to set a PolicyAuditEventsInformation allows to trigger a heap overflow and finally execute arbitrary code with root privileges. The module uses brute force to guess the stackpivot/rop chain or the system() address and redirect flow there in order to bypass NX. The start and stop addresses for brute forcing have been calculated empirically. On the other hand the module provides the StartBrute and StopBrute which allow the user to configure his own addresses.

2012-04-10setinfopolicy_heap.rb