twizzler-operating-system/twizzler

Add kernel test for Object::verify_id()

开放

#316 创建于 2025年11月21日

 (2 条评论) (0 个反应) (0 位负责人)Rust (33 个派生)auto 404
buggood first issue

仓库指标

星标
 (116 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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!

贡献者指南