Gentoo Archives: gentoo-portage-dev

From: Brian Harring <ferringb@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] New preserve-libs feature
Date: Sat, 17 Feb 2007 15:50:00
Message-Id: 20070217153623.GE22681@seldon
In Reply to: Re: [gentoo-portage-dev] New preserve-libs feature by Mike Frysinger
1 On Sat, Feb 17, 2007 at 10:09:35AM -0500, Mike Frysinger wrote:
2 > On Saturday 17 February 2007, Brian Harring wrote:
3 > > On Sat, Feb 17, 2007 at 09:39:58AM -0500, Mike Frysinger wrote:
4 > > > On Saturday 17 February 2007, Brian Harring wrote:
5 > > > > Security impact is from a pkg potentially dragging along old libs; if
6 > > > > you've got a stable pkg that gets an update once every blue moon, it
7 > > > > can hold onto the lib for a *long* time while still using the lib;
8 > > > > thus if a vuln. in the lib, said pkg still is screwed.
9 > > >
10 > > > umm, no ... the package itself is updated against the new copy while the
11 > > > old copy exists for other packages that have already been built
12 > >
13 > > Suspect you're ignoring soname changes, which is about all this patch
14 > > would address- for example, ssl's old form of breakage. In that case,
15 > > *yes* the package gets updated, anything recompiled should get the
16 > > correct lib
17 >
18 > i'm not ignoring soname changes, those are exactly what i'm talking about
19 >
20 > > (assuming the code knows the appropriate linker args)
21 >
22 > there is no such thing ... it's always "-lfoo"
23
24 The point is that it is *not* always -lfoo. Commenting about packages
25 that collapse, split libs apart, where -lorig becomes -lnew1 -lnew2.
26
27 Non-slotted package upgrade crossing a major version (assuming they're
28 not being dumb asses), that scenario *does* occur, and it's not the
29 same args.
30
31 Until all packages are upgraded (assuming an ugprade is available) to
32 use the new layout, the old lingers.
33
34 Also, so help me, if you respond to valid critism with "it doesn't
35 actually matter" as a retort, you're getting wedgied considering
36 this is one of the scenarios this patch is supposed to address :p
37
38
39 > > > > Other angle is someone intentionally forcing usage of a known bad
40 > > > > library that is still dangling. Corner case, but doable.
41 > > >
42 > > > as i said, this is the "invalid" syntax:
43 > > > ... /usr/lib/libfoo.so.3 ...
44 > >
45 > > Not to LD_PRELOAD :)
46 > >
47 > > Haven't tried anything crazy, but suspect it can be abused to override
48 > > to the old.
49 >
50 > again, not in any scenario that actually matters ... so this too is a
51 > pointless line of thought to pursue as it has no real security impact
52
53 Eh? setuid comes to mind, or any other attempt to finagle privs via
54 forcing the bad lib. Combined with the scenario above (where a
55 crappy pkg can hold the lib around for a *long* time), tend to think
56 it matters.
57
58
59 > > > > Bit curious how this is going to behave if via linked in libs, new loc
60 > > > > and old get loaded alongside...
61 > > >
62 > > > this would require multiple libraries to be involved in the equation and
63 > > > the answer is undefined behavior which most certainly result in runtime
64 > > > failures ...
65 > >
66 > > Point there was that instead of just bailing with "lib is missing",
67 > > suspect it'll manage to run, then segfault at potentially crappy
68 > > times.
69 >
70 > this is really an outside case and not worth worrying over
71
72 It's a change in behaviour; previously, would just flat out stop; now
73 it'll run, but probably take a poo in your shoes.
74
75 Going from the potential of "it won't run" to "it eats itself in
76 special way" is *not* something I'd blistfully write off as "not
77 worth worring over", considering what this change intends to address.
78
79 Additional comment, introducing the change makes it so that glsa's
80 aren't really as accurate- version based, rather then lib.
81
82 ~harring

Replies

Subject Author
Re: [gentoo-portage-dev] New preserve-libs feature Mike Frysinger <vapier@g.o>