twizzler-operating-system/twizzler
Add kernel test for Object::verify_id()
オープン
#316 opened on 2025/11/21
buggood first issue
Repository metrics
- Stars
- (116 個のスター)
- PR merge metrics
- (PR metrics pending)
説明
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!