Re: [PATCH 1/2] scan: fix invalid read when canceling an ongoing scan

Denis Kenzior
2024-09-05T03:23:38Z

Hi James,

>>
>> The issue seems to be resolved by checking that results->sr is set:
>>
>> - if (!results->sr->canceled)
>> + if (results->sr && !results->sr->canceled)
> The patch on the arch issue report looks good to me. Can we go ahead and just
> send that patch with git send-email?

Why is results->sr NULL?

Is it caused by the cancellation path introduced by:
64d68b4f080c ("scan: fix invalid read when canceling an ongoing scan")
?

Or is this caused by calling scan_get_results with a NULL sr like in
scan_notify()? If sr is NULL, perhaps we shouldn't be invoking the survey path
in the first place?

Regards,
-Denis