Created
April 30, 2026 09:04
-
-
Save kapouer/de6fcb499281aefa4d8ee1c9eba385cd to your computer and use it in GitHub Desktop.
CopyFail Ansible Mitigation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Disable algif_aead kernel module | |
| hosts: all | |
| become: true | |
| tasks: | |
| - name: Disable algif_aead in modprobe configuration | |
| ansible.builtin.lineinfile: | |
| path: /etc/modprobe.d/disable-algif.conf | |
| line: install algif_aead /bin/false | |
| create: true | |
| mode: '0644' | |
| - name: Remove algif_aead module | |
| community.general.modprobe: | |
| name: algif_aead | |
| state: absent | |
| - name: Check that algif_aead cannot be loaded | |
| community.general.modprobe: | |
| name: algif_aead | |
| state: present | |
| register: modprobe_result | |
| ignore_errors: true | |
| - name: Assert that algif_aead cannot be loaded | |
| ansible.builtin.assert: | |
| that: modprobe_result.rc != 0 | |
| fail_msg: "algif_aead module can still be loaded, check modprobe configuration" | |
| success_msg: "algif_aead module is successfully disabled and cannot be loaded" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment