Page MenuHomeFreeBSD

pfsync: NULL check sc before using it
ClosedPublic

Authored by kp on Dec 3 2021, 9:48 AM.
Tags
None
Referenced Files
F158793508: D33240.id99387.diff
Sat, Jun 6, 12:38 AM
Unknown Object (File)
Fri, May 22, 4:07 PM
Unknown Object (File)
Mon, May 11, 7:52 PM
Unknown Object (File)
Mon, May 11, 7:41 PM
Unknown Object (File)
May 2 2026, 11:49 AM
Unknown Object (File)
Apr 30 2026, 7:25 AM
Unknown Object (File)
Apr 25 2026, 5:54 AM
Unknown Object (File)
Apr 25 2026, 3:32 AM

Details

Summary

In pfsync_defer() we must wait to lock sc until we've ensured it's not
NULL.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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

Event Timeline

kp requested review of this revision.Dec 3 2021, 9:48 AM

If it go NULL spontaneously, it can go NULL right after this check before PFSYNC_LOCK(). The patch reduces panic chances significantly, of course.

If it go NULL spontaneously, it can go NULL right after this check before PFSYNC_LOCK(). The patch reduces panic chances significantly, of course.

Not so much spontaneously, but it can happen if a user decides to ifconfig pfsync0 destroy.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 6 2021, 12:25 PM
This revision was automatically updated to reflect the committed changes.