Skip to content

Comments

apps/s_socket.c: print only dynamically allocated port in do_server.#5956

Closed
dot-asm wants to merge 1 commit intoopenssl:masterfrom
dot-asm:backward-compatible-accept
Closed

apps/s_socket.c: print only dynamically allocated port in do_server.#5956
dot-asm wants to merge 1 commit intoopenssl:masterfrom
dot-asm:backward-compatible-accept

Conversation

@dot-asm
Copy link
Contributor

@dot-asm dot-asm commented Apr 14, 2018

For formal backward compatibility print original "ACCEPT" message for
fixed port and "ACCEPT host:port" for dynamically allocated.

For formal backward compatibility print original "ACCEPT" message for
fixed port and "ACCEPT host:port" for dynamically allocated.
} else {
(void)BIO_printf(bio_s_out, "ACCEPT\n");
(void)BIO_flush(bio_s_out);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: Since both branches of the condition do BIO_flush, an option would be to bring it down below...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, wait, never mind.

@dot-asm dot-asm closed this Apr 17, 2018
levitte pushed a commit that referenced this pull request Apr 17, 2018
For formal backward compatibility print original "ACCEPT" message for
fixed port and "ACCEPT host:port" for dynamically allocated.

Reviewed-by: Bernd Edlinger <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
(Merged from #5956)
res = NULL;

{
if (BIO_ADDR_rawport(sock_address) == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think BIO_ADDRINFO_free(res) above makes sock_address invalid

Proxy started on port 127.0.0.1:39053
Server command: ../../util/shlib_wrap.sh ../../apps/openssl s_server -max_protocol TLSv1.3 -no_comp -rev -engine ossltest -accept 127.0.0.1:0 -cert ../../apps/server.pem -cert2 ../../apps/server.pem -naccept 1 -cipher AES128-SHA -ciphersuites TLS_AES_128_GCM_SHA256
engine "ossltest" set.
Using default temp DH parameters
==30331==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7f33fc8a46b5 in BIO_ADDR_rawport /home/travis/build/openssl/openssl/crypto/bio/b_addr.c:167:9
    #1 0x59f12c in do_server /home/travis/build/openssl/openssl/apps/s_socket.c:286:9
    #2 0x539ec2 in s_server_main /home/travis/build/openssl/openssl/apps/s_server.c:2109:5
    #3 0x4f8b78 in do_cmd /home/travis/build/openssl/openssl/apps/openssl.c:564:16
    #4 0x4f88b3 in main /home/travis/build/openssl/openssl/apps/openssl.c:183:15
    #5 0x7f33fb8e5f44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44)
    #6 0x43502e in _start (/home/travis/build/openssl/openssl/apps/openssl+0x43502e)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/travis/build/openssl/openssl/crypto/bio/b_addr.c:167:9 in BIO_ADDR_rawport

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#5994. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants