Page MenuHomeFreeBSD

Fix harmless locking bug in tcp_fastopen_check_cookie()

Authored by pkelsey on Jan 25 2018, 6:12 AM.



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

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pkelsey created this revision.Jan 25 2018, 6:12 AM
tuexen accepted this revision.Jan 25 2018, 9:40 AM
This revision is now accepted and ready to land.Jan 25 2018, 9:40 AM
This revision was automatically updated to reflect the committed changes.