Closed Bug 419489 Opened 16 years ago Closed 14 years ago

Some files opened by Firefox remain open in helper application process

Categories

(Firefox :: File Handling, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 147659

People

(Reporter: petr.pisar, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4pre) Gecko/2008022404 Minefield/3.0b4pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4pre) Gecko/2008022404 Minefield/3.0b4pre

Process of helper application started from firefox inherits some opened files from Firefox. This improper behaviour is sign of poor programing practice, it eats system resources, makes problems with file system operations (e.g. umounting FS) and it can lead to security problems in some scenarios.



Reproducible: Always

Steps to Reproduce:
1. Open file in Firefox using some helper application
2. List opened files of process running the helper application
3. Compare this list with opened files of helper application started from shell
Actual Results:  
Following files has been recognized as inherited from parent process:

--- xpdf_standalone.lsof.files  2008-02-25 19:00:39.000000000 +0100
+++ xpdf_under_firefox.lsof.files       2008-02-25 19:00:27.000000000 +0100
@@ -1,2 +1,16 @@
 
+/home/petr/.mozilla/firefox/4bms6nj4.gpdata/Cache/_CACHE_MAP_
+/home/petr/.mozilla/firefox/4bms6nj4.gpdata/Cache/_CACHE_001_
+/home/petr/.mozilla/firefox/4bms6nj4.gpdata/Cache/_CACHE_002_
+/home/petr/.mozilla/firefox/4bms6nj4.gpdata/Cache/_CACHE_003_
+/home/petr/.mozilla/firefox/4bms6nj4.gpdata/.parentlock
+/home/petr/.mozilla/firefox/4bms6nj4.gpdata/XUL.mfasl
+inotify
+/tmp/firefox-2008-02-10/extensions/inspector@mozilla.org/chrome/inspector.jar
+/tmp/firefox-2008-02-10/chrome/browser.jar
+/tmp/firefox-2008-02-10/chrome/classic.jar
+/tmp/firefox-2008-02-10/chrome/en-US.jar
+/tmp/firefox-2008-02-10/chrome/reporter.jar
+/tmp/firefox-2008-02-10/chrome/toolkit.jar
 /tmp/Lukas_Helebrandt_Spacecraft_computers_development.pdf
+/usr/lib/nsbrowser/plugins/vrml.jar

You can see cache files or lock file from user profile, chrome files from firefox installation and manually loaded libraries (plugins).

Expected Results:  
All files opened by firefox should be closed on exec.

Consult execve(2) and fcntl(2), especially FDCLO_EXEC and O_CLOEXEC constants.
Summary: Some files opened by Firefox remains opened after executing helper application → Some files opened by Firefox remain open in helper application process
Group: security
Whiteboard: DUPEME
Still presents in trunk Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a2pre) Gecko/20100216 Minefield/3.7a2pre.
Duplicate of bug 372734 or bug 147659?
Definitely.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.