Page MenuHomeFreeBSD

pfsync: NULL check sc before using it
ClosedPublic

Authored by kp on Dec 3 2021, 9:48 AM.
Tags
None
Referenced Files
F171427570: D33240.diff
Fri, Sep 11, 2:15 AM
F171418265: D33240.diff
Fri, Sep 11, 12:53 AM
F171358052: D33240.id.diff
Thu, Sep 10, 4:01 PM
Unknown Object (File)
Sun, Sep 6, 1:45 AM
Unknown Object (File)
Sat, Sep 5, 2:19 PM
Unknown Object (File)
Sat, Sep 5, 2:07 AM
Unknown Object (File)
Fri, Sep 4, 11:58 PM
Unknown Object (File)
Thu, Sep 3, 10:18 PM

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.