according to the docs Before You Upgrade | SonarQube Docs => Migration Path
this should be straight 8.9.0 (first 8.9.x LTS version) to 8.9.5 (most recent 8.9.x LTS version).
To augment Gilbert’s excellent answer, I just want to say that in this within-version situation, you should be good to just copy your configuration file from one to the other and go.
Thanks @ganncamp unfortunately, removing the class is no longer an acceptable resolution per our organization’s SOC.
We are actually an enterprise customer, I will likely go that route to voice our concerns (Enterprise Support). We are likely going to have to shutdown our Sonarqube installation until the elastic dependency can be upgraded to include log4j 2.16.0.
Regardless of whether or not the mitigations are in place, its just not worth the risk for an organization. Apologies for the directness, but I am sure other companies using Sonarqube that deal with PHI/PII/HIPAA data are in the same boat.
upgrade from v9.2.2 to v9.2.3 throws me errors in log file.
ES log file
2021.12.19 07:33:32 WARN es[stderr] java.lang.NoClassDefFoundError: Could not initialize class Log4jHotPatch
2021.12.19 07:33:32 WARN es[stderr] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021.12.19 07:33:32 WARN es[stderr] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021.12.19 07:33:32 WARN es[stderr] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021.12.19 07:33:32 WARN es[stderr] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2021.12.19 07:33:32 WARN es[stderr] at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
2021.12.19 07:33:32 WARN es[stderr] at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:535)
APP log file
Exception in thread “Attach Listener” Agent failed to start!
2021.12.19 07:33:40 INFO app[o.s.a.SchedulerImpl] Process[ce] is up
2021.12.19 07:33:40 INFO app[o.s.a.SchedulerImpl] SonarQube is up
Everything seems up be up and running with all data and not sure what to make of it.
Wondering if anyone else is having issues?
ElasticSearch 7.16.2 has been released with Log4j 2.17
[Update December 19]
Elastiscsearch and Logstash 7.16.2 and 6.8.22 are now released, these releases include Log4j 2.17.0 and should not trigger false positives in vulnerability scanners.
We are using SQ Enterprise Edition * Ver 8.9.1 (build 44547) and for the moment we can’t upgrade because we need to fix some stuff manually in our database but we were able to upgrade the log4j* (core and api jars ) from version 2.11.1 to 2.17.0 and our webserver is operational. I also applied the property sonar.search.javaAdditionalOpts=-Dlog4j2.formatMsgNoLookups=true in the sonar.properties file ,if there is something else I should consider please let me know .Thanks
Sonarsource Jira has still status ‘unreleased’ but https://binaries.sonarsource.com/ has already
Sonarqube 8.9.6 and 9.2.4 with the update to Elasticsearch 7.16.2 which uses log4j 2.17.0
We’ve just released SonarQube 8.9.6 LTS and 9.2.4 (Latest) to eliminate confusion and avoid false-positive from vulnerability scanning tools in regards to: CVE-2021-45046, CVE-2021-44228 and CVE-2021-45105.
In these new versions, the Elasticsearch component is updated to its latest bugfix version, 7.16.2, which updates the packaged Log4J dependency to 2.17.
Note: Although our security researchers have not found the previous SonarQube LTS (8.9.3, 8.9.4 or 8.9.5) or Latest (9.2.1,9.2.2 or 9.2.3) to be susceptible to any of the CVE’s in relation to Log4j at this time, this update has been done from an abundance of caution and we invite you to update to the latest version.
I was referring to all the discussion about “[CVE-2021-45046, [CVE-2021-44228 ], and CVE-2021-44228”.
All the discussion states 8.9 and 9.2 are okay, but no mention about 9.1
In order to exploit CVE-2021-44832 you already have to have a bad actor on your network and/or your server with the configuration file is badly configured. You will have way worse things to worry about and mitigate than this theoretical exploit (aka your network is totally owned).
This was a badly assigned CVE from security researchers hungry to hop onto the log4j bandwagon and grab some fame imo…
Where I work we will upgrade from 2.17.0 possibly in a few months in the next regular maintenance/module dependency upgrade period. Unless a real security vulnerability pops up.