🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #67766

Security of binary packages (was Re: slrn-0.9.6.3 and all that - thanks!)

#67766
From: Colin Watson
Date: Sat, 18 Nov 2000 00:00
137 lines
8352 bytes
J.B. Nicholson-Owens <jbn@forestfield.org> wrote:

[Rather off-topic for news.software.readers; moving to
comp.os.linux.security.]

>Jan Schaumann wrote:
>> True. But /occasionally/ it can be nice to use a package-manager to
>> quickly check out an application.
>
>And inadvertantly run an application with a virus or trojan horse built
>into it.  This makes me think the risks that come with that kind of
>speed are too high to justify.  If your time is really worth something,
>I'd think you would want to take the effort to at least get source you
>believe to be reliable (say from JED's FTP site, as opposed to
>someone's compiled version), maybe even read it and gain an
>understanding of what it will do.

As the maintainer of a couple of Debian packages, I naturally
wholeheartedly disagree.

I would much rather download and install binary packages from a
distribution to which I can assign some level of trust (e.g. Debian),
which has lots of users, a bug tracking system, and mailing lists where
I can watch out for problems [1], than type './configure; make; su -c
"make install"' on some random source tarball I don't know from Adam.
For all I know I'm the only person who's ever looked at the source
package and it could have 'rm -rf /' embedded three levels deep in some
convoluted recursive Makefile structure.

My time is worth quite a lot to me, yes, because I never have enough of
it. Specifically, I don't have the time to perform even a cursory audit
of most of the programs I use on a day-to-day basis. I'm willing to
believe that the maintainer of a binary package in a popular
distribution has more time to devote to that package than I do (I
certainly believe that I've put a lot more time into my packages than
most users of those packages have), and is much more likely to spot
security holes. To me, the extra set of eyes (not even counting other
users) provide an extra level of auditing rather than another source of
holes. They can (and usually do) also watch out for holes reported in
places like Bugtraq and patch them, often before upstream has a chance
to release fixes.

Furthermore, if you're a Linux user, then you've probably already
trusted your distribution to supply you with a C compiler without, say,
Ken Thompson's login backdoor. Thus, it's a security win if you only
have to take the trust you've assigned to your distribution and extend
it to other packages (which are probably less fruitful targets for
trojans), rather than having to trust any number of random source
suppliers. Binary packages from less well-known sources are of course a
different matter, but the more reputable ones usually supply the source
patches needed to produce the packages they ship; in any case, why
aren't you using a distribution that already has what you want packaged?
:)

[1] Recently, I dodged a bug in a Debian package by noticing that a
    number of people on the debian-user mailing list had reported
    problems with that upgrade. This was probably before the maintainer
    had had a chance to acknowledge the problem, much less prepare a
    fix, and I only have to subscribe to and read one or two mailing
    lists to get that benefit for the entire distribution. Try that with
    a new source tarball on some anonymous website.

>> If I, for example, just want to try out a program and see if it does
>> what I think it does, then [rpm install] is usually faster than
>> [download, compile and install from source].
>
>I'm not sure what you mean by 'faster' here--if it's the number of
>keystrokes you want to minimize, you could make a program to download,
>compile and install something for you.

I don't understand why you're so paranoid about binary packages and then
suggest something like this, which displays an implicit trust in
upstream source.

>For GNU autoconf software at least, you would probably get something
>reasonable (in terms of compile options) just by accepting defaults.

I think you seriously underestimate the difficulty of this task, as well
as the value of system integration. Debian has a utility called dh_make,
in the dh-make package, which attempts to partially automate the task
of building source packages (of course, building binary packages is
already automatic once you have working source packages). 23 revisions
in, I've never yet seen it do a good enough job that it didn't require a
good deal of manual oversight. Upstream packages just vary too much for
this level of automation to be possible. In any case, that's what
distributions are *for*.

Once you stray away from the comfortable land of autoconf it becomes
even less plausible. Take trn4, for example (which happens to be one of
the Debian packages I maintain): the configuration process is definitely
non-trivial, and it's long enough and with enough interdependencies
among the questions it asks that a user unfamiliar with it is unlikely
to pick the right ones straight off. That's even without trying to make
it co-operate nicely with the other newsreader and news server packages
in Debian, especially letting it co-exist with trn-3.6 (which is also
packaged) and still have everything where Debian users naturally expect
it to go.

I'm not trying to say that any of this is rocket science or anything,
but it requires a certain amount of time and attention to detail.
Somebody who wants, for instance, a different newsreader on their Linux
workstation at work than the one the system administrator has installed
by default isn't going to be able to justify the time spent finding the
source, reading it to work out whether the Makefiles do anything evil,
working out how to compile it well on their system, and installing it in
such a way that it can easily be uninstalled cleanly - even supposing
they have the skills for all of this - when they could spend ten seconds
doing 'apt-get install trn4' and then being free to do other work for
which they're more qualified.

If people want to look at the source of distributed packages, they are
quite free to download the source packages (pre-patched as required to
generate valid and policy-compliant packages for that distribution).
They can then build and install the binary packages themselves with a
couple of commands ('dpkg-buildpackage -rfakeroot; dpkg -i
../package.deb' in this case) if they feel the need, and gain the
benefit of a trusted source. Since most packages are autobuilt anyway
this shouldn't be an issue.

>For any other definition of faster I still suggest you compile your own
>copy.  You never know what has been compiled into anything: incorrect
>paths to global config files (mildly offensive but annoying) to the
>serious stuff including trojan horses that recursively destroy your
>homedir, spy routines and backdoors so someone can gain access to your
>system at their convenience.

I think that, provided you get binary packages from a single source
(which is demonstrably possible, since I do it with Debian), then your
worries are actually a security loss for most users, as well as a
needless time sink.

-- 
Colin Watson                                     [cjw44@flatline.org.uk]
"Alas, alas poor Willie, we'll hear his voice no more.
 What he took for H2O was H2SO4" - Ruthless Rhymes for Heartless Homes

Technical Details
Message-ID: <8v6u1i$fv$1@riva.ucam.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.linux.security.mbox.zip!not-for-mail
References: <8ri78o$hpvdj$1@fu-berlin.de> <slrn918q7a.mo9.trljc@kubrick.lan> <slrn918rnt.rve.jschauma@www.netmeister.org> <slrn919ags.18h.jbn@next.forestfield.org>

Show Full Headers
Complete Article Headers
Message-ID: <8v6u1i$fv$1@riva.ucam.org>
Subject: Security of binary packages (was Re: slrn-0.9.6.3 and all that - thanks!)
Date: Sat, 18 Nov 2000 00:00:00 +0000
From: cjw44@flatline.org.uk (Colin Watson)
References: <8ri78o$hpvdj$1@fu-berlin.de> <slrn918q7a.mo9.trljc@kubrick.lan> <slrn918rnt.rve.jschauma@www.netmeister.org> <slrn919ags.18h.jbn@next.forestfield.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.linux.security.mbox.zip!not-for-mail
X-Deja-AN: 695213021
Followup-To: comp.os.linux.security
X-Complaints-To: abuse@ntlworld.com
X-Trace: news6-win.server.ntlworld.com 974584629 62.253.132.107 (Sat, 18 Nov 2000 21:57:09 GMT)
Organization: riva.ucam.org
NNTP-Posting-Date: Sat, 18 Nov 2000 21:57:09 GMT
Newsgroups: news.software.readers,comp.os.linux.security