mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-21 14:09:27 +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,44 @@
|
||||
/* Provenance: curl/curl mev_forget_socket (fixed).
|
||||
* repo: curl/curl
|
||||
* commit: e9a2b0dc72dd3a9aa3a5210e89079a3b719475dc
|
||||
* parent: f746780a1e548b4b93790b58d70c3b22fde5360d
|
||||
* commit_url: https://github.com/curl/curl/commit/e9a2b0dc72dd3a9aa3a5210e89079a3b719475dc
|
||||
* cve: CVE-2026-9080
|
||||
* license: curl
|
||||
* function: mev_forget_socket
|
||||
* relpath: lib/multi_ev.c
|
||||
*/
|
||||
|
||||
static CURLMcode mev_forget_socket(struct Curl_multi *multi,
|
||||
struct Curl_easy *data,
|
||||
curl_socket_t s,
|
||||
const char *cause)
|
||||
{
|
||||
struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
|
||||
int rc = 0;
|
||||
|
||||
if(!entry) /* we never knew or already forgot about this socket */
|
||||
return CURLM_OK;
|
||||
|
||||
/* We managed this socket before, tell the socket callback to forget it. */
|
||||
if(entry->announced && multi->socket_cb) {
|
||||
NOVERBOSE((void)cause);
|
||||
CURL_TRC_M(data, "ev %s, call(fd=%" FMT_SOCKET_T ", ev=REMOVE)", cause, s);
|
||||
mev_in_callback(multi, TRUE);
|
||||
rc = multi->socket_cb(data, s, CURL_POLL_REMOVE,
|
||||
multi->socket_userp, entry->user_data);
|
||||
mev_in_callback(multi, FALSE);
|
||||
/* curl_easy_pause() is documented as callable from any callback; it
|
||||
* re-enters mev_assess() which may free this 'entry'. Re-fetch. */
|
||||
entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
|
||||
if(entry)
|
||||
entry->announced = FALSE;
|
||||
}
|
||||
|
||||
mev_sh_entry_kill(multi, s);
|
||||
if(rc == -1) {
|
||||
multi->dead = TRUE;
|
||||
return CURLM_ABORTED_BY_CALLBACK;
|
||||
}
|
||||
return CURLM_OK;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/* Provenance: curl/curl mev_forget_socket (vuln).
|
||||
* repo: curl/curl
|
||||
* commit: f746780a1e548b4b93790b58d70c3b22fde5360d
|
||||
* parent: f746780a1e548b4b93790b58d70c3b22fde5360d
|
||||
* commit_url: https://github.com/curl/curl/commit/e9a2b0dc72dd3a9aa3a5210e89079a3b719475dc
|
||||
* cve: CVE-2026-9080
|
||||
* license: curl
|
||||
* function: mev_forget_socket
|
||||
* relpath: lib/multi_ev.c
|
||||
*/
|
||||
|
||||
static CURLMcode mev_forget_socket(struct Curl_multi *multi,
|
||||
struct Curl_easy *data,
|
||||
curl_socket_t s,
|
||||
const char *cause)
|
||||
{
|
||||
struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
|
||||
int rc = 0;
|
||||
|
||||
if(!entry) /* we never knew or already forgot about this socket */
|
||||
return CURLM_OK;
|
||||
|
||||
/* We managed this socket before, tell the socket callback to forget it. */
|
||||
if(entry->announced && multi->socket_cb) {
|
||||
NOVERBOSE((void)cause);
|
||||
CURL_TRC_M(data, "ev %s, call(fd=%" FMT_SOCKET_T ", ev=REMOVE)", cause, s);
|
||||
mev_in_callback(multi, TRUE);
|
||||
rc = multi->socket_cb(data, s, CURL_POLL_REMOVE,
|
||||
multi->socket_userp, entry->user_data);
|
||||
mev_in_callback(multi, FALSE);
|
||||
entry->announced = FALSE;
|
||||
}
|
||||
|
||||
mev_sh_entry_kill(multi, s);
|
||||
if(rc == -1) {
|
||||
multi->dead = TRUE;
|
||||
return CURLM_ABORTED_BY_CALLBACK;
|
||||
}
|
||||
return CURLM_OK;
|
||||
}
|
||||
Reference in New Issue
Block a user