Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitigations for Log4J CVE-2021-44228 #209

Merged
merged 5 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@
when: defaultdir_exists.stat.exists == true
become: yes

- name: populate /etc/environment
lineinfile:
dest: "/etc/environment"
state: present
regexp: "^{{ item.key }}="
line: "{{ item.key }}={{ item.value}}"
with_items: "{{ os_environment }}"

# Include install profile-specific variables
- name: include Drupal install profile specific variables
include_vars: "vars/{{ islandora_profile }}.yml"
5 changes: 5 additions & 0 deletions inventory/vagrant/group_vars/all/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ mysql_users:
# Used by both the webserver and crayfish role for CentOS.
php_enablerepo: "remi-php72"
php_packages_state: "latest"

# Log4j
os_environment:
- key: LOG4J_FORMAT_MSG_NO_LOOKUPS
value: true
2 changes: 1 addition & 1 deletion inventory/vagrant/group_vars/solr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#solr_version: "7.7.3"
solr_version: "8.11.1"

solr_cores:
- ISLANDORA
Expand Down
2 changes: 1 addition & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
version: 1.4.3

- src: geerlingguy.solr
version: 5.2.0
version: 5.3.0

- src: geerlingguy.java
version: 1.10.0
Expand Down
3 changes: 1 addition & 2 deletions roles/internal/Islandora-Devops.tomcat8/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
- tomcat9
- tomcat9-install

- include: config.yml
static: no
- include_tasks: config.yml
tags:
- tomcat9
- tomcat9-config
22 changes: 22 additions & 0 deletions solr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,25 @@
retries: 20
delay: 3
tags: solr

# Log4j December 2021 vulnurability fix.
- name: Install zip command
apt:
name: "zip"
state: present
cache_valid_time: 3600

- name: Find any instances of vulnurable Log4J core JAR file
command: "find / -name log4j-core-2.1[0,1,2,3,4,5].?.jar"
register: log4j_jars
changed_when: false
until: files_to_copy is not failed
retries: 5
tags: solr

- name: Delete Log4J JNDI class from JARs
command: "zip -q -d {{ item }} org/apache/logging/log4j/core/lookup/JndiLookup.class"
with_items:
- "{{ log4j_jars.stdout_lines }}"
ignore_errors: yes
tags: solr