Page MenuHomeFreeBSD

[unix(4) cleanup 8/8] Fix a double connect race.
AbandonedPublic

Authored by markj on Sep 2 2020, 5:01 PM.
Tags
None
Referenced Files
F175310022: D26301.id76547.diff
Fri, Oct 9, 8:52 PM
Unknown Object (File)
Fri, Oct 9, 7:41 AM
Unknown Object (File)
Sun, Sep 27, 1:33 AM
Unknown Object (File)
Thu, Sep 17, 4:14 PM
Unknown Object (File)
Thu, Sep 10, 7:24 PM
Unknown Object (File)
Sep 5 2026, 5:55 AM
Unknown Object (File)
Sep 5 2026, 2:43 AM
Unknown Object (File)
Sep 4 2026, 8:58 AM
Subscribers

Details

Reviewers
None
Summary

dgram sockets may be connected multiple times. If connect() is called
on a connected dgram socket, soconnectat() calls sodisconnect() before
creating the new connection. However, this is not synchronized, so two
concurrent connect() calls can race with each other, and uipc_connect()
does not handle it. Add an explicit check for unp_conn != NULL in
unp_connectat().

Reported by: syzkaller

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33333
Build 30644: arc lint + arc unit