OpenPrinting / OpenPrinting/ghostscript-printer-app

snap cannot access USB devices

Open
#1 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PostScript
Stars
44
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Running on focal, USB devices are not discovered due to AppArmor denial. Works in devmode. Despite being connected to raw-usb?

Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:150): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:151): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:152): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/speed" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:153): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/descriptors" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:154): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:155): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:156): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/speed" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:157): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/descriptors" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:158): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:159): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the snap.ghostscript-printer-app.ghostscript-printer-app-server AppArmor profile and compare its confinement with devmode and raw-usb on focal. Reproduce USB discovery and inspect the listed /sys/.../usb1 paths; done means connected USB devices are discovered without devmode.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.