Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 195137 - net-wireless/ipw3945-1.2.2: sandbox access violation on emerge
Summary: net-wireless/ipw3945-1.2.2: sandbox access violation on emerge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Jim Ramsay (lack) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 197806
  Show dependency tree
 
Reported: 2007-10-08 19:20 UTC by Mad Cow
Modified: 2007-12-05 16:38 UTC (History)
14 users (show)

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


Attachments
ipw3945-1.2.2.ebuild.diff (ipw3945-1.2.2.ebuild.diff,1.22 KB, patch)
2007-11-14 17:34 UTC, Alon Bar-Lev (RETIRED)
Details | Diff
ipw3945-1.2.2-build.patch (ipw3945-1.2.2-build.patch,2.51 KB, patch)
2007-11-14 17:35 UTC, Alon Bar-Lev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mad Cow 2007-10-08 19:20:22 UTC
emerge of ipw3945 fails with a sandbox access violation. It is apparently trying to write some stuff in /usr/src/linux/

Reproducible: Always

Steps to Reproduce:
1. emerge ipw3945

Actual Results:  
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-net-wireless_-_ipw3945-1.2.2-15069.log"

open_wr:   /usr/src/linux-2.6.23-rc9/null.gcda
open_wr:   /usr/src/linux-2.6.23-rc9/null.gcda
open_wr:   /usr/src/linux-2.6.23-rc9/null.gcda
open_wr:   /usr/src/linux-2.6.23-rc9/null.gcda
open_wr:   /usr/src/linux-2.6.23-rc9/.lst
open_wr:   /usr/src/linux-2.6.23-rc9/.lst
open_wr:   /usr/src/linux-2.6.23-rc9/null.gcda
--------------------------------------------------------------------------------


Expected Results:  
Emerge successful!

I see the same behaviour in 1.2.0 also.

I can work around this problem by running ebuild directly.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-08 19:22:12 UTC
Please search.

*** This bug has been marked as a duplicate of bug 135745 ***
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2007-10-24 20:11:51 UTC
The .lst violation appears to be something else and specific to ipw3945. Reopening.
Comment 3 Robert A. 2007-10-24 21:02:21 UTC
emerging ipw3945 (1.2.0 and 1.2.2) results in a sandbox error:
"open_wr:   /usr/src/linux-2.6.23/.lst"
Comment 4 kouyu 2007-10-25 03:49:28 UTC
Bug 135745 had marked as fixed, so I asked here. Now, is there somebody to be resolving the problem of ipw3945 sandbox violation? Please help us. Thanks. Don't leave it or take long time to solve it as bug 135745. Thanks again.
Comment 5 michel 2007-10-25 12:15:04 UTC
the same here

ACCESS VIOLATION on compiling ipw3945 on 2.6.23er kernel ... 

FEATURES="-sandbox" emerge -av ipw3945 is the only known possibility to compile
Comment 6 michel 2007-10-29 12:38:31 UTC
Maybe can anybody else take care of this bug?!
Comment 7 Pacho Ramos gentoo-dev 2007-11-01 19:28:46 UTC
I am not affected by any sandbox violation using kernel-2.6.22 instead :-/
Comment 8 kouyu 2007-11-05 02:40:37 UTC
(In reply to comment #7)
> I am not affected by any sandbox violation using kernel-2.6.22 instead :-/
> 
But 2.6.23.
Comment 9 Pacho Ramos gentoo-dev 2007-11-05 20:19:16 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > I am not affected by any sandbox violation using kernel-2.6.22 instead :-/
> > 
> But 2.6.23.
> 

Yes, I see... ;-)
Comment 10 Matthew Kasa (RETIRED) gentoo-dev 2007-11-11 20:11:49 UTC
Also seeing this with ipw3945-1.2.1 and hardened-sources-2.6.23-r1.
Comment 11 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-14 17:34:43 UTC
Created attachment 135974 [details, diff]
ipw3945-1.2.2.ebuild.diff

