Last Comment Bug 387011 - Crash when importing certificate [@ nsNSSCertificateDB::ImportCertsFromFile]
: Crash when importing certificate [@ nsNSSCertificateDB::ImportCertsFromFile]
Status: VERIFIED FIXED
: crash, verified1.8.0.13, verified1.8.1.8
Product: Core
Classification: Components
Component: Security: PSM (show other bugs)
: 1.8 Branch
: x86 Linux
: -- critical (vote)
: ---
Assigned To: Kai Engert (:kaie)
:
Mentors:
https://bugs.launchpad.net/ubuntu/+so...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-05 12:18 PDT by Marco Rodrigues
Modified: 2011-06-09 14:58 PDT (History)
7 users (show)
dveditz: wanted1.8.1.x+
dveditz: wanted1.8.0.x+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (765 bytes, patch)
2007-07-11 21:54 PDT, Kai Engert (:kaie)
rrelyea: review+
dveditz: approval1.8.1.8+
dveditz: approval1.8.0.13+
Details | Diff | Review

Description Marco Rodrigues 2007-07-05 12:18:00 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)
Build Identifier: 2.0

Open certificate cause crash

I tried to import a certificate manually and clicked on open location at gnome desktop and put "http://www.clustercube.com/clustercube.com.crt" this file there, a working certificate file trough web url and it crashed.

Reproducible: Always

Steps to Reproduce:
v1.5.*
1. open thunderbird
2. go to Edit > Preferences > Privacy > Security
3. Click on view certificates
4. Click on other peoples
5. import
6. when nautilus opens click the icon in top left (location icon)
7. add http://www.clustercube.com/clustercube.com.crt in the location URL spot
8. click OPEN
9. watch thunderbird crash.

---

v2.0
1. open thunderbird
2. go to Edit > Preferences > Advanced > Security
3. Click on view certificates
4. Click on other peoples
5. import
6. when nautilus opens click the icon in top left (location icon)
7. add http://www.clustercube.com/clustercube.com.crt in the location URL spot
8. click OPEN
9. watch thunderbird crash.
Actual Results:  
Crash

Expected Results:  
Don't crash

More information on Launchpad.net bug report.
Comment 1 Adam Guthrie 2007-07-05 13:12:36 PDT
It appears that a NULL file is getting passed into nsNSSCertificateDB::ImportCertsFromFile.

#3 <signal handler called>
#4 nsNSSCertificateDB::ImportCertsFromFile (this=0x8f0d0c8, aToken=0x0,
#5 XPTC_InvokeByIndex () at xptcinvoke_gcc_x86_unix.cpp:50
#6 XPCWrappedNative::CallMethod (ccx=@0xbff2915c,
#7 XPC_WN_CallMethod (cx=0x8f7f660, obj=0x8ec5d70, argc=3,
#8 js_Invoke (cx=0x8f7f660, argc=3, flags=0) at jsinterp.c:1187
#9 js_Interpret (cx=0x8f7f660, pc=0x8e08b53 ":",
#0 __kernel_vsyscall ()

#4  nsNSSCertificateDB::ImportCertsFromFile (this=0x8f0d0c8, aToken=0x0, 
    aFile=0x0, aType=4) at nsNSSCertificateDB.cpp:1028
	rv = <value optimized out>
	fd = (PRFileDesc *) 0x0
	file_info = {type = 3220344488, size = -1209059669, 
  creationTime = 68854785104, modifyTime = -4615469847035080500}
	bytes_obtained = <value optimized out>
Comment 2 Adam Guthrie 2007-07-05 13:32:05 PDT
This bug might actually be in the GTK filepicker widget code... it seems like it should error out if the file it gets is NULL. On the other hand, it seems like the NSS function should check for a non-NULL file argument.
Comment 3 John Vivirito 2007-07-05 14:01:03 PDT
Launchpad bug #80964
https://bugs.launchpad.net/ubuntu/+source/mozilla-thunderbird/+bug/80964

This is reproducible 100% of time.
Comment 4 Kai Engert (:kaie) 2007-07-11 21:54:57 PDT
Created attachment 271961 [details] [diff] [review]
Patch v1

Bob, can you please review this crash fix?
Comment 5 Robert Relyea 2007-07-20 16:17:39 PDT
Comment on attachment 271961 [details] [diff] [review]
Patch v1

r+=rrelyea
Comment 6 Kai Engert (:kaie) 2007-07-23 03:49:06 PDT
fixed in cvs head
Comment 7 Kai Engert (:kaie) 2007-07-23 03:49:42 PDT
Comment on attachment 271961 [details] [diff] [review]
Patch v1

requesting branch approval for trivial crash fix
Comment 8 Daniel Veditz [:dveditz] 2007-08-06 12:37:35 PDT
Not blockers, but we'll look at the approvals
Comment 9 Daniel Veditz [:dveditz] 2007-08-06 12:39:37 PDT
Comment on attachment 271961 [details] [diff] [review]
Patch v1

approved for 1.8.1.7 and 1.8.0.13, a=dveditz for release-drivers
Comment 10 Kai Engert (:kaie) 2007-08-06 16:41:40 PDT
fixed1.8.0.13, fixed1.8.1.7
Comment 11 Al Billings [:abillings] 2007-08-21 17:57:57 PDT
Verified in 1.8.0.13 Thunderbird RC1 candidate (2007080917) on Ubuntu. 
Comment 12 Carsten Book [:Tomcat] 2007-09-03 15:43:09 PDT
verified fixed 1.8.1.7 using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.7pre) Gecko/20070903 Thunderbird/2.0.0.7pre ID:2007090303 on Ubuntu

no crash on the steps to reproduce -> adding verified keyword

Note You need to log in before you can comment on or make changes to this bug.