Files
Marius Ciepluch 0116f9bea6 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.
2026-09-04 16:45:38 +02:00

41 lines
1.1 KiB
C

/* Provenance: openssl/openssl siv_cipher (fixed).
* repo: openssl/openssl
* commit: 00e2f5eea29994d19293ec4e8c8775ba73678598
* parent: 175fa8469fc78f6cf35dfb87d26899e60e9ff1d4
* commit_url: https://github.com/openssl/openssl/commit/00e2f5eea29994d19293ec4e8c8775ba73678598
* cve: CVE-2023-2975
* license: Apache-2.0
* function: siv_cipher
* relpath: providers/implementations/ciphers/cipher_aes_siv.c
*/
static int siv_cipher(void *vctx, unsigned char *out, size_t *outl,
size_t outsize, const unsigned char *in, size_t inl)
{
PROV_AES_SIV_CTX *ctx = (PROV_AES_SIV_CTX *)vctx;
if (!ossl_prov_is_running())
return 0;
/* Ignore just empty encryption/decryption call and not AAD. */
if (out != NULL) {
if (inl == 0) {
if (outl != NULL)
*outl = 0;
return 1;
}
if (outsize < inl) {
ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
return 0;
}
}
if (ctx->hw->cipher(ctx, out, in, inl) <= 0)
return 0;
if (outl != NULL)
*outl = inl;
return 1;
}