($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH] station: fix potential NULL access with forced roam
Date: Mon, 8 May 2023 06:49:34 -0700	[thread overview]
Message-ID: <18798950-0bd5-e09a-3192-df0647a4ce71@gmail.com> (raw)
In-Reply-To: <94a9b440-eaaa-409c-7a6f-8bdf9d6bc976@gmail.com>

Hi Denis,

On 5/7/23 4:10 PM, Denis Kenzior wrote:
> Hi James,
> 
> On 5/2/23 13:59, James Prestwood wrote:
>> If forcing a roam using developer mode IWD could become
>> unconnected during the scan and result in a segfault when
>> the network_get_security() is called.
>> ---
>>   src/station.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
> 
> Do you have a backtrace?
> 
>> diff --git a/src/station.c b/src/station.c
>> index be571083..9104ebf6 100644
>> --- a/src/station.c
>> +++ b/src/station.c
>> @@ -2482,7 +2482,7 @@ static bool station_roam_scan_notify(int err, 
>> struct l_queue *bss_list,
> 
> This seems suspicious.  Forced roam should be going via 
> station_force_roam_scan_notify(), not via this callback.

Yes true. I did see this crash here but maybe it was related to local 
changes. I was roaming back and forth but your right, a forced roam 
shouldn't ever hit this callback.

I'll get back to you on this.

> 
>>       uint16_t mdid;
>>       enum security orig_security, security;
>> -    if (err) {
>> +    if (err || !network) {
>>           station_roam_failed(station);
>>           return false;
>>       }
> 
> And even then, isn't station->roam_scan_id canceled, so the callback 
> shouldn't even be called in the first place?
> 
> Regards,
> -Denis

      reply	other threads:[~2023-05-08 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 18:59 [PATCH] station: fix potential NULL access with forced roam James Prestwood
2023-05-07 23:10 ` Denis Kenzior
2023-05-08 13:49   ` James Prestwood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18798950-0bd5-e09a-3192-df0647a4ce71@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).