[mako] voicecalls and sms are broken unless a network connection is active

Bug #1476781 reported by Pat McGowan
58
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Pat McGowan
telepathy-mission-control-5 (Ubuntu)
Fix Released
Critical
Jamie Strandboge
telepathy-mission-control-5 (Ubuntu RTM)
Fix Released
Undecided
Unassigned
telepathy-ofono (Ubuntu)
Invalid
Critical
Tiago Salem Herrmann
telepathy-ofono (Ubuntu RTM)
Invalid
Undecided
Unassigned

Bug Description

Mako only
Latest ota5 update or rc-proposed

Turn off wifi and cell data
try to send an sms, it will fail to send
try to make a phone call, it will fail

enable either data connection, it will succeed

syslog contains
Jul 21 10:27:46 ubuntu-phablet kernel: [ 16.082435] type=1400 audit(1437488866.193:170): apparmor="DENIED" operation="connect" info="Failed name lookup - disconnected path" error=-13 profile="/usr/lib/telepathy/mission-control-5" name="dev/socket/property_service" pid=1592 comm="getprop" requested_mask="wr" denied_mask="wr" fsuid=32011 ouid=0
Jul 21 10:27:46 ubuntu-phablet kernel: [ 16.083137] type=1400 audit(1437488866.193:171): apparmor="DENIED" operation="open" profile="/usr/lib/telepathy/mission-control-5" name="/proc/cmdline" pid=1592 comm="getprop" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0

version is 1:5.16.3-1ubuntu1.0

summary: - [mako] cannot send mms unless a network connection is active
+ [mako] cannot send sms unless a network connection is active
Changed in telepathy-ofono (Ubuntu):
assignee: nobody → Tiago Salem Herrmann (tiagosh)
Changed in telepathy-mission-control-5 (Ubuntu):
assignee: Tiago Salem Herrmann (tiagosh) → Jamie Strandboge (jdstrand)
Changed in telepathy-mission-control-5 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote : Re: [mako] cannot send sms unless a network connection is active

Problem here is that the telepathy-ofono mission control plugins runs a "getprop rild.libpath" in order to detect if there is at least one modem present in the device.

getprop tries to query dev/socket/property_service socket and if that fails, it fallsback to read /system/build.prop.
We decided to just allow the plugin to read build.prop. It works fine on arale and krillin, but on mako it seems the variable is not present in the file. If you run getprop manually it will have permissions to read the socket, and the right value is returned.

This makes the telepathy-ofono mission control plugin fail to create the accounts and set the property that tells mission control to never disable the account when there is no network.

We have two options here: Either add rild.libpath to build.prop, or allow getprop to access dev/socket/property_service when launched via mission-control process.

Revision history for this message
Tony Espy (awe) wrote :

@Tiago

Does this code run before ofono is started? Relying on the property 'rild.libpath' seems to risk future breakage if were ever to release a version with native ofono modem support ( ie. not using rild ).

What restricts the access to dev/socket/property-service, apparmor? So it sounds like on mako, this property is set by some other process vs. the build.prop file, which causes the error when it's queried directly?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Currently neither the /usr/lib/telepathy/mission-control-5 nor the /usr/lib/telepathy/telepathy-ofono allow read access to /system/build.prop or dev/socket/property_service, so I'm not sure how this ever worked.

Notice that 'dev/socket/property_service' is missing the leading '/' which means that to add a rule for it, we would have to do something like:
--- telepathy-mission-control-5-5.16.3/debian/apparmor-profile 2015-02-02 01:43:56.000000000 -0600
+++ telepathy-mission-control-5-5.16.3/debian/apparmor-profile 2015-07-21 14:10:51.000000000 -0500
@@ -3,7 +3,7 @@

 #include <tunables/global>

