Build failure with musl libc (error: no member named '_sifields' in 'siginfo_t')
Categories
(Core :: Security: Process Sandboxing, defect, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: mforney, Assigned: mforney)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
Attempt to build firefox with musl libc
Actual results:
The build failed:
../../sandbox/linux/seccomp-bpf/trap.cc:171:26: error: no member named '_sifields' in 'siginfo_t'; did you mean '__si_fields'?
This is because _sifields
is a glibc-internal field in siginfo_t, not a public interface. musl's corresponding field is called __si_fields
.
Expected results:
The build should have succeeded.
The intent of the code in question is to access three fields in siginfo_t. These were added in glibc 2.17, and are named si_call_addr
, si_syscall
, and si_arch
. These public members should be used instead, if available.
I also reported this issue to upstream (chromium) in https://bugs.chromium.org/p/chromium/issues/detail?id=1045069, which has already accepted my patch. Cherry-picking that patch will resolve the issue in firefox as well.
Upstream patch:
https://chromium.googlesource.com/chromium/src.git/+/6bd491daaf28a8281136931133504c23a18f819f%5E%21/#F0
_sifields is a glibc-internal field, and is not available on musl
libc. Instead, use the public-facing fields si_call_addr, si_syscall,
and si_arch, if they are available.
Updated•4 years ago
|
Pushed by gpascutto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ec8c96f4d53 Cherry-pick upstream patch to use public siginfo_t fields r=gcp
Comment 3•4 years ago
|
||
Will need to update sandbox/chromium-shim/patches/with_update as well so this doesn't get lost if we update to a chromium snapshot from before that got added upstream.
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
Comment 5•4 years ago
|
||
Follow up in Bug 1613921.
Description
•