Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198473 - app-backup/sarab < 0.2.4 unveils keyphrase via simple 'ps' or 'top' while running (CVE-2008-2517)
Summary: app-backup/sarab < 0.2.4 unveils keyphrase via simple 'ps' or 'top' while run...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Default Configs (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Security
URL: http://secunia.com/advisories/30394/
Whiteboard: B3 [noglsa]
Keywords:
Depends on:
Blocks: 212048
  Show dependency tree
 
Reported: 2007-11-08 18:04 UTC by Axel Reimann
Modified: 2010-04-30 17:27 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
let dar read encryption options from file sarab.crypt instead of command line (sarab.conf.patch,757 bytes, patch)
2007-11-10 19:35 UTC, Axel Reimann
Details | Diff
new file /etc/sarab/sarab.crypt containing encryption options (sarab.crypt,278 bytes, text/plain)
2007-11-10 19:37 UTC, Axel Reimann
Details
let dar read encryption options from file sarab.crypt instead of command line (sarab.conf.patch,763 bytes, patch)
2007-11-10 19:46 UTC, Axel Reimann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Reimann 2007-11-08 18:04:34 UTC
The way the Gentoo scripts configure sarab (which in turn feeds dar) makes 
any user-configured keyphrases visible to everybody with shell access.

Reproducible: Always

Steps to Reproduce:
1. set encryption options including keyphrase in /etc/sarab.conf
2. run a non-trivial backup, so dar is running a few seconds
3. call 'ps --aux' as any user to read confidential keyphrase from shell




It is absolutely trivial to fix this problem by e.g. outsourcing 
the encryption settings to a third file and include this file via
sarab's command line option (and dar's respectively):   '--batch'

A call to 'top' or 'ps' would in that case only show where the
password is stored, instead of unveiling the keyphrase directly.
Comment 1 Robert Buchholz (RETIRED) gentoo-dev 2007-11-09 09:43:08 UTC
App-backup, the application is in your category, but maintainer-needed.
Can you advise on this?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-09 09:52:14 UTC
security:
It's an old package that mkennedy maintained before he retired.
No upstream releases for a couple of years, but from what I'm told, it's still very applicable to the tree. Matsuu maintains DAR, so he might have some insights.

axel.privat: could you please attach a patch that implements what you describe?
Comment 3 Axel Reimann 2007-11-10 19:35:20 UTC
Created attachment 135665 [details, diff]
let dar read encryption options from file sarab.crypt instead of command line
Comment 4 Axel Reimann 2007-11-10 19:37:20 UTC
Created attachment 135667 [details]
new file /etc/sarab/sarab.crypt containing encryption options
Comment 5 Axel Reimann 2007-11-10 19:43:54 UTC
Outsourcing the encryption options to a file that is to be read by dar
alters the command line in a way that prevents the keyphrase from beeing
exposed. The above patches work for me, hope it helps others, too.
Please let me know if the patch cannot be applied (it's the first time
I tried to create a patch file) -- I'd like to see the sarab package
stay around for a while as it works just as advertised. :)
Comment 6 Axel Reimann 2007-11-10 19:46:19 UTC
Created attachment 135668 [details, diff]
let dar read encryption options from file sarab.crypt instead of command line

fixed comment
Comment 7 Axel Reimann 2007-11-10 19:55:52 UTC
...forgot to say that, of course, the file sarab.crypt must have the 
same restrictive permissions as the file sarab.conf:

> chmod 600 sarab.crypt
Comment 8 Pierre-Yves Rofes (RETIRED) gentoo-dev 2007-11-13 19:09:07 UTC
app-backup, does the patch seem ok? If yes, please provide an updated ebuild. 
Comment 9 Pierre-Yves Rofes (RETIRED) gentoo-dev 2007-12-08 23:55:03 UTC
(In reply to comment #8)
> app-backup, does the patch seem ok? If yes, please provide an updated ebuild. 
> 

*ping*
Comment 10 Pierre-Yves Rofes (RETIRED) gentoo-dev 2008-05-11 13:41:29 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > app-backup, does the patch seem ok? If yes, please provide an updated ebuild. 
> > 
> 
> *ping*
> 
... timeout :(

could someone please apply the patches so that we can move forward? thanks.
Comment 11 Robert Buchholz (RETIRED) gentoo-dev 2008-05-12 19:39:11 UTC
0.2.3 is released, and it has included a new password mechanism. From my understanding, it's vulnerable to the same issue. I contacted upstream to work out a solution, because from what I understand, the solution posted here has drawbacks in terms of "testing" backups.

I'll report back whenever I have a reply and hopefully bump the package.
Comment 12 Pierre-Yves Rofes (RETIRED) gentoo-dev 2008-06-01 18:10:36 UTC
0.2.4 has been released. rbu, feel like bumping it?
Comment 13 Robert Buchholz (RETIRED) gentoo-dev 2008-06-01 18:59:34 UTC
Right, upstream was very helpful via private mail. I wanted to review the code changes before bumping it though, hopefully soon.
Comment 14 Robert Buchholz (RETIRED) gentoo-dev 2008-06-03 22:52:11 UTC
*sarab-0.2.4 (03 Jun 2008)

  03 Jun 2008; Robert Buchholz <rbu@gentoo.org>
  -files/0.2.2-fix-rotation-gentoo.patch,
  -files/0.2.2-test-with-encryption-gentoo.patch,
  -files/0.2.2-refname-calculation-gentoo.patch,
  +files/0.2.4-better-defaults-gentoo.patch,
  -files/0.2.2-better-defaults-gentoo.patch, files/README.Gentoo,
  -sarab-0.2.2-r1.ebuild, -sarab-0.2.2-r2.ebuild, +sarab-0.2.4.ebuild:
  Version bump, fixes security bug #198473 (CVE-2008-2517), DAR encryption
  passwords were visible to local users via ps. Also introduces support for
  newer versions of DAR (bug #212048).