Skip to content

Only copy notification images from tmp, runtime, and packaged icons - #10801

Open
Chessing234 wants to merge 4 commits into
omacom:quattrofrom
Chessing234:security/notif-image-copy-allowlist
Open

Only copy notification images from tmp, runtime, and packaged icons#10801
Chessing234 wants to merge 4 commits into
omacom:quattrofrom
Chessing234:security/notif-image-copy-allowlist

Conversation

@Chessing234

Copy link
Copy Markdown
Contributor

Summary

  • Notification history used to copy any file:// path the sender named, including things like ~/.ssh and /etc.
  • Copies are now limited to /tmp, /var/tmp, /run/user, and packaged icon dirs, and the copy job re-checks with realpath so a /tmp symlink cannot pull in a secret.
  • Unsafe file:// values are dropped from persisted JSON so restore cannot re-open them.

Test plan

  • test/shell.d/notifications-test.sh
  • Restore a toast whose image was a /tmp Chromium avatar
  • Confirm a notification whose icon is file:///etc/passwd does not grow a history image file

Made with Cursor

A same-uid sender can name file:///home/…/.ssh in a toast. The shell runs
as the user and used to copy that path into history.
The JS allowlist is not enough if /tmp/foo is a symlink onto a secret.
…opies.

History JSON must not keep a file:// path into /etc or ~/.ssh either.
@Chessing234

Copy link
Copy Markdown
Contributor Author

hey @ErikMelton, would you mind reviewing my open security prs when you have a minute? #10804 #10802 #10801 #10507 #10506 #10505 #10504 #10503 #9086 #9084 #9083 #9082 #8498 #8424 #8374 #8370 #8365

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