Debian Codegraph @

testsuite/systemtap.examples/security-band-aids/cve-2021-4155.stp

raw
1 // CVE-2021-4155 - kernel: xfs: raw block device data leak in ioctl(XFS_IOC_ALLOCSP
2
3 // Approach: intercept the xfs_alloc_file_space function. Replace
4 // the 0 unsafe alloc_type parameter.
5
6 probe module("xfs").function("xfs_alloc_file_space") {
7 if ($alloc_type == 0)
8 $alloc_type = 0x8; # XFS_BMAPI_PREALLOC
9 }
10