snap-confine doesn't work from per-snap namespaces it creates

Bug #1644439 reported by Zygmunt Krynicki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snap-confine
Fix Released
High
Zygmunt Krynicki

Bug Description

This is a mirror of the following github issue:

https://github.com/snapcore/snap-confine/issues/179

Technically this is caused by the fact that per-snap namesapce doesn't contain /run/snapd/ns/ from the outer, main mount namespace as it has to be a privately shared mount point to satisfy kernel requirements.

As a solution snap-confine should measure the namespace of pid 1 and its own namespace and setns to the pid 1 namespace if they differ, before trying to create a derivative namespace of any kind.

Zygmunt Krynicki (zyga)
Changed in snap-confine:
milestone: none → 1.0.45
importance: Undecided → High
status: New → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Chris Wayne (cwayne) wrote :

Any update on this?

Zygmunt Krynicki (zyga)
Changed in snap-confine:
milestone: 2.19 → none
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is now tracked as https://github.com/snapcore/snapd/pull/2624

There's a chance this will not land as it seems to cause an oops in the kernel.

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

This has been fixed and is pending merge. The next kernel SRU on the 20th of Feb should allow us to land the fix.

Revision history for this message
Chris Wayne (cwayne) wrote :

Any progress on getting this SRUd?

Revision history for this message
Jerry Kao (jerry.kao) wrote :

Is there any update on this?

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

This is now bound to the release cycle of the -67 ubuntu kernel for Xenial (and other releases).

Zygmunt Krynicki (zyga)
Changed in snap-confine:
status: In Progress → Fix Committed
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.