"enable" does not apply connected slot security policy

Bug #1708703 reported by Alberto Aguirre
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
Zygmunt Krynicki

Bug Description

Using:
snap 2.26.14+git292.6ceaef7~ubuntu16.04.1
snapd 2.26.14+git292.6ceaef7~ubuntu16.04.1

When enabling/disabling a snap that is connected to a slot, the Rules that apply to the connected slot apparently don't run.

For example, when installing mir-kiosk and mir-kiosk-apps, you can see the following crucial apparmor rule applied to mir-kiosk, which allows it to receive data from mir-kiosk-apps, as they are connected through the mir interface:

cat /var/lib/snapd/apparmor/profiles/snap.mir-kiosk.mir-kiosk | grep unix:

unix (receive, send) type=seqpacket addr=none peer=(label="snap.mir-kiosk-apps.mir-kiosk-app-daemon")

However, after doing snap disable mir-kiosk-apps; snap enable mir-kiosk-apps, the rule is no longer applied.

Zygmunt Krynicki (zyga)
Changed in snappy:
assignee: nobody → Zygmunt Krynicki (zyga)
Zygmunt Krynicki (zyga)
affects: snappy → snapd
Michael Vogt (mvo)
Changed in snapd:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Michael Vogt (mvo) wrote :

I can still reproduce this git master. I remember we fixed an issue with disable/enable a while ago.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I fixed this locally and will send a PR shortly.

Changed in snapd:
status: Triaged → In Progress
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is now fixed with the following PR: https://github.com/snapcore/snapd/pull/4430

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The fix has just been merged into master. It should be available along with the next snapd release (circa 2.31)

Changed in snapd:
status: In Progress → Fix Committed
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This was released a long time ago, marking as fix released.

Changed in snapd:
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.