From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] network: Fix use-after-free caused by Scan() in poor reception.
Date: Tue, 22 Dec 2015 10:23:22 -0600 [thread overview]
Message-ID: <567978FA.2050006@gmail.com> (raw)
In-Reply-To: <5678F735.9000002@actia.se>
[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]
Hi John,
>> I'm not sure this is the right fix. This will result in subsequent
>> API calls to return inconsistent information related to the network
>> operator. For example, NetworkRegistration.Name,
>> NetworkRegistration.MobileNetworkCode,
>> NetworkRegistration.MobileCountryCode will be omitted.
>>
>> Can we make sure that the current operator is not destroyed /
>> unregistered in this particular situation?
> It may be possible but I could not figure out a way to do that. So I did
> it like this to at least prevent the resulting SIGSEGV.
Understood, but this fix is not really acceptable.
In update_operator_list(), the old operators (that weren't found during
Scan()) are unregistered.
for (o = netreg->operator_list; o; o = o->next)
network_operator_dbus_unregister(netreg, o->data);
One way of accomplishing the above, would be to detect that
netreg->current_operator is being removed and handle that appropriately.
E.g. by moving it from the old list to the new list.
Regards,
-Denis
prev parent reply other threads:[~2015-12-22 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-21 10:03 [PATCH] network: Fix use-after-free caused by Scan() in poor reception John Ernberg
2015-12-22 0:10 ` Denis Kenzior
2015-12-22 7:09 ` John Ernberg
2015-12-22 16:23 ` Denis Kenzior [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=567978FA.2050006@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.