File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
volatility3/framework/symbols/linux/extensions Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1523,11 +1523,15 @@ def get_capabilities(self) -> int:
15231523 """
15241524
15251525 if isinstance (self .cap , objects .Array ):
1526- # In 2.6.25.x <= kernels < 6.3 kernel_cap_struct::cap is an array
1527- # to become a 64bit bitfield
1526+ # In 2.6.25.x <= kernels < 6.3 kernel_cap_struct::cap is a two
1527+ # elements __u32 array that constitutes a 64bit bitfield.
1528+ # Technically, it can also be an array of 1 element if
1529+ # _KERNEL_CAPABILITY_U32S = _LINUX_CAPABILITY_U32S_1
1530+ # However, in the source code, that never happens.
1531+ # From 2.6.24 to 2.6.25 cap became an array of 2 elements.
15281532 cap_value = (self .cap [1 ] << 32 ) | self .cap [0 ]
15291533 else :
1530- # In kernels < 2.6.25.x kernel_cap_struct::cap was a u32
1534+ # In kernels < 2.6.25.x kernel_cap_struct::cap was a __u32
15311535 # In kernels >= 6.3 kernel_cap_struct::cap is a u64
15321536 cap_value = self .cap
15331537
You can’t perform that action at this time.
0 commit comments