Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 872608 - sys-apps/sandbox depends on libc realpath removing duplicate slashes (net-wireless/kismet-2022.08.1-r1 sandbox violation)
Summary: sys-apps/sandbox depends on libc realpath removing duplicate slashes (net-wir...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
: 895774 896070 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-24 05:32 UTC by Agostino Sarubbo
Modified: 2023-08-23 17:27 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,259.66 KB, text/plain)
2022-09-24 05:32 UTC, Agostino Sarubbo
Details
1-sandbox.log (1-sandbox.log,822 bytes, text/plain)
2022-09-24 05:32 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-09-24 05:32:08 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-wireless/kismet-2022.08.1-r1 sandbox violation.
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
This machine uses MUSL libc
Comment 1 Agostino Sarubbo gentoo-dev 2022-09-24 05:32:11 UTC
Created attachment 813922 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-09-24 05:32:12 UTC
Created attachment 813925 [details]
1-sandbox.log

1-sandbox.log
Comment 3 Agostino Sarubbo gentoo-dev 2022-09-24 05:32:13 UTC
Error(s) that match a know pattern:


error: [Errno 13] Permission denied
error: [Errno 13] Permission denied
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2023-01-04 19:03:47 UTC
This doesn't fit the usual pattern of a sandbox violation, looks like it's failing to set time on a file or something?

copying build/lib/KismetCaptureRtl433/kismetexternal/__init__.py -> //var/tmp/portage/net-wireless/kismet-2022.08.1-r1/image/usr/lib/python3.10/site-packages/KismetCaptureRtl433/kismetexternal
 * ACCESS DENIED:  utimensat:     /var/tmp/portage/net-wireless/kismet-2022.08.1-r1/image/usr/lib/python3.10/site-packages/KismetCaptureRtl433/kismetexternal/__init__.py
error: [Errno 13] Permission denied
Comment 5 Rick Farina (Zero_Chaos) gentoo-dev 2023-01-04 19:31:16 UTC
since I didn't know what this was, here is a reference:
https://man7.org/linux/man-pages/man2/utimensat.2.html
Comment 6 Larry the Git Cow gentoo-dev 2023-01-04 20:18:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad8912f229d715cbb71e45020470b73519a9a836

commit ad8912f229d715cbb71e45020470b73519a9a836
Author:     Rick Farina <zerochaos@gentoo.org>
AuthorDate: 2023-01-04 20:17:34 +0000
Commit:     Rick Farina <zerochaos@gentoo.org>
CommitDate: 2023-01-04 20:18:36 +0000

    net-wireless/kismet: remove unneeded sed
    
    Bug: https://bugs.gentoo.org/872608
    While investigating bug #872608 it was found that this sed is no longer
    needed.  Removing the unneeded sed.
    Signed-off-by: Rick Farina <zerochaos@gentoo.org>

 net-wireless/kismet/kismet-2022.08.1-r1.ebuild | 6 +-----
 net-wireless/kismet/kismet-9999.ebuild         | 6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)
Comment 7 Mike Gilbert gentoo-dev 2023-01-05 03:51:48 UTC
In #gentoo-dev, we determined that this is triggered by musl's realpath implementation, which does not remove duplicate slashes from the input.

If a program performs a filesystem operation on a path with duplicate slashes, libsandbox will fail to remove them, and the access check will fail.
Comment 8 Rick Farina (Zero_Chaos) gentoo-dev 2023-01-11 03:20:38 UTC
Upstream kismet accepted a patch from me to remove the double slash.  I'm not applying it to the versioned release because the kismet maintainer is planning an updated release soon anyway.

This ends my involvement here as I can't replicate the issue and I would personally consider it a sandbox/musl issue.  Bug was already reassigned away from me, I just wanted to close the loop on the part relating to my package.  Thanks for the report.
Comment 9 Rick Farina (Zero_Chaos) gentoo-dev 2023-02-22 17:16:59 UTC
*** Bug 895774 has been marked as a duplicate of this bug. ***
Comment 10 Larry the Git Cow gentoo-dev 2023-02-22 20:44:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eac4803723e269b65bed0847b3e57924d347d340

commit eac4803723e269b65bed0847b3e57924d347d340
Author:     Rick Farina <zerochaos@gentoo.org>
AuthorDate: 2023-02-22 20:42:30 +0000
Commit:     Rick Farina <zerochaos@gentoo.org>
CommitDate: 2023-02-22 20:44:36 +0000

    net-wireless/kismet: fixup deps
    
    Adjust deps per qa tools
    Remove do nothing sed lines
    Use bundled libfmt
    Closes: https://bugs.gentoo.org/872608
    Signed-off-by: Rick Farina <zerochaos@gentoo.org>

 .../files/kismet-2022.08.1-sandbox-fix.patch       | 147 +++++++++++++++
 net-wireless/kismet/kismet-2022.08.1-r2.ebuild     | 208 +++++++++++++++++++++
 net-wireless/kismet/kismet-9999.ebuild             |  32 ++--
 3 files changed, 369 insertions(+), 18 deletions(-)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 20:45:55 UTC
I think we should keep this open for fixing sandbox itself.
Comment 12 Rick Farina (Zero_Chaos) gentoo-dev 2023-02-22 20:47:47 UTC
I'm not 100% sure if sandbox wants to resolve this, or just if they consider a musl bug or whatever.  My part here is fixed upstream and in gentoo, so I am fine with whatever the sandbox maintainers decide.
Comment 13 Rick Farina (Zero_Chaos) gentoo-dev 2023-08-23 17:27:21 UTC
*** Bug 896070 has been marked as a duplicate of this bug. ***