Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554110 - net-libs/webkit-gtk-2.4.9: libtool relinking (also, uid sandbox jumping)
Summary: net-libs/webkit-gtk-2.4.9: libtool relinking (also, uid sandbox jumping)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-07 01:49 UTC by Raymond Jennings
Modified: 2016-05-29 13:05 UTC (History)
3 users (show)

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


Attachments
chatlog on #gentoo that said this was a bug (chat.txt,1.94 KB, text/plain)
2015-07-07 01:49 UTC, Raymond Jennings
Details
build log (build.log.xz,309.93 KB, application/x-xz)
2015-07-07 01:52 UTC, Raymond Jennings
Details
emerge --info (einfo.txt,5.14 KB, text/plain)
2015-07-07 01:53 UTC, Raymond Jennings
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raymond Jennings 2015-07-07 01:49:00 UTC
Ok, so I noticed that libtool was relinking a shared library.

What caught my notice was that it was doing so as root, and had somehow escaped the "portage" uid sandbox.

I went on #gentoo and asked about it, and got a discussion about something wrong with libtool usage.

I'm not sure what the exact bug is.

Reproducible: Always

Actual Results:  
emerge strayed outside the sandbox and built stuff as root

Expected Results:  
stay as portage
Comment 1 Raymond Jennings 2015-07-07 01:49:44 UTC
Created attachment 406280 [details]
chatlog on #gentoo that said this was a bug
Comment 2 Raymond Jennings 2015-07-07 01:52:27 UTC
Created attachment 406282 [details]
build log
Comment 3 Raymond Jennings 2015-07-07 01:53:00 UTC
Created attachment 406284 [details]
emerge --info
Comment 4 Raymond Jennings 2015-07-07 01:53:36 UTC
Also, this seems weird:

I typed ctrl-z on the command line to suspend the emerge...but there's still an ld process from the merge running!
Comment 5 Raymond Jennings 2015-07-07 01:54:51 UTC
[18:46:57] <AStorm> Shentino: yes, it's broken, calls eautoreconf without elibtoolize
[18:47:56] <AStorm> apparently the automatic patches don't work for webkit-gtk
[18:48:09] <AStorm> since it's regenerating, it's weird that it is not using autotools-utils already
[18:48:16] * kahrl_ (~kahrl@dslb-094-220-151-165.094.220.pools.vodafone-ip.de) has joined
[18:49:34] * kal0pr has quit (Ping timeout: 248 seconds)
[18:50:19] <AStorm> hmm, this is potentially hard, I'd file it as a bug - mention it is relinking
[18:50:27] * Debesis has quit (Ping timeout: 276 seconds)
[18:51:06] * kahrl has quit (Ping timeout: 276 seconds)
[18:51:27] <Shentino> also...I used ctrl-z to suspend the build...and the ld is still running :)
Comment 6 Rafał Mużyło 2015-07-07 03:46:56 UTC
...relinking isn't a bug here - compiling during install phase is.

I wonder if dolt is the problem here...(OK, so I'm biased against it)(it's in Source/autotools/SetupLibtool.m4).
If it wasn't for the time building it takes...
What needs to figured out first is if that compile is triggered by make dependencies or  within libtool itself.
Comment 7 Raymond Jennings 2015-07-07 04:02:16 UTC
Are you sure?  Libtool was linking, not compiling...unless your definition of compiling includes linking.
Comment 8 Pacho Ramos gentoo-dev 2016-03-09 15:37:16 UTC
Per the build.log it seems it's relinking (at install time)
Comment 9 Pacho Ramos gentoo-dev 2016-04-03 13:15:35 UTC
And, in that case, I don't see the bug here (Well, at least, that relinking is seen on a lot of other packages too :/)
Comment 10 Raymond Jennings 2016-04-03 18:36:54 UTC
I disagree.

It was compiling as root and that's not secure.

It's not supposed to be compiling or linking as any UID other than portage if I have sandboxing enabled.
Comment 11 Pacho Ramos gentoo-dev 2016-04-03 18:43:53 UTC
I don't see in what part it's being run as root outside sandbox/portage control
Comment 12 Pacho Ramos gentoo-dev 2016-04-03 18:45:35 UTC
src_compile is sandboxed
Comment 13 Raymond Jennings 2016-04-03 18:53:38 UTC
It's not visible in the logs.  I only noticed because I was running top at the time on another terminal.
Comment 14 Pacho Ramos gentoo-dev 2016-05-28 15:55:05 UTC
Maybe portage people will know if this behavior is normal or not
Comment 15 Zac Medico gentoo-dev 2016-05-28 17:53:27 UTC
The src_install function always runs as root because it needs to set the UID/GID of files which can only be done by root. See bug 566614 for a plan to allow it to run as an unprivileged user.
Comment 16 Zac Medico gentoo-dev 2016-05-28 18:04:37 UTC
(In reply to shentino from comment #10)
> It was compiling as root and that's not secure.

Even though it runs as root, the src_install function still runs in a sandbox when FEATURES=sandbox is enabled. So it's not totally unsafe.

> It's not supposed to be compiling or linking as any UID other than portage
> if I have sandboxing enabled.

Well, if it compiles or links in the src_install function, then it's going to be doing it as root.
Comment 17 Raymond Jennings 2016-05-28 18:24:30 UTC
Aye, I understand.  File UID/GID can only be determined during installation.

But my question is whether or not it should be compiling/linking during src_install in the first place.  It being done as root just made the frosting a bit more radioactive.
Comment 18 Pacho Ramos gentoo-dev 2016-05-29 13:05:33 UTC
Thanks Zac, this is invalid then

@shentino, about complaints against linking at install time, that is an upstream issue and you should report it directly to them... anyway this version is long time ago obsolete and will go away as soon as possible, then, please ensure the latest version is also affected by this (also the build system was changed completely)