httpd 因 /usr/lib64/httpd/modules/mod_ssl.so 中的 ssl_io_filter_cleanup () 而崩溃

httpd 因 /usr/lib64/httpd/modules/mod_ssl.so 中的 ssl_io_filter_cleanup () 而崩溃

版本:httpd-2.4.54-1.el8.x86_64

当我为某个任务执行 httpd condrestart 时生成核心,并且我还可以看到一些与核心文件 pid 相关的 ssl_error_logs。

gdb 日志:

Core was generated by `/usr/sbin/httpd -k start'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f0b9ffa05e9 in ssl_io_filter_cleanup () from /usr/lib64/httpd/modules/mod_ssl.so
Missing separate debuginfos, use: yum debuginfo-install httpd-2.4.54-1.el8.x86_64
(gdb) bt
#0  0x00007f0b9ffa05e9 in ssl_io_filter_cleanup () from /usr/lib64/httpd/modules/mod_ssl.so
#1  0x00007f0ba4372d6e in apr_pool_destroy () from /lib64/libapr-1.so.0
#2  0x00007f0ba4372d4d in apr_pool_destroy () from /lib64/libapr-1.so.0
#3  0x00007f0b9faee907 in clean_child_exit () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#4  0x00007f0b9faee961 in just_die () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#5  <signal handler called>
#6  0x00007f0ba3583899 in EC_KEY_free () from /lib64/libcrypto.so.1.1
#7  0x00007f0ba35ed9bb in EVP_PKEY_free_it () from /lib64/libcrypto.so.1.1
#8  0x00007f0ba35ee6b9 in EVP_PKEY_free () from /lib64/libcrypto.so.1.1
#9  0x00007f0b9fd21637 in ssl3_free () from /lib64/libssl.so.1.1
#10 0x00007f0b9fd3157f in SSL_free () from /lib64/libssl.so.1.1
#11 0x00007f0b9ffa1d3e in ssl_filter_io_shutdown.isra () from /usr/lib64/httpd/modules/mod_ssl.so
#12 0x00007f0b9ffa3798 in ssl_io_filter_output () from /usr/lib64/httpd/modules/mod_ssl.so
#13 0x00007f0b9ffa0143 in ssl_io_filter_coalesce () from /usr/lib64/httpd/modules/mod_ssl.so
#14 0x00005583d66f8f97 in ap_shutdown_conn ()
#15 0x00005583d66f9065 in ap_start_lingering_close ()
#16 0x00005583d66f90f4 in ap_lingering_close ()
#17 0x00007f0b9faef084 in child_main () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#18 0x00007f0b9faef378 in make_child () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#19 0x00007f0b9faf0250 in prefork_run () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#20 0x00005583d66cfa3e in ap_run_mpm ()
#21 0x00005583d66c73c8 in main ()
(gdb) info threads
  Id   Target Id         Frame 
* 1    LWP 18716         0x00007f0b9ffa05e9 in ssl_io_filter_cleanup () from /usr/lib64/httpd/modules/mod_ssl.so

附加 ssl_error_log 以供参考。

[proxy_http:error] [pid 18716] (70008)Partial results are valid but processing is incomplete: [client 10.21.15.163:35472] AH01110: error reading response

由于我对此还不熟悉,

  • 为什么要创建核心或者 mod_ssl.so 有什么问题?
  • 如何从 httpd 角度解决核心生成(如果可能)?

答案1

我认为您的服务器受到了以下攻击:CVE-2021-3449

将 openssl 升级到 OpenSSL 1.1.1k 或更新版本并重新启动(不是重新加载)apache。

相关内容