Page MenuHomeFreeBSD

vm_phys_avail_count(): Fix out-of-bounds accesses
ClosedPublic

Authored by olce on Jan 23 2025, 5:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 13, 3:46 PM
Unknown Object (File)
Sun, Apr 13, 8:42 AM
Unknown Object (File)
Sun, Apr 13, 12:54 AM
Unknown Object (File)
Sun, Apr 13, 12:34 AM
Unknown Object (File)
Sat, Apr 12, 11:10 PM
Unknown Object (File)
Tue, Apr 8, 6:03 PM
Unknown Object (File)
Mar 17 2025, 12:46 AM
Unknown Object (File)
Mar 6 2025, 3:21 AM
Subscribers

Details

Summary

On improper termination of phys_avail[] (two consecutive 0 starting at
an even index), this function would (unnecessarily) continue searching
for the termination markers even if the index was out of bounds.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 61928
Build 58812: arc lint + arc unit

Event Timeline

olce requested review of this revision.Jan 23 2025, 5:15 PM
sys/vm/vm_phys.c
1784
olce marked an inline comment as done.

Fix spacing.

This revision is now accepted and ready to land.Feb 18 2025, 8:05 PM