Skip to content

Conversation

@3333qwe
Copy link

@3333qwe 3333qwe commented Dec 13, 2021

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

@github-actions github-actions bot added the BUILD label Dec 13, 2021
@3333qwe 3333qwe changed the title [SPARK-00000][WIP] update log4j to 2.15 [SPARK-37625][WIP] update log4j to 2.15 Dec 13, 2021
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@AngersZhuuuu
Copy link
Contributor

This CVE issue have no impact on spark, we don't need to do anything. I don't think we need to update to log4j2

@dannymeijer
Copy link
Contributor

This CVE issue have no impact on spark, we don't need to do anything. I don't think we need to update to log4j2

@AngersZhuuuu
Could not disagree more. I'm seeing Log4J version 1.2.17 being used in the Spark 3.2 image (build from latest) that we are deploying. This version was EOL way back in 2015 already. This PR needs highest possible priority to ensure that this CVE is definitely not affecting Spark as well as make it future proof for the foreseeable future.
source: https://logging.apache.org/log4j/1.2/

@dnskr
Copy link

dnskr commented Dec 13, 2021

CVE-2021-44228 affects only log4j2, so current log4j:1.2.17 doesn't need to be updated to fix the issue.
See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228 for a more details.
However it is recommended to update because of https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17571

@tonycox
Copy link

tonycox commented Dec 13, 2021

https://nvd.nist.gov/vuln/detail/CVE-2019-17571 impacts on log4j 1.2.*

@n-marion
Copy link
Contributor

This fix seems incomplete based on: https://logging.apache.org/log4j/2.x/manual/migration.html

@github-actions github-actions bot added the CORE label Dec 13, 2021
@bradbm
Copy link

bradbm commented Dec 13, 2021

CVE-2021-44228 affects only log4j2, so current log4j:1.2.17 doesn't need to be updated to fix the issue. See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228 for a more details. However it is recommended to update because of https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17571

Unfortunately there is CVE-2021-4104 which is a new similar CVE issued for Log4j 1.x, in addition to CVE-2019-17571.

@daguito81
Copy link

Attaching some previous discussion regarding migrating from Log4j 1.x to 2.x
We have this issue from 2015 https://issues.apache.org/jira/browse/SPARK-6305
where a lot of information can be read regarding the problem with dependencies and bumping log4j to 2.x

Regarding CVE-2021-4104 @bradbm stated, supposedly this only affects if you have JMSAppender on your Log4j configuration, which Spark doesn't use by default. If your application uses JMSAppender you can see mitigations here https://access.redhat.com/security/cve/CVE-2021-4104 so you're not vulnerable.

@cchantep
Copy link

Even if spark is vulnerable to a very specific case this time, using a log4j version that is no longer maintained by Apache itself is not consistent at all.

If migration issues have been identified since 2015, I'm quite surprise it has been fixed since ...

@attilapiros
Copy link
Contributor

I am afraid you are working parallel on this: #34895

@3333qwe 3333qwe changed the title [SPARK-37625][WIP] update log4j to 2.15 [SPARK-37625] update log4j to 2.15 Dec 14, 2021
@srowen
Copy link
Member

srowen commented Dec 15, 2021

@dannymeijer @cchantep @3333qwe et al - folks, nobody's dumb here. In fact, per above, this has been tried a few times over the years. The short summary is: Spark is easy to update to log4j 2, as it really does not use a concrete logging framework. But that doesn't change what its dependencies (mostly Hadoop) do.

This change is not nearly sufficient, unfortunately, so I'd close it in favor of the duplicate, which is another try and farther along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.