简体   繁体   English

如何使用最新修复构建 log4j2 2.8.2

[英]How to build log4j2 2.8.2 with the latest fixes

I am remediating my Jetty java apps for CVE-2021-44228 and the other similar log4j findings.我正在针对 CVE-2021-44228 和其他类似的 log4j 发现修复我的 Jetty java 应用程序。

I tried to upgrade to 2.17.0 but not all my apps can upgrade because some of them rely on older version of Jetty that does not work with the new log4j due to the multi-java-release jars (see Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class with jetty and log4j 2.9.1? )我尝试升级到 2.17.0,但并非我的所有应用程序都可以升级,因为其中一些应用程序依赖于旧版本的 Jetty,由于多 java 版本 jars (请参阅错误扫描条目 META-INF /versions/9/org/apache/logging/log4j/util/StackLocator.class 与码头和 log4j 2.9.1?

Obviously I am working to upgrade those apps to the latest version of Jetty but that is quite involved.显然,我正在努力将这些应用程序升级到 Jetty 的最新版本,但这涉及很多。 It's going to take some time.这需要一些时间。

So I'm stuck manually remediating the log4j 2.8.2 version (the latest version that is not multi-release format jar).所以我坚持手动修复 log4j 2.8.2 版本(不是多版本格式 jar 的最新版本)。

I have already taken the remediation of the log4j files {nolookups} and added command line argument to disable the JNDI lookups.我已经修复了 log4j 文件{nolookups}并添加了命令行参数来禁用 JNDI 查找。

I know I can remove JNDILookup.class which helps remediate the major issue.我知道我可以删除 JNDILookup.class 这有助于解决主要问题。

Is there an official 2.8.2 fork of the fix going anywhere we can use?是否有正式的 2.8.2 版本的修复程序可以在我们可以使用的任何地方使用?

If you are also stuck on Java 8 on those old apps, then just repackage those multi-release jar files without their META-INF/versions JAR file directories.如果您还卡在那些旧应用程序上的 Java 8 上,那么只需重新打包那些没有META-INF/versions Z529E625C8C2BF37C6334AAE495A1D0F 文件目录的多版本 jar 文件。

If you using Java 9 or greater, then you are stuck with those META-INF/versions JAR file directories, and this suggestion is not an option for you.如果您使用 Java 9 或更高版本,那么您会被那些META-INF/versions JAR 文件目录困扰,并且此建议不适合您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM