Page MenuHomeFreeBSD

jail: Fix redoing ip restricting
ClosedPublic

Authored by zlei on Feb 20 2023, 3:21 PM.
Tags
None
Referenced Files
F102548754: D38697.diff
Wed, Nov 13, 10:12 PM
Unknown Object (File)
Sat, Nov 2, 9:01 AM
Unknown Object (File)
Mon, Oct 21, 1:15 PM
Unknown Object (File)
Mon, Oct 21, 1:15 PM
Unknown Object (File)
Mon, Oct 21, 1:15 PM
Unknown Object (File)
Mon, Oct 21, 1:02 PM
Unknown Object (File)
Sep 17 2024, 3:36 AM
Unknown Object (File)
Sep 15 2024, 6:58 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 Skipped
Unit
Tests Skipped

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.