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

handle of SNI has a problem #5091

Closed
zb564739784 opened this issue Feb 3, 2024 · 1 comment
Closed

handle of SNI has a problem #5091

zb564739784 opened this issue Feb 3, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@zb564739784
Copy link

Questions

serverNameMapping method of io.vertx.core.net.impl.SslChannelProvider Class:

  public AsyncMapping<? super String, ? extends SslContext> serverNameMapping() {
    return (AsyncMapping<String, SslContext>) (serverName, promise) -> {
      workerPool.execute(() -> {
              ···
          int idx = idx(useAlpn);
          SslContext sslContext = sslContextMaps[idx].computeIfAbsent(serverName, s -> sslContextProvider.createServerContext(kmf, trustManagers, s, useAlpn));
          promise.setSuccess(sslContext);
        }
      });
      return promise;
    };

sslContextMaps[idx] add no restrictions based on "serverName",If the client keeps making fake "serverName" it will cause memory leaks in sslContextMaps[idx]

Version

<vertx.version>4.5.1</vertx.version>

@zb564739784 zb564739784 added the bug label Feb 3, 2024
@vietj vietj self-assigned this Feb 4, 2024
@vietj vietj added this to the 4.5.3 milestone Feb 6, 2024
@vietj
Copy link
Member

vietj commented Feb 6, 2024

Thanks, this has been fixed by #5100 that will be released in Vert.x 4.5.3

@vietj vietj closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants