Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 60147 - configure causes sandbox access violations on amd64 when lib64 is a directory
Summary: configure causes sandbox access violations on amd64 when lib64 is a directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 All
: High blocker (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-12 09:13 UTC by John Richard Moser
Modified: 2004-08-22 05:14 UTC (History)
1 user (show)

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


Attachments
tar.log (tar.log,20.79 KB, text/plain)
2004-08-12 09:16 UTC, John Richard Moser
Details
Patch for tar-1.14 with USE=hardened to avoid sandbox violations (tar-1.14-hardened-sandbox.patch,1.50 KB, patch)
2004-08-12 11:14 UTC, Danny van Dyk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Richard Moser 2004-08-12 09:13:03 UTC
make[1]: Leaving directory `/tmp/portage/tar-1.14/work/tar-1.14'
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-arch_-_tar-1.14-24309.log"

unlink:    /usr/lib64/cf24327/conftest9012345
unlink:    /usr/lib64/cf24327/conftest9012346
--------------------------------------------------------------------------------

Reproducable here and on lv's box; tar won't finish building.
Comment 1 John Richard Moser 2004-08-12 09:16:34 UTC
Created attachment 37289 [details]
tar.log

log of the tar emerge
Comment 2 Danny van Dyk (RETIRED) gentoo-dev 2004-08-12 11:14:43 UTC
Created attachment 37298 [details, diff]
Patch for tar-1.14 with USE=hardened to avoid sandbox violations

Attached Patch works for me. Lv would you put it in conditionally for hardened
?
Comment 3 Travis Tilley (RETIRED) gentoo-dev 2004-08-12 11:31:24 UTC
this problem will exist for any profile that doesnt disable sandbox, it's just a coincidence that for amd64 the hardened profiles are the only ones that dont disable it. when we have multilib worked out and can be sure a 32bit sandbox exists, this problem will exist for -all- amd64 profiles.

base-system peoples: i hate sandbox and this violation seems to occur with large chunks of system with the lib64. what do i do? force an autoreconf? a patch against configure can be borked at any time.
Comment 4 Travis Tilley (RETIRED) gentoo-dev 2004-08-12 11:41:38 UTC
this error should only occur when using the new 2.3.4.20040808 glibc on amd64. it not only doesnt apply the hack the crams everything into /lib, it makes lib64 a real directory.

so... it seems that the test tries to see if lib is a directory. now where i'm confused is how the hell doesnt this cause a similar access violation for /usr/lib? is there already logic in place somewhere that prevents this from happening? and if so, can we add lib64 to it?
Comment 5 Travis Tilley (RETIRED) gentoo-dev 2004-08-13 11:48:39 UTC
just to clear things up a bit, simply moving lib64 to lib and making lib64 a symlink again gets rid of this access violation (semi-dangerous and i wouldnt suggest any users do this, instead disable sandbox for now).
Comment 6 Travis Tilley (RETIRED) gentoo-dev 2004-08-13 12:17:48 UTC
from sandbox.c:

strcat(sandbox_write_var, "/usr/lib/cf");
and:
strcat(sandbox_write_var, "/usr/lib/conftest"); 

thanks a million to ferringb for pointing that out.
Comment 7 Brian Harring (RETIRED) gentoo-dev 2004-08-13 12:47:00 UTC
With profile.bashrc support, this can be corrected in .51.
Either profile.bashrc support needs to be backported to .50, or .50 needs it's sandbox modified.
Not much for the latter, since I don't like /usr/lib/conftest being a default exception anyways...

If a .50 release is coming up, I'll make sure a fix is in.  No gurantees on an eta for .50 though.
Comment 8 Travis Tilley (RETIRED) gentoo-dev 2004-08-17 00:35:49 UTC
the fix has made it into 2.9.51_pre... will it show up in 2.0.50?
Comment 9 Brian Harring (RETIRED) gentoo-dev 2004-08-22 05:14:19 UTC
.50-r10 is out, afaik it contains the sandbox additions to correct this.
.51_pre18 and above should have it also.