Page MenuHomeFreeBSD

Fix harmless locking bug in tcp_fastopen_check_cookie()
ClosedPublic

Authored by pkelsey on Jan 25 2018, 6:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 2:40 PM
Unknown Object (File)
Fri, Sep 26, 8:25 PM
Unknown Object (File)
Wed, Sep 24, 2:12 AM
Unknown Object (File)
Tue, Sep 23, 11:08 AM
Unknown Object (File)
Sun, Sep 21, 10:35 AM
Unknown Object (File)
Sun, Sep 21, 3:54 AM
Unknown Object (File)
Thu, Sep 18, 11:27 PM
Unknown Object (File)
Wed, Sep 17, 6:28 AM
Subscribers

Details

Summary

The keylist lock was not being acquired early enough in tcp_fastopen_check_cookie().

This opens a potential race between keylist updates and generating a cookie to give to a client who has not supplied a valid one, which can result in the effective add time of a new key being slightly later that it would have been otherwise, as viewed by the client. There is no danger here, but it should be fixed.

Test Plan

Found by inspection.

Continued correct TFO server operation can be verified using the tools at https://people.freebsd.org/~pkelsey/tfo-tools/

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable