keybase / keybase/client

Desktop GUI Client: world-readable preview images written to /tmp

Open
#5,800 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

I'm using keybase 1.0.18-20170209170023+17b641d on amd64 Ubuntu Linux 16.10.

When the Desktop GUI shows a preview of an image attached to a chat, a new, world-readable file is created in /tmp whose filename is of the pattern kbchat-preview-$A_SMALL_NUMBER-$FILENAME_OF_IMAGE . A_SMALL_NUMBER may be the attachment ID or something. The file is created with mode 664. You need not have attached the image to the chat for the GUI to generate this file; encountering a previously-attached image while scrolling through chat history also triggers file generation.

The least that could be done is to create the file with mode 600. However, filenames could be sensitive information, so an even better idea would be to use a directory with mode 700 and owned by the user running keybase for keybase's scratch space.

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 by reproducing the issue in the Desktop GUI on Ubuntu by opening an attached image or scrolling through chat history, then inspect how the preview is written to /tmp. Done means preview files are no longer world-readable and sensitive filenames are protected in user-only scratch space.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
desktop, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.