Skip to content

Fix use-after-free in OpenSSL empty cafile warning#22880

Open
iluuu1994 wants to merge 1 commit into
php:masterfrom
iluuu1994:openssl-cafile-error-uaf
Open

Fix use-after-free in OpenSSL empty cafile warning#22880
iluuu1994 wants to merge 1 commit into
php:masterfrom
iluuu1994:openssl-cafile-error-uaf

Conversation

@iluuu1994

Copy link
Copy Markdown
Member

For context:

https://github.com/php/php-src/actions/runs/30059575887/job/89378471139

  ==95682==ERROR: AddressSanitizer: heap-use-after-free on address 0x511000b929c0 at pc 0x55fd3a139556 bp 0x7ffc2810e7b0 sp 0x7ffc2810e7a0
  READ of size 8 at 0x511000b929c0 thread T0
      #0 0x55fd3a139555 in php_stream_error /home/runner/work/php-src/php-src/main/streams/stream_errors.c:625
      #1 0x55fd37419153 in php_openssl_load_stream_cafile /home/runner/work/php-src/php-src/ext/openssl/xp_ssl.c:932
      #2 0x55fd37419c86 in php_openssl_enable_peer_verification /home/runner/work/php-src/php-src/ext/openssl/xp_ssl.c:971
      #3 0x55fd3742ba07 in php_openssl_create_server_ctx /home/runner/work/php-src/php-src/ext/openssl/xp_ssl.c:2479
      #4 0x55fd3742ec22 in php_openssl_setup_crypto /home/runner/work/php-src/php-src/ext/openssl/xp_ssl.c:2651
      #5 0x55fd3743b244 in php_openssl_sockop_set_option /home/runner/work/php-src/php-src/ext/openssl/xp_ssl.c:3511
      #6 0x55fd3a1515e7 in _php_stream_set_option /home/runner/work/php-src/php-src/main/streams/streams.c:1419
      #7 0x55fd3a1613ef in php_stream_xport_crypto_setup /home/runner/work/php-src/php-src/main/streams/transports.c:366
      #8 0x55fd3743bcb3 in php_openssl_sockop_set_option /home/runner/work/php-src/php-src/ext/openssl/xp_ssl.c:3547
      #9 0x55fd3a1515e7 in _php_stream_set_option /home/runner/work/php-src/php-src/main/streams/streams.c:1419
      #10 0x55fd3a1602b9 in php_stream_xport_connect /home/runner/work/php-src/php-src/main/streams/transports.c:247
      #11 0x55fd3a15ebcc in _php_stream_xport_create /home/runner/work/php-src/php-src/main/streams/transports.c:144
      #12 0x55fd3995fa2c in zif_stream_socket_client /home/runner/work/php-src/php-src/ext/standard/streamsfuncs.c:171
      #13 0x55fd3a699bb0 in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER /home/runner/work/php-src/php-src/Zend/zend_vm_execute.h:1767
      #14 0x55fd38b7ed43 in zend_jit_trace_execute /home/runner/work/php-src/php-src/ext/opcache/jit/zend_jit_vm_helpers.c:1070
      #15 0x55fd38e4d681 in zend_jit_trace_hot_root ext/opcache/jit/zend_jit_trace.c:8195
      #16 0x7f6e2a1344f5  (/dev/zero (deleted)+0x100004f5)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant