Skip to content

Specify affected functions versions instead of "*"#2198

Closed
EliahKagan wants to merge 1 commit into
rustsec:mainfrom
EliahKagan:affected-functions-versions
Closed

Specify affected functions versions instead of "*"#2198
EliahKagan wants to merge 1 commit into
rustsec:mainfrom
EliahKagan:affected-functions-versions

Conversation

@EliahKagan

Copy link
Copy Markdown
Contributor

When including information about affected functions in advisory metadata, I have used "*" in a few advisories when the bounds were no narrower than the bounds for the vulnerability. But specific are still needed or preferred in that situation, as discussed in #2193 (review).

This replaces "*" in those advisories with more specific bounds.

(For #2193 itself, this has already been done in #2195.)

When including information about affected functions in advisory
metadata, I have used `"*"` in a few advisories when the bounds
were no narrower than the bounds for the vulnerability. But
specific are still needed or preferred in that situation.

This replaces `"*"` in those advisories with more specific bounds.
(For rustsec#2193, this has already been done in rustsec#2195.)

See discussion in:
rustsec#2193 (review)
@Shnatsel

Copy link
Copy Markdown
Member

Apparently that works fine with our current tooling, so I guess it's just a matter of format specification.

We used to stick to explicitly specifying the inverse of affected versions, but now that I think of it, it's probably not a good way to do it and we should just change it to something simpler. Maybe allowing = "*" is the way to do it, and explicitly specify that the versions in function specifications can only narrow down the original ranges.

@EliahKagan

Copy link
Copy Markdown
Contributor Author

Is "*" effectively allowed currently, such that it will not cause any problems for tools? (I have no objection to this PR being closed without merging if it is not an improvement.)

@Shnatsel

Copy link
Copy Markdown
Member

I'm not aware of any tools using this metadata currently. There has been some experimentation in osv-scanner, but with Rust not even having a stable, machine-readable function specification syntax, I don't think they ever deployed it.

@EliahKagan

Copy link
Copy Markdown
Contributor Author

In that case, I think I don't really have an opinion on whether this PR should be merged.

By the way, I did figure out what had led me to use * in the first place. I had been attempting to use an == operator in #2015 for a vulnerability that affected exactly one version of a crate (i.e. it was discovered shortly after the change that introduced it), and that operator wasn't supported (45186ec).

@EliahKagan

Copy link
Copy Markdown
Contributor Author

I'll go ahead and close this, since based on the discussion, it seems like it would not necessarily be an improvement. If it turns out to be useful for me to reopen it or make a new PR along these lines, please let me know.

@EliahKagan EliahKagan closed this Jan 22, 2025
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.

2 participants