Fixups.
Comment 12 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-14 17:35:13 UTC
Created attachment 135976 [details, diff]
ipw3945-1.2.2-build.patch
Comment 13 Jan Kundrát (RETIRED) gentoo-dev 2007-11-22 23:49:10 UTC
The attached patch looks sane to me and indeed fixes the issue with denied write, both with USE=debug and without it. The wireless interface also seems to work.

Re-assigning to proper maintainers.
Comment 14 kouyu 2007-11-23 17:51:08 UTC
The patch seems to fix the problem to me. That's good. Now I can use 2.6.23 with wireless. Hope the patch will be added in new version ipw3945.
Comment 15 Jan Kundrát (RETIRED) gentoo-dev 2007-11-24 09:36:35 UTC
(In reply to comment #14)
> The patch seems to fix the problem to me. That's good. Now I can use 2.6.23
> with wireless. Hope the patch will be added in new version ipw3945.

Strictly speaking, nothing ever prevented you from using it. You only had to merge it with sandbox disabled (as suggested in comment #5 and in the other bug), which might be inconvenient, but works.
Comment 16 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-24 10:26:43 UTC
(In reply to comment #15)
> Strictly speaking, nothing ever prevented you from using it. You only had to
> merge it with sandbox disabled (as suggested in comment #5 and in the other
> bug), which might be inconvenient, but works.

You cannot expect a user to disable sandbox as his system may be compromised.
Also, you cannot expect a user to follow none gentoo developer recommendation regarding so risky issue.
Also, please note that the current ebuild does not handle the debug correctly at all, resulting in enabling it when requested to disable.

The current ebuild is a mess. Please don't recommend user to use it.
Comment 17 Jan Kundrát (RETIRED) gentoo-dev 2007-11-24 10:38:30 UTC
(In reply to comment #16)
> You cannot expect a user to disable sandbox as his system may be compromised.

Note that ebuild can always use RESTRICT=sandbox or a similar method to completely nuke user's system. Sandbox isn't a security method that guarantees that ebuilds behave correctly, it just prevents some stupid mistakes on a programmer's side. Could we please move any further sandbox-related comments to the gentoo-dev ML, which is IMHO more apropriate?

> The current ebuild is a mess. Please don't recommend user to use it.

Thanks for your patch.
Comment 18 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-24 10:52:41 UTC
(In reply to comment #17)
> Note that ebuild can always use RESTRICT=sandbox or a similar method to
> completely nuke user's system. 

I am *REALLY* hopping you don't have *ANY* package with this restriction.

> Sandbox isn't a security method that guarantees
> that ebuilds behave correctly, it just prevents some stupid mistakes on a
> programmer's side. Could we please move any further sandbox-related comments to
> the gentoo-dev ML, which is IMHO more apropriate?

This is my final note about this... sandbox *IS* a security method, as if one ebuild modify the root, second ebuild may also be effected, thus all your system modifies its behavior.

Thanks.
Comment 19 Jan Kundrát (RETIRED) gentoo-dev 2007-11-24 11:06:36 UTC
(In reply to comment #18)
> This is my final note about this... sandbox *IS* a security method, as if one
> ebuild modify the root, second ebuild may also be effected, thus all your
> system modifies its behavior.

Point that I've been trying to make here is that sandbox can be circumvented extremely easy. This means that you couldn't say "I use sandbox, hence my ebuilds can't overwrite important parts of my live filesystem".

Examples about legitimate cases that disable sandbox and access user's filesystem can be found in the enewuser/enewgroup functions in eutils.eclass.
Comment 20 Stefan Schweizer (RETIRED) gentoo-dev 2007-11-25 22:01:36 UTC
ty, fixed
Comment 21 Thomas Tuttle 2007-12-05 16:03:13 UTC
Can you please patch the ipw3945-1.2.0 ebuild in a similar way, as it is the latest stable ipw3945 and suffers from the same problem?
Comment 22 Thomas Tuttle 2007-12-05 16:03:32 UTC
(Reopening for 1.2.0)
Comment 23 Jan Kundrát (RETIRED) gentoo-dev 2007-12-05 16:38:37 UTC
Let's make 1.2.22 stable instead (discussion for this is in bug 197806).