Skip to content

A parameter passed to a call the proofs cannot name is not a proven store: libcurl's setopt_call[i](data, …) was held against a stated lend (#3124) - #3559

Merged
ehartford merged 1 commit into
mainfrom
stored-where
Nov 23, 2026
Merged

ehartford merged 1 commit into
mainfrom
stored-where

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Found while trying libcurl's facts file against the real library (#3124).

setopt_long in libcurl 8.23.0 passes the handle on through a table of function pointers: setopt_call[i](data, option, arg). The scanner recorded a parameter handed to a callee it cannot name as a store, the report said only "stored", and the proofs file (contract-proofs.txt) recorded curl_easy_setopt stores 0. Sema holds a stated contract against that file, so a program's own lend on curl_easy_setopt was refused: "contradicts a proof: the function stores param 0". Nothing was proven: the callee is unknown.

Now:

  • The parameter still counts as kept (an unknown callee may keep it), so nothing becomes safe by this.
  • The report says where it went: retains param 0 (passed to a call through \setopt_call[i]`, which the proofs cannot name)`.
  • The proofs file records no store for it, so it is weaker than a stated grant, as a callee no unit defines already is.

Test: conan_contract_proofs_file_test, a new dispatch case.

With libcurl's facts applied, the one remaining contradiction against the libcurl scenario's own contract is curl_easy_perform, which does store the handle, in the handle's own multi handle. That is the open question of #3124.

Battery green (531 s); self-audit and :release-checks green.

…tore: libcurl's setopt_call[i](data, …) was held against a stated lend (#3124)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant