Closed Bug 295879 Opened 20 years ago Closed 18 years ago

PK11_TokenExists doesn't handle null return from SECMOD_GetDefaultModuleListLock [@ NSSRWLock_LockRead]

Categories

(NSS :: Libraries, defect)

3.9.1
x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: timeless, Assigned: julien.pierre)

References

Details

(Keywords: crash)

Crash Data

same steps as in bug 295878, plus 'ignore assertion' which is what would happen
in a release build.
 	nss3.dll!NSSRWLock_LockRead(nssRWLockStr * rwlock=0x00000000)  Line 212 + 0x3	C
 	nss3.dll!SECMOD_GetReadLock(nssRWLockStr * modLock=0x00000000)  Line 71 + 0x9	C
>	nss3.dll!PK11_TokenExists(unsigned long type=0x00001011)  Line 1888 + 0x9	C
 	ssl3.dll!ssl3_config_match_init(sslSocketStr * ss=0x0180d960)  Line 677 + 0x2e	C
 	ssl3.dll!ssl2_ConstructCipherSpecs(sslSocketStr * ss=0x0180d960)  Line 206 + 0x9	C
 	ssl3.dll!ssl2_BeginClientHandshake(sslSocketStr * ss=0x0180d960)  Line 3000
+ 0x9	C
 	ssl3.dll!ssl_Do1stHandshake(sslSocketStr * ss=0x0180d960)  Line 149 + 0xd	C
 	ssl3.dll!ssl_SecureSend(sslSocketStr * ss=0x0180d960, const unsigned char *
buf=0x0180b198, int len=0x000001a8, int flags=0x00000000)  Line 1038 + 0x9	C
 	ssl3.dll!ssl_SecureWrite(sslSocketStr * ss=0x0180d960, const unsigned char *
buf=0x0180b198, int len=0x000001a8)  Line 1072 + 0x13	C
 	ssl3.dll!ssl_Write(PRFileDesc * fd=0x0180ca40, const void * buf=0x0180b198,
int len=0x000001a8)  Line 1310 + 0x15	C
 	pipnss.dll!nsSSLIOLayerWrite(PRFileDesc * fd=0x01832e00, const void *
buf=0x0180b198, int amount=0x000001a8)  Line 1146 + 0x1a	C++
 	nspr4.dll!PR_Write(PRFileDesc * fd=0x01832e00, const void * buf=0x0180b198,
int amount=0x000001a8)  Line 146 + 0x14	C
 	necko.dll!nsSocketOutputStream::Write(const char * buf=0x0180b198, unsigned
int count=0x000001a8, unsigned int * countWritten=0x0128feb8)  Line 549 + 0x12	C++
 	necko.dll!nsHttpConnection::OnReadSegment(const char * buf=0x0180b198,
unsigned int count=0x000001a8, unsigned int * countRead=0x0128feb8)  Line 513
+ 0x26	C++
 	necko.dll!nsHttpTransaction::ReadRequestSegment(nsIInputStream *
stream=0x0180b4d8, void * closure=0x0180aff8, const char * buf=0x0180b198,
unsigned int offset=0x00000000, unsigned int count=0x000001a8, unsigned int *
countRead=0x0128feb8)  Line 353 + 0x1c	C++
 	xpcom_core.dll!nsStringInputStream::ReadSegments(unsigned int (nsIInputStream
*, void *, const char *, unsigned int, unsigned int, unsigned int *)*
writer=0x00fc6800, void * closure=0x0180aff8, unsigned int aCount=0x000001a8,
unsigned int * result=0x0128feb8)  Line 239 + 0x22	C++
 	necko.dll!nsHttpTransaction::ReadSegments(nsAHttpSegmentReader *
reader=0x0180bc60, unsigned int count=0x00001000, unsigned int *
countRead=0x0128feb8)  Line 378 + 0x2b	C++
 	necko.dll!nsHttpConnection::OnSocketWritable()  Line 548 + 0x1e	C++
 	necko.dll!nsHttpConnection::OnOutputStreamReady(nsIAsyncOutputStream *
out=0x0180bf30)  Line 759 + 0xb	C++
 	necko.dll!nsSocketOutputStream::OnSocketReady(unsigned int
condition=0x00000000)  Line 489	C++
 	necko.dll!nsSocketTransport::OnSocketReady(PRFileDesc * fd=0x01832e00, short
outFlags=0x0003)  Line 1449	C++
 	necko.dll!nsSocketTransportService::Run()  Line 576	C++
 	xpcom_core.dll!nsThread::Main(void * arg=0x00dca7c0)  Line 118 + 0x1a	C++
 	nspr4.dll!_PR_NativeRunThread(void * arg=0x00dca8d8)  Line 436 + 0xd	C
 	nspr4.dll!pr_root(void * arg=0x00dca8d8)  Line 116 + 0xd	C
 	msvcr71d.dll!_threadstartex(void * ptd=0x00dec0c8)  Line 241 + 0xd	C
 	kernel32.dll!_BaseThreadStart@8()  + 0x37
PK11_TokenExists failed to notice that the value returned by 
SECMOD_GetDefaultModuleListLock() was NULL.
That value was NULL because NSS has not been succesfully initialized by the 
caller before invoking this code.  Invoking SSL/NSS code without first 
initializing NSS is a programming error on the part of the caller of SSL/NSS.  
QA Contact: jason.m.reid → libraries
I agree with Nelson's assessment. Marking INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Assignee: wtc → julien.pierre.boogz
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → INVALID
Crash Signature: [@ NSSRWLock_LockRead]
You need to log in before you can comment on or make changes to this bug.