certs: add explicit validation to SM2 SPKI test utility#10463
certs: add explicit validation to SM2 SPKI test utility#10463orbisai0security wants to merge 1 commit into
Conversation
Automated security fix generated by Orbis Security AI
|
Can one of the admins verify this patch? |
|
Hi @orbisai0security I do not see you on the approved contributor list. Can you tell us more about your project and use of wolfssl? Also more about how you found this? This script is only used for generation of test certificates. Please reconsider the tone of your description and please take the time to only report meaningful reports. Also for real issues those should be sent to support at wolfssl dot com. |
|
Hey @dgarske I’m working on an internal AppSec research project that evaluates whether automated static-analysis + LLM-assisted review can identify real security-relevant defects in open-source C/C++ and supporting tooling. wolfSSL came up in that research because of its security-sensitive domain, not because we are currently using this specific ESP-IDF bundle-generation script in production. For this PR specifically, the existing subprocess.run([...]) call does not use shell=True, so this is not a practical CWE-78 command-injection issue as described. The more accurate characterisation is minor defensive hardening around a test-certificate utility: explicit DER validation instead of assert, basic input-file checks, and making subprocess behaviour explicit. I also understand this script is only used for test certificate generation, so I agree this should not have been presented as a high-severity production security issue. More broadly, the goal of the project is to improve the signal quality of automated security contributions. This is useful feedback: future reports should include a concrete affected code path, reproducible impact, and a clear explanation of whether the change is a security fix versus defensive hardening. |
Summary
This is a small defensive cleanup for
certs/sm2/fix_sm2_spki.py.Changes:
assert cert_der[0] == 0x30with an explicitValueError, so validation is preserved even when Python assertions are disabled.This is not intended to claim a production security vulnerability. The original subprocess call already used an argument list and did not use
shell=True; this patch is only minor hardening/cleanup for a test certificate generation utility.Changes
certs/sm2/fix_sm2_spki.pyVerification
Automated security fix by OrbisAI Security