Closed Bug 1807600 Opened 3 years ago Closed 1 year ago

Thunderbird crashes [@ _invalid_parameter ] when smart card inserted

Categories

(Thunderbird :: Security, defect)

Thunderbird 102
x86_64
Windows 10
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: nevenr, Unassigned)

Details

(Keywords: crash)

Crash Data

Hi,

I registered security device, smart card, as PKCS#11 module (proper dll is loaded) and I logged in successfully. Afterwards I was successful with signing/encrypting/decrypting sent/received emails.

Now if smart card is removed from reader and other smart card (different type) is inserted Thunderbird crashes. Even restarts fails until second card is still inserted in reader.

I believe root cause is in PKCS#11 module but Thunderbird should handle it differently.

Crash report is submitted with comment.

#osIntegration #encryption #security

Thanks.

Regards,
Neven.

nevenr,
Please post your crash IDs into this bug report from https://support.mozilla.org/en-US/kb/mozilla-crash-reporter-tb#w_viewing-crash-reports

Flags: needinfo?(nevenr)
Crash Signature: [@ netsetpkcs11_x64.dll | free ]
Component: General → Security
Keywords: crash

Are you still crashing?
Might this be related to bug 1675742 ?

Flags: needinfo?(nevenr)

Hi,

Still the same behavior with TB 115.8.1 (64-bit).

https://crash-stats.mozilla.org/report/index/48e16057-9924-47ef-aadf-9eb740240314

Regards,
N.

Flags: needinfo?(nevenr)

Thanks for the additional information.

(In reply to nevenr from comment #4)

https://crash-stats.mozilla.org/report/index/48e16057-9924-47ef-aadf-9eb740240314

Crash report: https://crash-stats.mozilla.org/report/index/48e16057-9924-47ef-aadf-9eb740240314

Reason: STATUS_INVALID_CRUNTIME_PARAMETER

Top 10 frames of crashing thread:

0  msvcr90.dll  _invalid_parameter  f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c:115
1  msvcr90.dll  _invalid_parameter_noinfo  f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c:125
2  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x508c5  
3  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x55bfc  
4  msvcp90.dll  std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >  f:\dd\vctools\crt_bld\self_64_amd64\crt\src\xstring:916
5  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x314e0  
6  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x14f51f  
7  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x14f51f  
8  WinSCard.dll  <unknown in WinSCard.dll>  
9  WinSCard.dll  <unknown in WinSCard.dll>  
Crash Signature: [@ netsetpkcs11_x64.dll | free ] → [@ netsetpkcs11_x64.dll | free ] [@ _invalid_parameter]

now everything just comes up Crash Reason STATUS_INVALID_PARAMETER

nevenr, do you still crash?

Flags: needinfo?(nevenr)

(In reply to Wayne Mery (:wsmwk) from comment #6)

now everything just comes up Crash Reason STATUS_INVALID_PARAMETER

nevenr, do you still crash?

Hi Mery,
Yes, still with TB 128.9.2esr behavior is the same, when card is changed TB crashes ....
Regards,
N.

Flags: needinfo?(nevenr)

What is your crash ID please?

(In reply to Wayne Mery (:wsmwk) from comment #8)

What is your crash ID please?
Hi,

Here you are:

Regards,
N.

Excellent, thanks. All three are same as the previously cited signature @ _invalid_parameter

Crash report: https://crash-stats.mozilla.org/report/index/3af7204a-79b5-44ab-ba1c-488eb0250422

Reason:

STATUS_INVALID_CRUNTIME_PARAMETER

Top 10 frames:

0  msvcr90.dll  _invalid_parameter(wchar_t const*, wchar_t const*, wchar_t const*, unsigned i...  f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c:115
1  msvcr90.dll  _invalid_parameter_noinfo()  f:\dd\vctools\crt_bld\self_64_amd64\crt\src\invarg.c:125
2  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x508c5
3  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x55bfc
4  msvcp90.dll  std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>...  f:\dd\vctools\crt_bld\self_64_amd64\crt\src\xstring:916
5  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x314e0
6  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x14f51f
7  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x14f51f
8  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x15043f
9  netsetpkcs11_x64.dll  netsetpkcs11_x64.dll@0x14f51f
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Thunderbird crashes when smart card inserted → Thunderbird crashes [@ _invalid_parameter ] when smart card inserted

You are crashing in a third party software module, a pkcs#11 driver.
This is outside of the scope of Thunderbird.
Please report the issue to the provider of the module netsetpkcs11_x64.dll

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID

(In reply to Kai Engert [:KaiE:] from comment #11)

You are crashing in a third party software module, a pkcs#11 driver.
This is outside of the scope of Thunderbird.
Please report the issue to the provider of the module netsetpkcs11_x64.dll

Hi,
As you can see in the initial report I suspected that from beginning.
I though that TB should handle such issues differently, like report issue and continue working without that module or something similar.
Anyway thanks.
Regards,
N.

We currently don't have isolation of third party pkcs#11 modules.
If that module crashes, it will crash the whole application.
That means we cannot handle that automatically in a better way.
It would require more indirection layers.

The way it's currently designed is that pkcs#11 drivers directly interact at the C level, and if they function incorrectly and crash, there's nothing really we can do.

Hi Kai,

Thanks for clarification.

All the best,
N.

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