Skip to content

Conversation

@zpytela
Copy link
Contributor

@zpytela zpytela commented Nov 18, 2025

No description provided.

Thumbnail services (Tumbler/GNOME Desktop Thumbnailer) use bwrap
(bubblewrap) to generate thumbnails in a secure sandbox, e.g. when
taking screenshots or viewing images in the file manager (Thunar/GNOME Files).

This policy update adds all necessary permissions for bwrap to function
properly in the thumb_t context for thumbnail generation. It addresses
user_namespace creation, filesystem mount operations, and symlink creation
that are required for bwrap's sandboxing mechanism.

* COMPREHENSIVE BWRAP POLICY FOR THUMBNAIL GENERATION
* Based on Red Hat Bugzilla #2327872 and bwrap documentation

* 1. USER NAMESPACE CREATION (Critical - from RH Bug #2327872)
* Allows bwrap to create user namespaces for sandboxing
allow thumb_t self:user_namespace create;

* 2. CAPABILITY PERMISSIONS (User namespace operations)
* Required for bwrap to manage sandboxed processes
allow thumb_t self:cap_userns { net_admin setpcap sys_admin sys_ptrace };

* 3. PROCESS CAPABILITIES
* Allows bwrap to set capabilities on sandboxed processes
allow thumb_t self:process setcap;

* 4. NETWORK NAMESPACE CONFIGURATION
* Required for bwrap to configure network namespaces in sandbox
allow thumb_t self:netlink_route_socket nlmsg_write;

* 5. FILESYSTEM MOUNT OPERATIONS
* Allows bwrap to create bind mounts and mount points

* Mount on root directory (for creating sandbox root)
allow thumb_t root_t:dir mounton;

* Mount on tmpfs directories (for /tmp isolation)
allow thumb_t thumb_tmpfs_t:dir mounton;
allow thumb_t tmpfs_t:dir mounton;

* 6. FILESYSTEM REMOUNT/MOUNT/UNMOUNT
* Allows bwrap to:
* - mount: Create new mounts for sandbox
* - remount: Change mount flags (e.g., read-only)
* - unmount: Clean up sandbox mounts
allow thumb_t fs_t:filesystem { mount remount unmount };

* 7. SYMBOLIC LINK CREATION
* Allows bwrap to create stdin/stdout/stderr symlinks in sandbox tmpfs
allow thumb_t thumb_tmpfs_t:lnk_file create;

Authored-by: [email protected]
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2415016
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2390663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant