Page MenuHomeFreeBSD

pfsync: NULL check sc before using it
ClosedPublic

Authored by kp on Dec 3 2021, 9:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 25, 5:54 AM
Unknown Object (File)
Sat, Apr 25, 3:32 AM
Unknown Object (File)
Tue, Apr 21, 6:34 PM
Unknown Object (File)
Tue, Apr 21, 6:44 AM
Unknown Object (File)
Tue, Apr 21, 5:21 AM
Unknown Object (File)
Sun, Apr 19, 8:14 PM
Unknown Object (File)
Sat, Apr 18, 6:26 AM
Unknown Object (File)
Sat, Apr 11, 1:55 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43115
Build 40003: arc lint + arc unit

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.