-/usr/lib/telepathy/mission-control-5 {
+/usr/lib/telepathy/mission-control-5 (attach_disconnected) {
     #include <abstractions/base>
     #include <abstractions/dbus>
     #include <abstractions/dbus-session>
@@ -59,6 +59,10 @@
     /usr/share/accounts/services/ r,
     /usr/share/accounts/services/** r,

+ # Ubuntu Touch
+ /dev/socket/property_service rw,
+ @{PROC}/cmdline r,
+
     # Site-specific additions and overrides. See local/README for details.
     # Please note that accesses in local/usr.lib.telepathy are also applied to
     # /usr/lib/telepathy/telepathy-*.

'attach_disconnected' is something I'd like to avoid since it is at best a workaround for a limitation in apparmor (that we are working on but won't be fixed for a while). As such, I'd prefer that we "add rild.libpath to build.prop" if that doesn't have any other repercussions.

If we do that, will read access need to be granted to /system/build.prop? If you are going the rild.libpath route, please paste the denial and I can fix the profile accordingly.

Thanks!

Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

@jdstrand we added support for it in the overlay ppa: https://launchpadlibrarian.net/206890387/telepathy-mission-control-5_1%3A5.16.3-1ubuntu1_1%3A5.16.3-1ubuntu1.0.diff.gz

@tony mission control is launched by ofono-setup upstart job, and this is what we have in the upstart job:
start on started dbus

so we don't wait for ofono. I think we did in the past, but for some reason waiting on system services in a session upstart job stopped working at some point.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package telepathy-mission-control-5 - 1:5.16.3-1ubuntu3

---------------
telepathy-mission-control-5 (1:5.16.3-1ubuntu3) wily; urgency=medium

  [ Ken VanDine ]
  * debian/apparmor-profile:
    - Allow getprop execution by mission-control and its plugins
    - LP: #1442962

  [ Jamie Strandboge ]
  * debian/apparmor-profile: additional rules for mako:
    - use attach_disconnected, allow write to /dev/socket/property_service
      (requires attach_disconnected) and read on @{PROC}/cmdline
    - LP: #1476781

 -- Jamie Strandboge <email address hidden> Tue, 21 Jul 2015 14:10:53 -0500

Changed in telepathy-mission-control-5 (Ubuntu):
status: Triaged → Fix Released
Changed in canonical-devices-system-image:
assignee: nobody → Pat McGowan (pat-mcgowan)
importance: Undecided → Critical
milestone: none → ww34-2015
status: New → In Progress
Changed in telepathy-mission-control-5 (Ubuntu):
importance: Undecided → Critical
Changed in telepathy-ofono (Ubuntu):
importance: Undecided → Critical
tags: added: hotfix
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in telepathy-ofono (Ubuntu):
status: New → Confirmed
Revision history for this message
K1773R (k1773r) wrote :

so this will be included in OTA6 / revision X? or will OTA5 get an update

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

FYI, 1:5.16.3-1ubuntu1.1 is in silo 017 and being tested now.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@K1773R we will push a hotfix prior to OTA6

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

telepathy-mission-control-5 - 1:5.16.3-1ubuntu1.1 is now in stable-phone-overlay.

Tony Espy (awe)
summary: - [mako] cannot send sms unless a network connection is active
+ [mako] voicecalls and sms are broken unless a network connection is
+ active
Tony Espy (awe)
description: updated
Changed in telepathy-mission-control-5 (Ubuntu RTM):
status: New → Confirmed
Changed in telepathy-ofono (Ubuntu RTM):
status: New → Confirmed
Changed in telepathy-mission-control-5 (Ubuntu RTM):
status: Confirmed → Fix Released
Changed in telepathy-ofono (Ubuntu):
status: Confirmed → Invalid
Changed in telepathy-ofono (Ubuntu RTM):
status: Confirmed → Invalid
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Camilo Ernesto Blanco Peña (caerbp) wrote :

I installed the fix and the patch work successfully for me. Thank team!

Revision history for this message
Jens Becker (jens-be) wrote :

Silly question: How do I install the fix? Settings says there are no updates available!?

Revision history for this message
Camilo Ernesto Blanco Peña (caerbp) wrote : Re: [Bug 1476781] Re: [mako] voicecalls and sms are broken unless a network connection is active

Hi:

I installed via Sytem Config/Updates (running on Nexus 4 in version 21).
The version 22 is available for to install (it is a fix).

Regards...

El 28/07/15 a las 07:56, Jens Becker escibió:
> Silly question: How do I install the fix? Settings says there are no
> updates available!?
>

--
Lic. Camilo Ernesto Blanco Peña
Programador de equipos de cómputo
Computer System Programmer.

Móvil/Mobile: +5358135084

Calzada B. Unidad 117. #18.
Reparto Lenin, Ciudad Camagüey
Camagüey 5, Camagüey - Cuba CP: 70500

Registro en Cuba/Registered in Cuba: 478901

Revision history for this message
Jens Becker (jens-be) wrote :

Thank you, now I also get an update!

Greetings from Germany

Am 28.07.2015 um 14:52 schrieb Camilo Ernesto Blanco Peña:
> Hi:
>
> I installed via Sytem Config/Updates (running on Nexus 4 in version 21).
> The version 22 is available for to install (it is a fix).
>
> Regards...
>
>
> El 28/07/15 a las 07:56, Jens Becker escibió:
>> Silly question: How do I install the fix? Settings says there are no
>> updates available!?
>>

Revision history for this message
Nicolas (coinb) wrote :

Seems to work now with rev 22. Thanks guys !

Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.