Created
May 8, 2026 13:41
-
-
Save bykvaadm/7bb8937ebc4f0485fea26fa27af4c522 to your computer and use it in GitHub Desktop.
CVE-2026-43284_CVE-2026-43500_mitigate
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: Mitigate DirtyFrag (CVE-2026-43284 / CVE-2026-43500) | |
| hosts: all | |
| become: true | |
| tasks: | |
| - name: Caveats | |
| debug: | |
| msg: | | |
| ВНИМАНИЕ: | |
| - esp4/esp6: если используется IPsec VPN (strongSwan, Libreswan и др.) — | |
| отключение сломает туннели. В таком случае ждать патча ядра. | |
| - rxrpc: используется только для AFS/Kerberos, в большинстве инфраструктур | |
| безопасно отключать. | |
| - CVE-2026-43500 (rxrpc) пока не запатчен — блокировка модуля | |
| единственная защита до выхода патча ядра. | |
| - После эксплуатации DirtyFrag page cache засорён — требуется | |
| drop cache или ребут. | |
| - name: Blacklist vulnerable modules | |
| copy: | |
| dest: /etc/modprobe.d/dirtyfrag-mitigation.conf | |
| content: | | |
| install esp4 /bin/false | |
| install esp6 /bin/false | |
| install rxrpc /bin/false | |
| blacklist esp4 | |
| blacklist esp6 | |
| blacklist rxrpc | |
| - name: Unload modules if loaded | |
| modprobe: | |
| name: "{{ item }}" | |
| state: absent | |
| loop: [esp4, esp6, rxrpc] | |
| failed_when: false | |
| when: ansible_facts.get('ansible_virtualization_type') != 'container' | |
| - name: Verify modules not loaded | |
| shell: lsmod | grep -E '^(esp4|esp6|rxrpc)\s' | |
| register: check | |
| failed_when: check.rc == 0 | |
| changed_when: false | |
| when: ansible_facts.get('ansible_virtualization_type') != 'container' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment