Apache Log4j Vulnerability CVE-2021-44228 - How does it affect Matlab?
이전 댓글 표시
Regarding the Apache Log4j Vulnerability CVE-2021-44228. How does it affect these software products:
- Regular locally installed Matlab (Mac, PC, and Linux). All versions : current, plus old/historical.
- MATLAB online (web-based version of MATLAB)
- The MATLAB MCR runtime library (needed to run standalone executables someone compiled with the MATLAB Compiler Toolbox)
- Installers for any Mathworks software product.
MATLAB uses log4j < v2.15
Will you provide a patch, if one is needed?
댓글 수: 6
Walter Roberson
2021년 12월 14일
Very few of the volunteers who answer questions here can speak for Mathworks.
This is something that should be raised with Mathworks Support.
But it would not hurt if they were to make a public statement on their websites that was easily discroverable.
At least we received this through a support ticket:
I am writing in reference to your Technical Support Case #xxxxxxxx regarding 'Apache Log4j Security Vulnerabilities'.
This is the official response from MathWorks:
On December 9, 2021, the following vulnerability in the Apache Log4j Java logging library affecting all Log4j2 versions prior to 2.15.0 was disclosed:
• CVE-2021-44228: Apache Log4j2 JNDI features do not protect against attacker-controlled LDAP and other JNDI related endpoints
MathWorks Desktop and Server Products
No general release desktop or server products include the affected versions of Log4j. This includes MATLAB, Simulink, Stateflow, MATLAB Production Server, MATLAB Web App Server, MATLAB Parallel Server, Polyspace Access Server, Road Runner, and any toolboxes or blocksets for any of these.
MathWorks Online Applications (link)All online applications that use the vulnerable version of Log4j have been patched with officially suggested mitigations. After investigation, we found no evidence that the vulnerability has been exploited on any of our systems.
Brandon Purnell
2021년 12월 14일
What is the newest version of Matlab we can use that does NOT include a vulnerable version of Log4j?
Lars Gregersen
2021년 12월 14일
There aren't any versions of Matlab that is affected by this particular bug.
Denverli koye
2022년 1월 16일
I think also. i dint get the exact your question
Craig Richardson
2024년 1월 29일
Is this still the case in 2024? Are there still no versions of Matlab that are affected by log4j?
If so, please release an updated document that reflects that information.
채택된 답변
추가 답변 (3개)
QMA
2021년 12월 14일
1 개 추천
FYI.. when you download the latest version for installation, there is reference to log4j in 2021b:
./Downloads/MathWorks/R2021b/2021_12_03_21_37_17/archives/3p/log4j_common_1621039475.enc
./Downloads/MathWorks/R2021b/2021_12_03_21_37_17/archives/3p/log4j_common_1621039475.xml
댓글 수: 3
Lars Gregersen
2021년 12월 14일
Check the version numbers and compare with
Walter Roberson
2021년 12월 14일
/3p means "Third party". So some third party product might include it.
Walter Roberson
2021년 12월 15일
편집: Walter Roberson
2021년 12월 15일
That log4j_common is responsible for installing
filename = fullfile(matlabroot, 'java', 'jarext', 'log4j.jar')
ls(filename)
References in files that I found on my system. I do not have all toolboxes and official support packages installed, so there might be additional instances
./sys/ros1/maci64/ros1/share/ros/config/rosconsole.config:log4j.logger.ros=INFO
./sys/ros1/maci64/ros1/share/ros/config/rosconsole.config:log4j.logger.ros.roscpp.superdebug=WARN
./sys/ros1/maci64/ros1/share/roslisp/s-xml/test/ant-build-file.xml: <include name="log4j-core.jar" />
./sys/ros1/maci64/ros1/share/roslisp/s-xml/test/ant-build-file.xml: dir="${rsrc}/log4j"
./sys/ros1/maci64/ros1/share/roslisp/s-xml/test/ant-build-file.xml: includes="log4j.properties" />
./sys/ros1/maci64/ros1/share/roslisp/s-xml/test/ant-build-file.xml: <unjar src="${lib}/log4j-core.jar" dest="${build}" />
./sys/ros1/maci64/ros1/share/roslisp/s-xml/test/ant-build-file.xml: <unjar src="${lib}/log4j-core.jar" dest="${build}" />
./sys/ros1/maci64/ros1/share/roslisp/s-xml/test/ant-build-file.xml: <include name="log4j.properties"/>
./sys/ros1/maci64/ros1/share/roslisp/s-xml/test/ant-build-file.xml: <include name="org/apache/log4j/**"/>
./sys/ros1/maci64/ros1/share/roslisp/s-xml/test/ant-build-file.xml: <include name="log4j-core.jar" />
./toolbox/parallel/bin/util/msa_pct.ini:java/jarext/log4j.jar
./toolbox/imaq/imaqextern/drivers/maci64/genicam/GenICam_v3_1_0/log/config-unix/DefaultLogging.properties:log4j.rootCategory=ERROR, Console
./toolbox/imaq/imaqextern/drivers/maci64/genicam/GenICam_v3_1_0/log/config-unix/DefaultLogging.properties:log4cpp.appender.Console=org.apache.log4j.ConsoleAppender
./toolbox/imaq/imaqextern/drivers/maci64/genicam/GenICam_v3_1_0/log/config-unix/DefaultLogging.properties:log4cpp.appender.Console.layout=org.apache.log4j.PatternLayout
./toolbox/matlab/compatibility/codeAnalyzerChecks.json: "package" : "org.apache.log4j",
./toolbox/matlab/compatibility/codeAnalyzerChecks.json: "org.apache.log4j"
./mcr/toolbox/parallel/bin/util/msa_pct.ini:java/jarext/log4j.jar
I think the .json is just for code completion suggestion purposes, rather than being an invocation of the code.
sys/ros1 is part of ROS (Robot Operating System) toolbox, https://www.mathworks.com/help/ros/index.html
Genicam is a camera interface, https://www.mathworks.com/help/imaq/genicam-gentl-hardware.html . I do not have the Image Acquistion Support Package for GeniCam Interface installed, but I still have those driver files.
I just opened a support case reporting these files.
Shahed Sherkat
2021년 12월 18일
0 개 추천
How about vulnerabulut to CVE-2021-4104 ?
I have found 4 potentially vulnerable files in my Matlab R2017b.
[?] Found CVE-2021-4104 (log4j 1.2) vulnerability in C:\Program Files\MATLAB\R2017b\java\jarext\aps_impl\pubsub_impl_java\pubsub_impl.jar, log4j 1.2.17
[?] Found CVE-2021-4104 (log4j 1.2) vulnerability in C:\Program Files\MATLAB\R2017b\java\jarext\lais_server_impl\lais_server_impl.jar, log4j N/A - potentially vulnerable
[?] Found CVE-2021-4104 (log4j 1.2) vulnerability in C:\Program Files\MATLAB\R2017b\java\jarext\log4j.jar, log4j 1.2.15
[?] Found CVE-2021-4104 (log4j 1.2) vulnerability in C:\Program Files\MATLAB\R2017b\mcr\toolbox\matlab\connector\jar\3p.jar, log4j 1.2.17
Please adivce.
Thanks,
Shahed
댓글 수: 4
Sebastian
2021년 12월 20일
Shaochieh Young
2022년 1월 11일
Sebastian,
The US government maybe force to uninstall applications if the unsupposed version of Log4j is not implented to the software.
Walter Roberson
2022년 1월 11일
I don't think the US government has any authority in my country. I am not even clear that it has the authority to require such a thing inside the USA.
It does plausibly have authority to tell US Federal Government departments and US Federal Government Contractors that they must remove such software for security reasons.
Nicholas Clark
2022년 2월 18일
In addition to CVE-2021-4104, now potentially included are: CVE-2019-17571, CVE-2020-9488, and CVE-2022-23302.
Steve Peppas
2022년 3월 25일
편집: Steve Peppas
2022년 3월 25일
0 개 추천
Hey guys, i have found a convenient "hack" to mitigate the log4j vulnerability if you feel unsafe like me. Here is what i did:
1) Downloaded log4j-core-2.17.2 and added it to matlab/java/jarext folder.
2) Added it to the classpath.txt which is found in matlab/toolbox/local.
3) Deleted the previous log4j.jar in matlab/java/jarext.
4) Downloaded the log4j-1.2-api-2.17.2 logging bridge, added it to matlab/java/jarext and renamed it to log4j.jar
5) Last, downloaded the log4j-api-2.17.2, copied the logging folder in it and put it at the above log4j.jar in org.apache path.
I am using Ubuntu 20.04.4 OS.
댓글 수: 3
fyin
2022년 6월 2일
Hi, I solved this problem. Thank you, guy.
Vincent Sherart
2022년 9월 19일
Please excuse the java noob question, but I know very little about java programming. On the last step above, step 5, I get as far as using the jar utility to extract the contents fo the log4j-api*jar file, but I'm confused about section that says put logging folder above log4j.ar in org.apache path. Can someone provide more detail on this step?
For example, if I have MATLAB installed in /opt/MATLAB/R2021a, does the logging directory go somewhere in the /opt/MATLAB/R2021a/java dir structure?
Thanks,
Vince
Steve Peppas
2022년 9월 20일
Hey Vince, every .jar file is like a .zip file, meaning you can extract the files, copy and paste them.
So, for Step 5, copy the logging folder inside log4j-api-2.17.2.jar and paste it in the (new) log4j.jar in org/apache path inside log4j.jar.
Hope this is clear enough.
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!