twizzler-operating-system/twizzler

Add kernel test for Object::verify_id()

Open

#316 opened on Nov 21, 2025

 (2 comments) (0 reactions) (0 assignees)Rust (33 forks)auto 404
buggood first issue

Repository metrics

Stars
 (116 stars)
PR merge metrics
 (PR metrics pending)

Description

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!

Contributor guide