Add kernel test for Object::verify_id()
#316 aperta il 21 nov 2025
Metriche repository
- Star
- (116 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
in src/kernel/obj/id.rs around line 80, there is a function called verfy_id
that is supposed to take the metadata of the object and calculate the object id.
We have noticed that if one were to take a raw pointer to the metadata after an object has been created, and then modifies it, the function still generates the same id.
This is testable by creating an object, modifying its default permissions, and then calling this function. The expected behavior is that the ID should not be verified.
Fix this issue by writing a test that catches this, and bonus points if you can fix it!