Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 22700 ideas, 138270 comments, 2629576 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #17246: Adding 3rd party apt sources is too risky - apt needs ringfencing system

Written by zoubidoo the 13 Jan 09 at 08:46. Related project: Update manager. Status: New
Rationale
When we add a third-party apt repository to our software sources, that source can replace just about any package on our system. That strikes me as a pretty serious security risk.

For example, suppose you get the latest version of Skype by adding skype.com to your sources. Someone hacks the Skype repository and adds a malicious version of Firefox. If the compromised Firefox has a newer version number, then your system will be updated and you end up running the malicious Firefox that transmits private data to Dr. Evil.

I'm just using Skype as an example, it could equally well be mplayer, medibuntu, or John Doe. Clearly the more repositories added, the greater the chance of being compromised.

And when a repository is hacked, all the systems using that repository can be compromised.

Of course the hacker has to get hold of the package signing system too - this provides some protection. But nevertheless control of what packages can be installed should remain on our end.

Here's the key point: just because a repository is in our software sources doesn't mean it should be able to replace *any* package on our system.

9
votes
up equal down
Solution #1: Auto-generated solution of idea #17246
Written by zoubidoo the 13 Jan 09 at 08:46.
Ubuntu Brainstorm was updated in January 2009. Since the idea #17246 was submitted before this update, its rationale and solution are not separated. Please vote accordingly, and if you have the necessary rights, please separate the rationale from the solution. Thanks!
60
votes
up equal down
Solution #2: Allow ringfencing of apt sources
Written by zoubidoo the 13 Jan 09 at 21:38.
The ringfence could be a whitelist of packages that the repository can install/replace. For instance, we could stipulate that the Skype repository can only affect packages starting with skype-*. That means the kernel, glib, bash, firefox etc are not at risk from that source.
-8
votes
up equal down
Solution #3: Bind packages to the repo they were installed from
Written by mhall119 the 25 May 11 at 14:14.
When you install a package from a repo, it could store which repo it was installed from, and only accept updates from that repo. That way if you install "unity" from the Ubuntu Main repo, it won't try and update it from the indicator-multiload PPA.
11
votes
up equal down
Solution #4: Update Manager could separate sections for each PPA
Written by Dazed_75 the 29 May 11 at 17:51.
Basically, Update Manager which must scan seac source separately anyway would just display a separator between each repository [which has updates] stating which repository following updates are coming from. That way users have the information and can choose as they will.

I still like Option 1 and would like to see both happen.

Propose your solution

Attachments
No attachments.


Duplicates


Comments
Ssdg wrote on the 13 Jan 09 at 09:54
-1 totally useless.

Why? because when you install a package, the package gains a complete access to your system via the root account. from here, it can download a package or just a binary and replace your firefox/kernel/banking management tool/passwords keeper/porn Directory/...

Once you add a new repository you're supposed to trust it, if you don't you should not install that package or complain when your system get compromised.

zoubidoo wrote on the 13 Jan 09 at 10:26
@Sadg
Useless? If you think it is normal to let third parties (e.g. obscure games packagers) have full control of your system, then you don't have very high security expectations for an operating system.

Why wouldn't it be possible for third party code to be chroot'ed?

I wonder how many users realise that adding a source permits full access to private data, sensitive banking information included. A lot of people are in for some nasty surprises.


viraptor wrote on the 13 Jan 09 at 17:26
It's not useless -> most reasonable repositories contain signed packages. You can verify the key needed for them on some web page.
If a random third-party is capable of injecting a package into the repository, but is not capable of signing it with the same key as the other packages, then a repository-whitelist might be a 'good enough' security measure.

zoubidoo wrote on the 13 Jan 09 at 19:06
The issue of security with third party repositories is also discussed here:
https://wiki.ubuntu.com/ThirdPartyApt

@viraptor: a repository whitelist is certainly one approach.

Another approach is to use a sandbox such Plash or SysTrace for third party software.

I think it is perfectly normal to trust some package sources less than others. I'm always going to trust the official ubuntu sources more than some obscure gaming site when it comes to my banking details. An OS should definitely allow the user to implement this policy of trust.

rouge568 wrote on the 14 Jan 09 at 03:26
@zoubidoo
Just fyi, you can edit the "auto generated solution" so that it reflects the one you actually want. You don't have to create a whole new one.

zoubidoo wrote on the 19 Jan 09 at 02:39
Thanks rouge. Actually I tried and it didn't save my edits so I just created another solution. This was just at the time of the switch to new brainstorm so perhaps it was some transient issue.

rouge568 wrote on the 19 Jan 09 at 02:50
Yeah, I noticed it too, so I posted a bug. It's fixed now!


Post your comment