Installation directory rights allows all
Originally disclosed on Mozilla
- Fixed in 4 days
- Paid in 7 days
- Disclosed after 4 days
Date: Mon, 25 Feb 2013 10:47:20 +0900
From: Shuichiro Suzuki <[address removed]>
To: [address removed]
Subject: Security Bug in Firefox for Mobile(Android)
-----//-----
Dear Sir/Madam
Hi. I'm a security researcher in Fourteenforty Research Institute in Japan.
I found a security related bug in Firefox for Android and report it here.
Abstract:
The installation of the Firefox for Android (FFA) makes app_tmp directory
world readable and writable(777).
With this configuration other applications(might be a malcode) can replace
any addons installed through FFA. This leads installing mal-addons without
any awareness from users.
Scenario:
A user installs an android app (which is actually malware) and run it.
Then the user tries to install a legitimate addon from Mozilla Addons site(https://addons.mozilla.org).
FFA download the addon into temporary directory(app_tmp dir) and keep it there and show dialog to ask if
the user really installs it.
At this point the malware running background can replace the addon in the temporary directory since the app_tmp directory permission is 777.
When the user tap on "yes" on the dialog FFA installs the replaced addon with the name of the original(downloaded) addon's name.
Since addons for FFA has a great power of stealing any data in the browser this may leads security problem.
Technical Detail:
The main problem here is that the app_tmp directory's permission is 777.
I do not know how this directory is used but this can be 700 (Since it seems that other apps do not need to know what is in the dir)
And also you should ensure that downloaded and installed addons are the same thing.
Others:
Android has a class "FileObserver" which notifies an application when a file or directory content is changed.
The malware can use this class with path "/data/data/org.mozilla.firefox/app_tmp". This enables the malware
to replace the addon downloaded by FFA just after download is finished and just before the user tap on "yes" button on the installation dialog.
The malware do not need any special permission.
This may not a problem in Windows platform since its security model is different from Android one.
In Windows any software other than Firefox may be able to replace any addons within the same user's context.
Since security concept of the Android is different from Windows's one I consider this as a security problem.
Best regards,
Shuichiro Suzuki
Fourteenforty Research Institute
[address removed]
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 medium-severity security bug in General. Mozilla made it public on 1 March 2013 as CVE-2013-0798.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.