Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kwrite: saving files causes KService to act up, resetting default apps and more #6601

Open
6 tasks done
crylune opened this issue Jan 7, 2025 · 0 comments
Open
6 tasks done

Comments

@crylune
Copy link

crylune commented Jan 7, 2025

Description

Saving a file as .txt in sandboxed Kwrite causes KService to crash, which in turn resets default applications and some applications such as Konsole and Strawberry disappearing (their .desktop file specifically), producing a "Plasma Workspace - Unknown application folder" error when launching them from the panel.

Steps to Reproduce

  1. Have Firejail sandbox Kwrite (should be default in firecfg.config).
  2. Enter Kwrite, write whatever, and make sure to save it as a .txt file on the Desktop or Documents folder.
  3. This should now crash KService and cause default applications to be reset along with the aforementioned .desktop file malfunctions.

Expected behavior

KWrite to save the text file successfully WITHOUT causing KService to act up.

Actual behavior

KWrite does save the file, but KService acts up.

Behavior without a profile

The program works as expected and no issues with KService are produced.

Additional context

Running kbuildsycoca6 --noincremental fixes the problem confirming it is an issue with Firejail and KService.

Environment

  • Name/version/arch of the Linux kernel (uname -srm): Linux 6.12.8-lune x86_64 (I run my own kernel, but happens on default Arch one too)
  • Name/version of the Linux distribution (e.g. "Ubuntu 20.04" or "Arch Linux"): Arch Linux
  • Version of Firejail (firejail --version): 0.9.72 (from official Arch repos)
  • If you use a development version of firejail, also the commit from which it
    was compiled (git rev-parse HEAD): -

Checklist

  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
  • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.

Log

Output of LC_ALL=C firejail /path/to/program

lune@arch: ~ $ LC_ALL=C firejail /usr/bin/kwrite
Reading profile /etc/firejail/kwrite.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-exec.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-shell.inc
Reading profile /etc/firejail/disable-xdg.inc
Reading profile /etc/firejail/whitelist-run-common.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 30651, child pid 30652
1 program installed in 1.06 ms
Warning: skipping alternatives for private /etc
Warning: skipping kde4rc for private /etc
Warning: skipping kde5rc for private /etc
Warning: skipping ld.so.preload for private /etc
Private /etc installed in 6.34 ms
Private /usr/etc installed in 0.00 ms
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Warning: not remounting /run/user/1000/doc
Warning: not remounting /run/user/1000/gvfs
Warning: cleaning all supplementary groups
Child process initialized in 74.25 ms
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
libkate.time: All plugins loaded in 0 ms
libkate.time: Created KateMainWindow in 26 ms
kf.config.core: Created a KConfigGroup on an inaccessible config location "baloofilerc" "Basic Settings"
UdevQt: unable to create udev monitor connection
kf.config.core: Created a KConfigGroup on an inaccessible config location "dolphinrc" "PreviewSettings"
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
kf.config.core: Couldn't create a new file: "/home/lune/.config/kdeglobals" . Error: "Existing file /home/lune/.config/kdeglobals is not writable"

Parent is shutting down, bye...

Output of LC_ALL=C firejail --debug /path/to/program

https://gist.github.com/crylune/4f5192719a122762feaadea9f4997fd5

@kmk3 kmk3 changed the title Sandboxed KWrite saving files causes KService to act up, resetting default apps and more kwrite: saving files causes KService to act up, resetting default apps and more Jan 11, 2025
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

No branches or pull requests

1 participant