CRITICAL F003 from NETWORKING-AND-DRIVERS-CODE-ASSESSMENT-2026-07-27.md
§3.1: netstack/src/scheme/mod.rs had 2 unsafe File::from_raw_fd sites
with redundant 'as RawFd' casts. The audit flagged these as:
- 'The cast chain nf.into_raw() as RawFd goes through i32 → u32 → i32
via RawFd, which is a truncation on some platforms'
- The SAFETY comments were generic boilerplate ('caller must verify
the safety contract') rather than documenting the actual invariant
Fix: remove the redundant 'as RawFd' cast — File::from_raw_fd
already accepts the RawFd type that IntoRawFd::into_raw returns.
Also replace the generic boilerplate SAFETY comments with specific
invariants:
- 'caller guarantees nf is a live Fd not aliased elsewhere;
from_raw_fd transfers ownership to the new File'
- 'caller guarantees time_file is a live Fd not aliased elsewhere;
from_raw_fd transfers ownership to the new File'
The 'as RawFd' cast was a no-op on platforms where RawFd = i32, but
was still misleading (suggests a conversion is happening when it
isn't). Removing it clarifies the code.
CRITICAL progress: 13 of 13 original findings now addressed (F001,
F1.6, F1.1, F2, F3, DEF-P0-6, DEF-P0-7, F18/F18b, F20, F21, F3.1,
F22, P001).
Base
Repository containing various system daemons, that are considered fundamental for the OS.
You can see what each component does in the following list:
- audiod : Daemon used to process the sound drivers audio
- bootstrap : First code that the kernel executes, responsible for spawning the init daemon
- daemon : Redox daemon library
- drivers
- init : Daemon used to start most system components and programs
- initfs : Filesystem with the necessary system components to run RedoxFS
- ipcd : Daemon used for inter-process communication
- logd : Daemon used to log system components and daemons
- netstack : Daemon used for networking
- ptyd : Daemon used for pseudo-terminal
- ramfs : RAM filesystem
- randd : Daemon used for random number generation
- zerod : Daemon used to discard all writes and fill read buffers with zero
How To Contribute
To learn how to contribute you need to read the following document:
If you want to contribute to drivers read its README
Development
To learn how to do development with these system components inside the Redox build system you need to read the Build System and Coding and Building pages.
How To Build
It is recommended to build this system component via the Redox build system, you can learn how to do it on the Building Redox page.
To build and test outside the build system, install redoxer then use check.sh script to build or test:
./check.sh- Check build for x86_64./check.sh --arch=ARCH- Check build for specific ARCH (aarch64,i586,riscv64gc)./check.sh --all- Check build for all ARCH./check.sh --test- Check the base system boots up on x86_64
You can also use make install to inspect the content on ./sysroot, or make test-gui to test booting with orbital interactively.