File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 ansible.builtin.command :
2424 cmd : echo 3 > /proc/sys/vm/drop_caches
2525 changed_when : true
26+
27+ - name : Apply ssh-keysign-pwn mitigation
28+ hosts : mitigate_ssh_keysign_pwn
29+ become : true
30+ gather_facts : false
31+ tasks :
32+ # See https://docs.kernel.org/admin-guide/LSM/Yama.html for explanation
33+ - name : Apply ssh-keysign-pwn mitigation to live system
34+ ansible.builtin.command : sysctl kernel.yama.ptrace_scope=2
35+ changed_when : true
36+ - name : Get current ptrace_scope value
37+ ansible.builtin.slurp :
38+ src : /proc/sys/kernel/yama/ptrace_scope
39+ check_mode : false
40+ changed_when : false
41+ register : ptrace_scope
42+ - name : Show ptrace_scope after fix
43+ ansible.builtin.debug :
44+ msg : " /proc/sys/kernel/yama/ptrace_scope={{ ptrace_scope.content|b64decode }}"
45+ - name : Prepare sysctl.d file to apply mitigation upon reboot
46+ ansible.builtin.copy :
47+ dest : /etc/sysctl.d/99-prevent-ptrace_scope.conf
48+ content : |
49+ # this is a mitigation for ssh-keysign-pwn
50+ # See https://seclists.org/oss-sec/2026/q2/529 for the announcement
51+ kernel.yama.ptrace_scope=2
52+ owner : root
53+ group : root
54+ mode : " 0644"
Original file line number Diff line number Diff line change 247247
248248## Vulnerability mitigation groups
249249[mitigate_dirtyfrag]
250+ [mitigate_ssh_keysign_pwn]
Original file line number Diff line number Diff line change @@ -220,3 +220,5 @@ compute
220220## Vulnerability mitigation groups
221221[mitigate_dirtyfrag:children]
222222builder
223+ [mitigate_ssh_keysign_pwn:children]
224+ builder
You can’t perform that action at this time.
0 commit comments