Page MenuHomeFreeBSD

jail: Fix redoing ip restricting
ClosedPublic

Authored by zlei on Feb 20 2023, 3:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 7, 11:18 AM
Unknown Object (File)
Feb 20 2025, 2:34 AM
Unknown Object (File)
Feb 4 2025, 3:38 PM
Unknown Object (File)
Feb 4 2025, 9:58 AM
Unknown Object (File)
Jan 25 2025, 3:04 PM
Unknown Object (File)
Jan 25 2025, 12:23 PM
Unknown Object (File)
Jan 10 2025, 5:31 PM
Unknown Object (File)
Jan 7 2025, 2:19 AM
Subscribers

Details

Summary

prison_ip_restrict() is called in loop FOREACH_PRISON_DESCENDANT_LOCKED. While under low memory, it is still possible that subsequent round prison_ip_restrict() succeed and redo_ip[4,6] flip over from true to false, thus leave some prisons's IPv[4,6] addresses unrestricted.

Fixes: 8bce8d28abe6 jail: Avoid multipurpose return value of function prison_ip_restrict()

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Feb 20 2023, 3:21 PM

This makes perfect sense to me. The original version only set redo_ip[46] provisionally , and I missed that the patch changed that.

This revision is now accepted and ready to land.Feb 20 2023, 7:14 PM
This revision was automatically updated to reflect the committed changes.