Skip to content

Add advisory for unsound problem in wasmtime_jit_debug #1999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

safe4u
Copy link

@safe4u safe4u commented Jul 6, 2024

A soundness bug in wasmtime_jit_debug that wrongly marks the function dump_code_load_record as 'safe'.
The issue report: bytecodealliance/wasmtime#8905

@kornelski
Copy link
Contributor

It looks like it's been patched in v27

bytecodealliance/wasmtime@b5e31a5

can you mark it as patched in the advisory?

Copy link
Contributor

@kornelski kornelski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be updated with the patched version

@safe4u
Copy link
Author

safe4u commented Feb 15, 2025

Needs to be updated with the patched version

Done. Thanks for your correction.

@solomoncyj
Copy link
Contributor

pr is stil not merged. can a maintainer pleser merger it?

@djc
Copy link
Contributor

djc commented May 28, 2025

@alexcrichton any feedback on this one?

@alexcrichton
Copy link
Contributor

Personally, if acceptable, I'd prefer not to merge this. I think this was good to flag on our issue tracker and fix, but it's an internal crate to the project which we've documented users should not use. We have a number of wasmtime-* crates which are internal implementation details not intended for external consumption, and this is likely not the only issue with them. The advisories at least we on Wasmtime worry about are those reachable from public APIs we recommend users use (e.g. the wasmtime crate itself) and we would not accept security advisories for internal crates unless Wasmtime, through the public API, can trigger undefined behavior or such. Effectively while this was a good fix I don't believe this actually poses any risk to users. Anyone using the wasmtime crate itself would not have been exposed to this issue and no one should be using the wasmtime_jit_debug crate directly.

Now how exactly that falls under the advisory db here I'm not sure. We would ideally lint/etc that users shouldn't directly depend on these internal crates (and we could probably do a better job of messaging in Wasmtime as well), but doing so through advisories feels like something we should figure out in Wasmtime better rather than here.

Is it reasonable to ask this not be merged? If it's still desired to be merged I'd ask that we on Wasmtime have a moment to sort out how exactly to best discourage users from using internal crates before this is merged.

Also, as a side note, this advisory says <= 24.0.0 is affected while >= 24.0.0 is patched, meaning that 24.0.0 is simultaneously affected and patched. I believe the affected versions should be < 24.0.0 instead.

@djc
Copy link
Contributor

djc commented May 30, 2025

Is it reasonable to ask this not be merged? If it's still desired to be merged I'd ask that we on Wasmtime have a moment to sort out how exactly to best discourage users from using internal crates before this is merged.

Given the purpose of internal-only usage, we can definitely delay merging this so you can figure out messaging/mitigation.

In my mind, if the crate is published to crates.io as a library that someone could potentially use, then issues with public, safe API should be fair game for advisories... Maybe it could make sense to guard the contents of the crate with an __internals feature and/or doc(hidden) flags?

@Shnatsel, @tarcieri, @alex any thoughts?

@alex
Copy link
Member

alex commented May 30, 2025

I think I agree with that.

@alexcrichton
Copy link
Contributor

Sounds reasonable! I've got an agenda item for our upcoming meeting next Thursday. I'll post here with a response after that

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.

6 participants