Seccomp should allow fchown() with current userid/groupid

Bug #1605273 reported by Lucy Llewellyn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

While running HexChat in a snap Seccomp kicked-in on the attempt issued by HexChat via GLib's g_file_replace_contents() and g_file_append_to() functions with the flag G_FILE_CREATE_PRIVATE to use the syscall fchown(). This kills the application requiring force-close.

I believe the most appropriate response is to slacken the restrictions by Seccomp to allow fchown() provided that the user-id and/or group-id to change ownership to are of the current-user the application is running-as.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: snappy (not installed)
ProcVersionSignature: Ubuntu 4.4.0-31.50-generic 4.4.13
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Jul 21 15:18:38 2016
InstallationDate: Installed on 2016-07-19 (1 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: snappy-player
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :
affects: snappy-player (Ubuntu) → snapd (Ubuntu)
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

It might be possible to do this with seccomp argument filtering. The idea is that the launcher would add the uid and gid of the user as arguments to chown dynamically as part of the seccomp filter generation. This will need a little thought, but I think it is doable.

Changed in snapd (Ubuntu):
status: New → Confirmed
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.