mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-21 22:19:29 +00:00
feat(real-world-vfc-slice): add labeled OpenSSL/Firefox/Chromium/curl pair corpus
Harvest 176 isolated vuln-vs-fix functions (109 CVEs, 352 training rows) into benchmarks/pairs/vfc with provenance and a JSONL training manifest. Score the slice as an honesty dashboard (ousast pairs --slice vfc); keep the pair gate on the local fixtures only.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
/* Provenance: openssl/openssl SMIME_write_PKCS7 (fixed).
|
||||
* repo: openssl/openssl
|
||||
* commit: 09df4395b5071217b76dc7d3d2e630eb8c5a79c2
|
||||
* parent: 6c70934a46eaa1734c2efbe9d7baac51c607062e
|
||||
* commit_url: https://github.com/openssl/openssl/commit/09df4395b5071217b76dc7d3d2e630eb8c5a79c2
|
||||
* cve: CVE-2024-0727
|
||||
* license: Apache-2.0
|
||||
* function: SMIME_write_PKCS7
|
||||
* relpath: crypto/pkcs7/pk7_mime.c
|
||||
*/
|
||||
|
||||
int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
|
||||
{
|
||||
STACK_OF(X509_ALGOR) *mdalgs;
|
||||
int ctype_nid = OBJ_obj2nid(p7->type);
|
||||
const PKCS7_CTX *ctx = ossl_pkcs7_get0_ctx(p7);
|
||||
|
||||
if (ctype_nid == NID_pkcs7_signed) {
|
||||
if (p7->d.sign == NULL)
|
||||
return 0;
|
||||
mdalgs = p7->d.sign->md_algs;
|
||||
} else {
|
||||
mdalgs = NULL;
|
||||
}
|
||||
|
||||
flags ^= SMIME_OLDMIME;
|
||||
|
||||
return SMIME_write_ASN1_ex(bio, (ASN1_VALUE *)p7, data, flags, ctype_nid,
|
||||
NID_undef, mdalgs, ASN1_ITEM_rptr(PKCS7),
|
||||
ossl_pkcs7_ctx_get0_libctx(ctx),
|
||||
ossl_pkcs7_ctx_get0_propq(ctx));
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Provenance: openssl/openssl SMIME_write_PKCS7 (vuln).
|
||||
* repo: openssl/openssl
|
||||
* commit: 6c70934a46eaa1734c2efbe9d7baac51c607062e
|
||||
* parent: 6c70934a46eaa1734c2efbe9d7baac51c607062e
|
||||
* commit_url: https://github.com/openssl/openssl/commit/09df4395b5071217b76dc7d3d2e630eb8c5a79c2
|
||||
* cve: CVE-2024-0727
|
||||
* license: Apache-2.0
|
||||
* function: SMIME_write_PKCS7
|
||||
* relpath: crypto/pkcs7/pk7_mime.c
|
||||
*/
|
||||
|
||||
int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
|
||||
{
|
||||
STACK_OF(X509_ALGOR) *mdalgs;
|
||||
int ctype_nid = OBJ_obj2nid(p7->type);
|
||||
const PKCS7_CTX *ctx = ossl_pkcs7_get0_ctx(p7);
|
||||
|
||||
if (ctype_nid == NID_pkcs7_signed)
|
||||
mdalgs = p7->d.sign->md_algs;
|
||||
else
|
||||
mdalgs = NULL;
|
||||
|
||||
flags ^= SMIME_OLDMIME;
|
||||
|
||||
return SMIME_write_ASN1_ex(bio, (ASN1_VALUE *)p7, data, flags, ctype_nid,
|
||||
NID_undef, mdalgs, ASN1_ITEM_rptr(PKCS7),
|
||||
ossl_pkcs7_ctx_get0_libctx(ctx),
|
||||
ossl_pkcs7_ctx_get0_propq(ctx));
|
||||
}
|
||||
Reference in New Issue
Block a user