You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These impls were added in uefi-0.29.0, I missed a safety issue when reviewing the code.
The current impls look like this:
impl<'a>TryFrom<&[u8]>for&'aDevicePath{ ... }
But they should look like this:
impl<'a>TryFrom<&'a[u8]>for&'aDevicePath{ ... }
This wasn't caught by the compiler because internally these impls use unsafe pointer-based code. The missing lifetime means that the &[u8] buffer can be free'd while the &DevicePath still exists, which is UB.
The fix is straightforward, I will put up a PR. I think we should also do a 0.29.1 release since we're not quite ready for a 0.30.0 release yet. EDIT: actually, this is a semver-incompatible change, so it should be a 0.30.0 release. We can branch this off of commit 4e4e190.
After that's merged, I will create a version-0.30 branch off of commit 4e4e190, then open a PR to cherry-pick the fix into that branch. Then I'll put up a release PR for the branch. (This will be the first time I've run the release workflow on a branch other than main, but it should be set up to work on version- branches already.)
These impls were added in uefi-0.29.0, I missed a safety issue when reviewing the code.
The current impls look like this:
But they should look like this:
This wasn't caught by the compiler because internally these impls use
unsafe
pointer-based code. The missing lifetime means that the&[u8]
buffer can be free'd while the&DevicePath
still exists, which is UB.The fix is straightforward, I will put up a PR. I think we should also do a
0.29.1
release since we're not quite ready for a 0.30.0 release yet. EDIT: actually, this is a semver-incompatible change, so it should be a 0.30.0 release. We can branch this off of commit 4e4e190.cc @andre-braga
The text was updated successfully, but these errors were encountered: