远程 Syslog 使用 Elasticsearch 模块来保存日志。
受影响的产品:
RSC 不受影响。
检查版本:
curl -XGET 'http://localhost:9200'
输出:
"number" : "7.16.2"
或
"number" : "6.8.22"
Elasticsearch 官方文档:
https://www.elastic.co/blog/new-elasticsearch-and-logstash-releases-upgrade-apache-log4j2
所有低于 7.16.2 或 6.8.22 的版本均存在漏洞。如果版本更高,则无需任何操作。
sudo apt update && sudo apt upgrade
!!请检查将要安装的是否为推荐版本或更高版本!!
编辑:
nano /etc/elasticsearch/jvm.options
添加:
-Dlog4j2.formatMsgNoLookups=true
重启 elasticsearch 服务:
service elasticsearch restart