Security context

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

airlift/slice
master @ 95a137d
2
Fixes
1
CVEs
HIGH
Peak severity
Highlights
Insecure Temporary File: 1 prior fix. Scrutinize any change in this area.
src/main/java/io/airlift/slice/Slice.java: most-fixed (2 issues). Treat as high-risk during review.
2 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.

Integer Overflow: Calculating the memory slice sizes using simple multiplication can lead to integer overflows, bypassing boundary checks and causing unexpected behavior. The fix introduced java.lang.Math.multiplyExact to force runtime exceptions during overflow conditions.
Insecure Temporary File: Integer overflows in memory address calculations for large arrays passed to sun.misc.Unsafe can lead to severe out-of-bounds memory access. Safe math wrappers are critical to shield low-level memory operations from overflowed offsets.