Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

freenet/freenet-core
main @ 78e13fa
58
Fixes
0
CVEs
HIGH
Peak severity
40.0%
Coverage
Highlights
Denial of Service: 27 prior fixes. Scrutinize any change in this area.
crates/core/src/client_events/websocket.rs: most-fixed (4 issues). Treat as high-risk during review.
24 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Use After Free: WASM guest-host boundary functions generated by macros were wrapping raw pointers in owning Box containers. This caused premature memory deallocation on drop, leading to classic use-after-free conditions. This was resolved by borrowing references instead of reclaiming ownership.
Sandbox Escape: WebAssembly host APIs accepted raw pointers and offsets directly from guest modules without checking bounds against active memory allocations, allowing guest environments to access out-of-bounds host process memory.
Auth Bypass: The runtime processed delegated contract updates and transactions without strictly verifying caller identity. Attackers could spoof contract origins by bypassing origin attestation on delegate-to-delegate paths. This required the implementation of explicit message origin verification gates.