Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork175
uefi: Fix lifetimes in device_path TryFrom<&[u8]> impls#1282
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The missing lifetime means that the &[u8] buffer could be freed while the&DevicePath still exists, which is UB.
de79cd7
toa9e48c2
CompareShouldn't miri catch this? Ah, I guess there are no unit tests for this functionality? |
nicholasbishop commentedAug 1, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There are some tests. But since miri is a runtime checker, not a static analyzer, it would only catch it if you modified the test to drop the source buffer early. (And we don't want to modify the tests to do that, because then the code wouldn't compile with the fix.) |
a457110
Uh oh!
There was an error while loading.Please reload this page.
This release contains a cherry-pick ofrust-osdev#1282.
The missing lifetime means that the &[u8] buffer could be freed while the &DevicePath still exists, which is UB.
Bug:#1281
Checklist