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
pub fn new(address: VirtAddr) -> &'static Self {
let this = unsafe { &*address.as_ptr::<Self>() };
let valid_checksum = this.header.is_valid();
let valid_signature = this.header.signature() == b"RSDT";
assert!(valid_checksum, "rsdp: failed to validate RSDT checksum");
assert!(valid_signature, "rsdp: failed to validate RSDT signature");
this
}
Considering this is a pub function and there is no varify in VirtAddr contruct method, I think this is unsound because the address can be any invalid value and deference it will result in UB.
The text was updated successfully, but these errors were encountered:
Hello, thank you for your contribution in this project. I am scanning unsound problem in rust project and I notice the following code:
aero/src/aero_kernel/src/acpi/rsdp.rs
Line 94 in c5f8114
Considering this is a pub function and there is no varify in
VirtAddr
contruct method, I think this is unsound because the address can be any invalid value and deference it will result in UB.The text was updated successfully, but these errors were encountered: