El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ MapReduce Service/ Product Bulletin/ Vulnerability Notice/ Guide for Fixing the Apache Log4j2 Remote Code Execution Vulnerability (CVE-2021-44228)

Guide for Fixing the Apache Log4j2 Remote Code Execution Vulnerability (CVE-2021-44228)

Updated on 2024-09-06 GMT+08:00

This section describes how to fix the Apache log4j2 vulnerability CVE-2021-44228. Currently, you can use either of the following methods to fix the vulnerability:

Prerequisites

  • You have downloaded the patch tool package MRS_Log4j_Patch.tar.gz from the OBS path.
  • You have determined the active OMS node in the cluster.
    NOTE:

    Generally, OMS is deployed on two nodes, master1 and master2. You can use the following commands to determine the active OMS node. The node whose command output contains active is the active OMS node, and the node whose command output contains standby is the standby OMS node.

    For clusters whose version is earlier than MRS 3.x, use the following command:

    sh /opt/Bigdata/*/workspace0/ha/module/hacom/script/get_harole.sh

    For clusters whose version is later than MRS 3.x, use the following command:

    sh /opt/Bigdata/om-server*/OMS/workspace0/ha/module/hacom/script/get_harole.sh

Installing the Patch on Existing Cluster Nodes

  1. Upload MRS_Log4j_Patch.tar.gz to the /home/omm directory on the active OMS node. For details, see How Do I Upload a Local File to a Node Inside a Cluster?.
  2. Run the following commands to log in to the active OMS node as user root, modify the permission of the patch tool, switch to user omm, and decompress the patch tool package to the current directory:

    chown omm:wheel -R /home/omm/MRS_Log4j_Patch.tar.gz

    su - omm

    cd /home/omm

    tar -zxf MRS_Log4j_Patch.tar.gz

  3. In the /home/omm/MRS_Log4j_Patch/bin/ips.ini file, configure the IP addresses (IP addresses of all nodes in the current cluster) of the nodes where the patch is to be installed.

    NOTE:

    Configure one IP address in each line. No empty line is allowed.

  4. Run the following scripts to install the patch:

    cd /home/omm/MRS_Log4j_Patch/bin

    nohup sh install.sh upgrade &

    Run the tail -f nohup.out command to check the execution status. If "upgrade patch success." is displayed, the execution is complete.

  5. Log in to Manager, restart the affected components (you are advised to perform this operation during off-peak hours). For details, see List of Affected Components.
  6. (Optional) If you want to install the patch for the newly downloaded client, run the following commands to install the patch for the component package first:

    su - omm

    cd /home/omm/MRS_Log4j_Patch/bin

    nohup sh install.sh upgrade_package &

    Run the tail -f nohup.out command to check the execution status. If "upgrade_package patch success." is displayed, the execution is complete.

    After the execution is complete, the client downloaded is the one with the patch installed.

    CAUTION:
    • This step takes a long time, and you do not need to restart the component after performing this step.
    • After the patch is installed, do not delete the files related to the patch directory. Otherwise, the patch cannot be uninstalled.

Installing the Patch on New Nodes

  1. Disable Enable Component during the scale-out.

  2. Upload MRS_Log4j_Patch.tar.gz to the /home/omm directory on the active OMS node. For details, see How Do I Upload a Local File to a Node Inside a Cluster?.
  3. Run the following commands to log in to the active OMS node as user root, modify the permission of the patch tool, switch to user omm, and decompress the patch tool package to the current directory:

    chown omm:wheel -R /home/omm/MRS_Log4j_Patch.tar.gz

    su - omm

    cd /home/omm

    tar -zxf MRS_Log4j_Patch.tar.gz

  4. In the /home/omm/MRS_Log4j_Patch/bin/ips.ini file, configure the IP addresses (IP addresses of the new nodes in the current cluster) of the nodes where the patch is to be installed.

    NOTE:

    Configure one IP address in each line. No empty line is allowed.

  5. Run the following scripts to install the patch:

    cd /home/omm/MRS_Log4j_Patch/bin

    nohup sh install.sh upgrade &

    Run the tail -f nohup.out command to check the execution status. If "upgrade patch success." is displayed, the execution is complete.

  6. Log in to Manager and start instances on the new node.

Uninstalling the Patch

  1. Log in to the active OMS node as user root and run the following commands to uninstall the patch:

    su - omm

    cd /home/omm/MRS_Log4j_Patch/bin

    nohup sh install.sh rollback &

    Run the tail -f nohup.out command to check the execution status. If "rollback patch success." is displayed, the execution is complete.

  2. Log in to Manager, restart the affected components (you are advised to perform this operation during off-peak hours). For details, see List of Affected Components.
  3. Perform the following operation if you have performed 6 in Installing the Patch on Existing Cluster Nodes during patch installation and you want to roll back the modification in the component package:

    Log in to the active OMS node as user root and run the following commands:

    su - omm

    cd /home/omm/MRS_Log4j_Patch/bin

    nohup sh install.sh rollback_package &

    Run the tail -f nohup.out command to check the execution status. If "rollback_package patch success." is displayed, the execution is complete.

(Optional) Upgrading the ECS Password Reset Plug-in

Huawei Cloud ECS provides the one-click password reset function. If the password of an ECS is lost or expires, you can use this function to reset the password with a few clicks. The password reset plug-in is a client process running in the ECS and does not provide any external network services. The password reset plug-in CloudResetPwdUpdateAgent uses the Apache Log4j2 component. According to the analysis and verification of Huawei Cloud security lab, the ECS password reset plug-in has no security risks.

To upgrade the Log4j2 version of this plug-in, perform the following steps:

  1. Upload MRS_Log4j_Patch.tar.gz to the /home/omm directory on the active OMS node. For details, see How Do I Upload a Local File to a Node Inside a Cluster?.
  2. Run the following commands to log in to the active OMS node as user root, modify the permission of the patch tool, switch to user omm, and decompress the patch tool package to the current directory:

    chown omm:wheel -R /home/omm/MRS_Log4j_Patch.tar.gz

    su - omm

    cd /home/omm

    tar -zxf MRS_Log4j_Patch.tar.gz

  3. In the /home/omm/MRS_Log4j_Patch/bin/ips.ini file, configure the IP addresses (IP addresses of all nodes in the current cluster) of the nodes where the patch is to be installed.

    NOTE:

    Configure one IP address in each line. No empty line is allowed.

  4. Perform the following steps based on the node login mode:

    • Password login

      Run the following command:

      nohup sh install.sh upgrade_resetpwdagent passwd:Login password &

      For example, if the password is xyz123, run the following command:

      nohup sh install.sh upgrade_resetpwdagent passwd:xyz123 &

      Run the tail -f nohup.out command to check the execution status. If "upgrade_resetpwdagent patch success." is displayed, the execution is complete.

    • Key login
      1. Upload the private key file of user root to the /home/omm/MRS_Log4j_Patch/bin directory and ensure that the owner group of the file is root:root. Then, run the following commands:

        chown root:root /home/omm/MRS_Log4j_Patch/bin/Key file

        chmod 644 /home/omm/MRS_Log4j_Patch/bin/Key file

      2. Run the following commands:

        su - omm

        cd /home/omm/MRS_Log4j_Patch/bin

        nohup sh install.sh upgrade_resetpwdagent privatekey:Path of the private key file &

        For example, if the private key file path is /home/omm/MRS_Log4j_Patch/bin/abc.pem, run the following command:

        nohup sh install.sh upgrade_resetpwdagent privatekey:/home/omm/MRS_Log4j_Patch/bin/abc.pem &

        Run the tail -f nohup.out command to check the execution status. If "upgrade_resetpwdagent patch success." is displayed, the execution is complete.

List of Affected Components

MRS Cluster Version

Affected Component

MRS 3.1.1

Hive, Oozie, Flink, Ranger, and Tez

MRS 3.1.0

Hive, Flink, Spark, Tez, Impala, Ranger, Presto, and Oozie

MRS 3.0.5

Hive, Flink, Spark, Tez, Impala, Ranger, Presto, Oozie, Storm, and Loader

MRS 3.0.2

Hive, Flink, Spark, Tez, Ranger, Oozie, Storm, and Loader

MRS 2.1.1

Hive, Tez, Storm, Loader, Impala, and Presto

MRS 2.1.0

Loader, Hive, Storm, Presto, Impala, Tez, Spark, and HBase

MRS 1.9.3

Loader, Hive, Tez, Spark, and Flink

MRS 1.9.2

Loader, Hive, Tez, Spark, Flink, and Impala

MRS 1.9.0

Loader, Hive, Spark, and Flink

MRS 1.8.10

Loader and Storm

MRS 1.7.1

Loader and Storm

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback