Account plugins should be made confinable by apparmor
Bug #1219644 reported by
Alberto Mardegan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Click Reviewers tools (obsolete) |
Fix Released
|
Medium
|
Jamie Strandboge | ||
Online Accounts setup for Ubuntu Touch |
Fix Released
|
Medium
|
Alberto Mardegan | ||
Ubuntu Developer Portal |
Confirmed
|
High
|
Unassigned | ||
apparmor-easyprof-ubuntu (Ubuntu) |
Fix Released
|
Medium
|
Jamie Strandboge | ||
ubuntu-system-settings-online-accounts (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
With the current implementation, the QML files for account plugins are executed by the Online Accounts QML applet which in turn is executed within the System Settings process, which probably means that malicious account plugins could control everything that the System Settings process can (like entering/exiting the flight mode).
Account plugins (or the Online Accounts applet itself) should probably be run in a separate process, which could then be assigned a stricter confinement with apparmor.
Related branches
lp://staging/~mardy/ubuntu-system-settings-online-accounts/click-plugins
Merged
into
lp://staging/~online-accounts/ubuntu-system-settings-online-accounts/master
at
revision 223
- David Barth (community): Approve
-
Diff: 1886 lines (+1239/-61)29 files modified.bzrignore (+1/-0)
online-accounts-service/libaccounts-service.cpp (+257/-0)
online-accounts-service/libaccounts-service.h (+69/-0)
online-accounts-service/main.cpp (+9/-0)
online-accounts-service/online-accounts-service.pro (+7/-2)
online-accounts-service/request.cpp (+12/-32)
online-accounts-service/request.h (+1/-0)
online-accounts-service/signonui-service.cpp (+16/-1)
online-accounts-service/ui-proxy.cpp (+105/-15)
online-accounts-service/ui-proxy.h (+4/-0)
online-accounts-service/utils.cpp (+57/-0)
online-accounts-service/utils.h (+34/-0)
online-accounts-ui/browser-request.cpp (+5/-4)
online-accounts-ui/main.cpp (+17/-3)
online-accounts-ui/signonui-request.cpp (+43/-0)
online-accounts-ui/signonui-request.h (+1/-0)
plugins/module/OAuth.qml (+1/-0)
plugins/plugins.pro (+2/-1)
tests/online-accounts-service/mock/request-mock.cpp (+10/-0)
tests/online-accounts-service/mock/request-mock.h (+2/-0)
tests/online-accounts-service/online-accounts-service.pro (+1/-0)
tests/online-accounts-service/tst_libaccounts_service.cpp (+522/-0)
tests/online-accounts-service/tst_libaccounts_service.pro (+38/-0)
tests/online-accounts-service/tst_service.pro (+2/-0)
tests/online-accounts-service/tst_signonui_service.pro (+2/-0)
tests/online-accounts-service/tst_ui_proxy.pro (+1/-0)
tests/online-accounts-ui/mock/signonui-request-mock.cpp (+6/-0)
tests/online-accounts-ui/mock/signonui-request-mock.h (+3/-0)
tests/online-accounts-ui/tst_browser_request.cpp (+11/-3)
lp://staging/~mardy/ubuntu-system-settings-online-accounts/lp1219644-cont
Merged
into
lp://staging/~online-accounts/ubuntu-system-settings-online-accounts/master
at
revision 230
- Justin McPherson: Approve
-
Diff: 157 lines (+124/-0)3 files modifiedonline-accounts-service/ui-proxy.cpp (+7/-0)
online-accounts-ui/signonui-request.cpp (+9/-0)
po/oc.po (+108/-0)
Changed in ubuntu-system-settings-online-accounts: | |
assignee: | nobody → Alberto Mardegan (mardy) |
importance: | High → Medium |
Changed in ubuntu-system-settings-online-accounts: | |
status: | Confirmed → In Progress |
Changed in apparmor-easyprof-ubuntu (Ubuntu): | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in click-reviewers-tools: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Jamie Strandboge (jdstrand) |
tags: | added: application-confinement |
Changed in ubuntu-system-settings-online-accounts: | |
status: | In Progress → Fix Released |
Changed in ubuntu-system-settings-online-accounts: | |
status: | Confirmed → Fix Released |
Changed in click-reviewers-tools: | |
status: | Confirmed → In Progress |
Changed in click-reviewers-tools: | |
status: | In Progress → Fix Released |
Changed in developer-ubuntu-com: | |
importance: | Undecided → High |
status: | New → Confirmed |
To post a comment you must log in.
The attached branch is a WIP with the changes on the Online Accounts part.
I added the apparmor- easyprof- ubuntu project to the bug because I think we'll need some changes there:
- There should be a way to specify an apparmor policy file for an account plugin, in the manifest file. This policy will typically contain the "accounts" policy, and then often also the "networking" and "webview" policies; but I'd rather let the developer explicitly declare all of the needed policies.
- The account plugin should have access to a unix socket: /run/user/ <user-id> /online- accounts- ui/ui-< random- number>
This is probably not really necessary with the current WIP code, since we call aa_change_profile() after connecting to that socket; we'll understand this better when we can test the whole thing.
- The account plugin should be able to send method calls on this D-Bus service (on the session bus): com.google. code.AccountsSS O.Accounts. Manager /com/google/ code/AccountsSS O/Accounts/ Manager com.google. code.AccountsSS O.Accounts. Manager
service=
path=
interface=
(the service then will itself check the apparmor label of the peer and decide whether to process the request or not)