mirror of https://github.com/wolfSSL/wolfBoot.git
The PKCS#11 non-secure-callable veneers deep-copy every NS attribute value and every mechanism parameter into secure-world heap. On key import (C_CreateObject/C_UnwrapKey/C_CopyObject/C_SetAttributeValue carrying CKA_VALUE or the RSA private components) and on password-based derivation (CKM_PKCS5_PBKD2 pPassword) those bounce buffers hold plaintext secrets, but nsc_tmpl_free() and nsc_mech_free() released them with a bare XFREE(), leaving the material in the freed secure heap block until something else happens to overwrite it. Scrub each block with wc_ForceZero() before releasing it. The template values use the prepare-time snapshot length, since wolfPKCS11 rewrites work[].ulValueLen on the C_GetAttributeValue path; nsc_alloc() now records the length of each mechanism allocation for the same reason. Adds unit-pkcs11-nsc-zeroize, which drives C_CreateObject_nsc_call and C_DeriveKey_nsc_call over a secure-heap stand-in that is never cleared, and fails if the imported key or the PBKDF2 password survives the free. |
||
|---|---|---|
| .. | ||
| armclang | ||
| bin-assemble | ||
| check_config | ||
| ci | ||
| delta | ||
| efi | ||
| elf-parser | ||
| fdt-parser | ||
| keytools | ||
| lms | ||
| openocd | ||
| renode | ||
| scripts | ||
| squashelf | ||
| test-expect-version | ||
| test-update-server | ||
| tpm | ||
| uart-flash-server | ||
| unit-tests | ||
| xmss | ||
| config.mk | ||
| test-delta.mk | ||
| test-enc.mk | ||
| test-renode.mk | ||
| test.mk | ||
| wolfboot-rpi-devicetree.diff | ||