Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 806767

Summary: sys-libs/libcap-2.52: sandbox violation with llvm-objcopy
Product: Gentoo Linux Reporter: 12101111 <w12101111>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED UPSTREAM    
Severity: normal CC: lssndrbarbieri, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
strace

Description 12101111 2021-08-06 07:42:24 UTC
llvm-objcopy try to create temp files to path like /dev/stdout.tmpc5a6b0c

Reproducible: Always

Steps to Reproduce:
Reproduce without this package:
1.echo "int main(int argc, char **argv) { return 0; }" > empty.c
2.clang -o empty empty.c
3.sandbox llvm-objcopy --dump-section .interp=/dev/stdout empty > loader.txt
4.Lots of `* ACCESS DENIED:  open_wr:      /dev/stdout.tmpc5a6b0c`

Actual Results:  
`llvm-objcopy --dump-section .interp=/dev/stdout empty` print `/lib/ld-musl-x86_64.so.1`
`llvm-objcopy --dump-section .interp=loader.txt empty` write `/lib/ld-musl-x86_64.so.1` into loader.txt
But `llvm-objcopy --dump-section .interp=/dev/stdout empty > loader.txt` output
`llvm-objcopy: error: 'empty': Permission denied`
Comment 1 12101111 2021-08-06 07:44:05 UTC
Created attachment 730786 [details]
build.log
Comment 2 12101111 2021-08-06 07:46:17 UTC
Created attachment 730789 [details]
strace
Comment 3 Andrew G. Morgan 2021-08-17 03:46:11 UTC
I think this is fixed upstream in 2.53
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-17 04:05:04 UTC
(In reply to Andrew G. Morgan from comment #3)
> I think this is fixed upstream in 2.53

Thanks!
Comment 5 Mike Gilbert gentoo-dev 2021-08-24 18:30:22 UTC
*** Bug 809857 has been marked as a duplicate of this bug. ***