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
Unknown Object (File)
Thu, Mar 7, 12:29 PM
Unknown Object (File)
Jan 13 2024, 11:31 AM
Unknown Object (File)
Dec 20 2023, 7:05 AM
Unknown Object (File)
Dec 19 2023, 11:42 PM
Unknown Object (File)
Nov 28 2023, 5:36 PM
Unknown Object (File)
Nov 28 2023, 12:27 PM
Unknown Object (File)
Nov 26 2023, 6:06 AM
Unknown Object (File)
Nov 23 2023, 6:19 PM
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