Skip to content
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

Unsoundness in Pleco crates #2146

Open
lwz23 opened this issue Nov 27, 2024 · 0 comments
Open

Unsoundness in Pleco crates #2146

lwz23 opened this issue Nov 27, 2024 · 0 comments

Comments

@lwz23
Copy link

lwz23 commented Nov 27, 2024

In pleco_engine, the insert_score_depth and insert_score functions use unsafe operations to access an index and modify fields of RootMove. We have noticed that if an invalid index is passed, it can lead to Undefined Behavior (UB). Specifically, the function get_unchecked_mut does not check the validity of the index, so passing an invalid index may cause memory corruption or crashes.
see pleco-rs/Pleco#163 for detail.

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

No branches or pull requests

1 participant