Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls::server does not wait for the future returned by data_sink::close() and data_source::close() to resolve #799

Open
tgrabiec opened this issue Sep 22, 2020 · 0 comments · May be fixed by #2547

Comments

@tgrabiec
Copy link
Contributor

Not a problem with the current posix stack, because implementations return ready futures, but it's a violation of the API and can break in the future resulting in use-after-free.

@nyh nyh added the TLS label May 24, 2021
p12tic added a commit to p12tic/seastar that referenced this issue Nov 22, 2024
Fixes scylladb#799

data_{source,sink}::close() return a future. If it is not ready on
close() return, then the current tls session close() may result in use
after free.

Converting close_after_shutdown() to a coroutine and sequentially
co_awaiting on close() addresses this issue. The waiting is done
sequentially, as this is shutdown path anyway.
p12tic added a commit to p12tic/seastar that referenced this issue Nov 22, 2024
Fixes scylladb#799

data_{source,sink}::close() return a future. If it is not ready on
close() return, then the current tls session close() may result in use
after free.

Converting close_after_shutdown() to a coroutine and sequentially
co_awaiting on close() addresses this issue. The waiting is done
sequentially, as this is shutdown path anyway.
@p12tic p12tic linked a pull request Nov 22, 2024 that will close this issue
p12tic added a commit to p12tic/seastar that referenced this issue Nov 22, 2024
Fixes scylladb#799

data_{source,sink}::close() return a future. If it is not ready on
close() return, then the current tls session close() may result in use
after free.

Converting close_after_shutdown() to a coroutine and sequentially
co_awaiting on close() addresses this issue. The waiting is done
sequentially, as this is shutdown path anyway.
p12tic added a commit to p12tic/seastar that referenced this issue Nov 24, 2024
Fixes scylladb#799

data_{source,sink}::close() return a future. If it is not ready on
close() return, then the current tls session close() may result in use
after free.

Converting close_after_shutdown() to a coroutine and sequentially
co_awaiting on close() addresses this issue. The waiting is done
sequentially, as this is shutdown path anyway.
p12tic added a commit to p12tic/seastar that referenced this issue Nov 24, 2024
Fixes scylladb#799

data_{source,sink}::close() return a future. If it is not ready on
close() return, then the current tls session close() may result in use
after free.

Converting close_after_shutdown() to a coroutine and sequentially
co_awaiting on close() addresses this issue. The waiting is done
sequentially, as this is shutdown path anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants