Comment 4 for bug 2060345

Revision history for this message
Peter Jose De Sousa (pjds) wrote (last edit ):

okay, I suspect the pointer is just returned NULL, the for loop is just incrementing the memory address. Eventually, the pointer is incremented enough that it points outside of the application memory address space triggering SIGSEGV for memory access violation

[1]https://github.com/OpenSCAP/openscap/blob/7f94172ec69cf887b2347f3aff7c17389c629047/src/OVAL/probes/unix/linux/systemdunitdependency_probe.c#L156
[2] https://github.com/OpenSCAP/openscap/blob/7f94172ec69cf887b2347f3aff7c17389c629047/src/OVAL/probes/unix/linux/systemdunitdependency_probe.c#L159

pointer is just incremented repeatedly
[3] https://github.com/OpenSCAP/openscap/blob/7f94172ec69cf887b2347f3aff7c17389c629047/src/OVAL/probes/unix/linux/systemdunitdependency_probe.c#L165 - the function just returns, the value is invalid
[4] https://github.com/OpenSCAP/openscap/blob/7f94172ec69cf887b2347f3aff7c17389c629047/src/OVAL/probes/unix/linux/systemdunitdependency_probe.c#L159

for loop continues, pointer memory address is incremented.
thats my suspicion I'd need to recompile openscap with optimisation disabled to confirm