testsuite/systemtap.examples/security-band-aids/cve-2016-5195.stp
raw| 1 | |
| 2 | probe kernel.function("mem_write").call ? { |
| 3 | $count = 0 |
| 4 | } |
| 5 | |
| 6 | probe kernel.function("mem_write").return ? { |
| 7 | $return = %{ -EIO %} |
| 8 | } |
| 9 | |
| 10 | probe syscall.ptrace { // includes compat ptrace as well |
| 11 | $request = 0xfff |
| 12 | } |
| 13 | |
| 14 | probe begin { |
| 15 | printk(0, "CVE-2016-5195 mitigation loaded") |
| 16 | } |
| 17 | |
| 18 | |
| 19 | probe end { |
| 20 | printk(0, "CVE-2016-5195 mitigation unloaded") |
| 21 | } |