mlDsaPubTemplate is missing a CKA_ENCAPSULATE entry.
Categories
(NSS :: Libraries, defect, P3)
Tracking
(nss 3.123)
| Tracking | Status | |
|---|---|---|
| nss | --- | 3.123 |
People
(Reporter: jallison, Assigned: rrelyea)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Steps to reproduce:
A colleague of mine at CIQ (Sultan Alsawaf) was browsing the code and noticed that git commit ref 38f93bdca:
is missing a CKA_ENCAPSULATE entry in the mlDsaPubTemplate array.
Patch is attached to this bug report.
Comment 1•6 months ago
|
||
@Bob, can you have a look at this?
| Assignee | ||
Updated•6 months ago
|
Updated•6 months ago
|
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Comment 2•5 months ago
|
||
testing a patch now, but there isn't an overflow issue here because ml-dsa doesn't set encapsulate, and currently we only turn on the encapsulate or decapsulate attributes if they are set to true (so that 'old', meaning pretty much any token older than 6 month) won't blow up because they don't understand these attributes. The patch I'm working on will assert if we overflow our buffer.
| Assignee | ||
Comment 3•5 months ago
|
||
- add CKA_ENCAPSULATE to the mlDsaPubTemplate.
- cadd code to detect runtime template overflows.
This is basically a sanity check. CKA_ENACAPSULATE isn't added to an mlDsa key because currently we only add CKA_ENCAPSULATE when we set it to true because the attribute is new for PKCS #11 3.2, so most tokens won't understand it. mlDsa will have the attribute set to false because it's a signing key, we never actually added it to the template. Putting it in, and expecially, checking that we haven't overrun out key template will guard against when we decide to include CKA_ENCAPSULATE unconditionally.
Pushed by rrelyea@redhat.com:
https://hg.mozilla.org/projects/nss/rev/b7d5810fc18b
mlDsaPubTemplate is missing a CKA_ENCAPSULATE entry.
Updated•3 months ago
|
Description
•