How To Install log4j-cve-2021-44228-hotpatch.noarch on Amazon Linux 2

In this tutorial we learn how to install log4j-cve-2021-44228-hotpatch.noarch in Amazon Linux 2. log4j-cve-2021-44228-hotpatch.noarch is log4j CVE-2021-44228 Hotpatch

Introduction

In this tutorial we learn how to install log4j-cve-2021-44228-hotpatch.noarch on Amazon Linux 2.

What is log4j-cve-2021-44228-hotpatch.noarch

This is a tool which injects a Java agent into a running JVM process. The agent will attempt to patch the lookup() method of all loaded org.apache.logging.log4j.core.lookup.JndiLookup instances to unconditionally return the string “Patched JndiLookup CVE-2021-44228 remote code execution vulnerability in Log4j without restarting the Java process. This package contains the built hotpatch JARs and a script to apply them to all running JVMs. The script is invoked by systemd.

We can use yum to install log4j-cve-2021-44228-hotpatch.noarch on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install log4j-cve-2021-44228-hotpatch.noarch.

Install log4j-cve-2021-44228-hotpatch.noarch on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install log4j-cve-2021-44228-hotpatch.noarch using yum by running the following command:

sudo yum -y install log4j-cve-2021-44228-hotpatch.noarch

How To Uninstall log4j-cve-2021-44228-hotpatch.noarch on Amazon Linux 2

To uninstall only the log4j-cve-2021-44228-hotpatch.noarch package we can use the following command:

sudo yum remove log4j-cve-2021-44228-hotpatch.noarch

log4j-cve-2021-44228-hotpatch.noarch Package Contents on Amazon Linux 2

/usr/bin/log4j-cve-2021-44228-hotpatch
/usr/lib/systemd/system/log4j-cve-2021-44228-hotpatch.service
/usr/share/log4j-cve-2021-44228-hotpatch/jdk11/Log4jHotPatch.jar
/usr/share/log4j-cve-2021-44228-hotpatch/jdk17/Log4jHotPatchFat.jar
/usr/share/log4j-cve-2021-44228-hotpatch/jdk8/Log4jHotPatch.jar

References

Summary

In this tutorial we learn how to install log4j-cve-2021-44228-hotpatch.noarch on Amazon Linux 2 using yum.