Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 680373 Details for
Bug 896651
PEM module trashes private keys if login fails
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to only replace the encrypted data with decrypted data after it's vetted
notrash.patch (text/plain), 1.69 KB, created by
Nalin Dahyabhai
on 2013-01-17 16:55:54 UTC
(
hide
)
Description:
patch to only replace the encrypted data with decrypted data after it's vetted
Filename:
MIME Type:
Creator:
Nalin Dahyabhai
Created:
2013-01-17 16:55:54 UTC
Size:
1.69 KB
patch
obsolete
>--- mozilla/security/nss/lib/ckfw/pem/psession.c >+++ mozilla/security/nss/lib/ckfw/pem/psession.c >@@ -230,6 +230,7 @@ pem_mdSession_Login > unsigned int len = 0; > NSSLOWKEYPrivateKey *lpk = NULL; > PLArenaPool *arena; >+ SECItem plain; > int i; > > fwSlot = NSSCKFWToken_GetFWSlot(fwToken); >@@ -306,23 +321,31 @@ pem_mdSession_Login > lpk->keyType = NSSLOWKEYRSAKey; > prepare_low_rsa_priv_key_for_asn1(lpk); > >- nss_ZFreeIf(io->u.key.key.privateKey->data); >- io->u.key.key.privateKey->len = len - output[len - 1]; >- io->u.key.key.privateKey->data = >- (void *) nss_ZAlloc(NULL, io->u.key.key.privateKey->len); >- memcpy(io->u.key.key.privateKey->data, output, len - output[len - 1]); >+ if (output[len - 1] > 8) { >+ rv = CKR_GENERAL_ERROR; >+ /* goto loser; */ >+ } > > /* Decode the resulting blob and see if it is a decodable DER that fits > * our private key template. If so we declare success and move on. If not > * then we return an error. > */ >+ memset(&plain, 0, sizeof(plain)); >+ plain.data = output; >+ plain.len = len - output[len - 1]; > rv = SEC_QuickDERDecodeItem(arena, lpk, pem_RSAPrivateKeyTemplate, >- io->u.key.key.privateKey); >+ &plain); > pem_DestroyPrivateKey(lpk); > arena = NULL; > if (rv != SECSuccess) > goto loser; > >+ nss_ZFreeIf(io->u.key.key.privateKey->data); >+ io->u.key.key.privateKey->len = len - output[len - 1]; >+ io->u.key.key.privateKey->data = >+ (void *) nss_ZAlloc(NULL, io->u.key.key.privateKey->len); >+ memcpy(io->u.key.key.privateKey->data, output, len - output[len - 1]); >+ > rv = CKR_OK; > > loser:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 896651
:
680373
|
696984