mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-22 06:29: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,31 @@
|
||||
/* Provenance: openssl/openssl chacha20_poly1305_cipher (fixed).
|
||||
* repo: openssl/openssl
|
||||
* commit: 119ab9555dc62275bbd71f6f49529b1a44feba42
|
||||
* parent: 39488cb863074d5b8ece833905f7ad2b357d44fe
|
||||
* commit_url: https://github.com/openssl/openssl/commit/119ab9555dc62275bbd71f6f49529b1a44feba42
|
||||
* cve: CVE-2026-75803
|
||||
* license: Apache-2.0
|
||||
* function: chacha20_poly1305_cipher
|
||||
* relpath: providers/implementations/ciphers/cipher_chacha20_poly1305.c
|
||||
*/
|
||||
|
||||
static int chacha20_poly1305_cipher(void *vctx, unsigned char *out,
|
||||
size_t *outl, size_t outsize,
|
||||
const unsigned char *in, size_t inl)
|
||||
{
|
||||
PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
|
||||
PROV_CIPHER_HW_CHACHA20_POLY1305 *hw = (PROV_CIPHER_HW_CHACHA20_POLY1305 *)ctx->hw;
|
||||
|
||||
if (!ossl_prov_is_running())
|
||||
return 0;
|
||||
|
||||
if (outsize < inl) {
|
||||
ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!hw->aead_cipher(ctx, out, outl, in, inl))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Provenance: openssl/openssl chacha20_poly1305_cipher (vuln).
|
||||
* repo: openssl/openssl
|
||||
* commit: 39488cb863074d5b8ece833905f7ad2b357d44fe
|
||||
* parent: 39488cb863074d5b8ece833905f7ad2b357d44fe
|
||||
* commit_url: https://github.com/openssl/openssl/commit/119ab9555dc62275bbd71f6f49529b1a44feba42
|
||||
* cve: CVE-2026-75803
|
||||
* license: Apache-2.0
|
||||
* function: chacha20_poly1305_cipher
|
||||
* relpath: providers/implementations/ciphers/cipher_chacha20_poly1305.c
|
||||
*/
|
||||
|
||||
static int chacha20_poly1305_cipher(void *vctx, unsigned char *out,
|
||||
size_t *outl, size_t outsize,
|
||||
const unsigned char *in, size_t inl)
|
||||
{
|
||||
PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
|
||||
PROV_CIPHER_HW_CHACHA20_POLY1305 *hw = (PROV_CIPHER_HW_CHACHA20_POLY1305 *)ctx->hw;
|
||||
|
||||
if (!ossl_prov_is_running())
|
||||
return 0;
|
||||
|
||||
if (inl == 0) {
|
||||
*outl = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (outsize < inl) {
|
||||
ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!hw->aead_cipher(ctx, out, outl, in, inl))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user