-
-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get error ASLR disable failed: EPERM: Operation not permitted
when executing cargo tarpaulin -v
#146
Comments
So what environment are you running in? A CI server (if so which one) or your personal machine? This issue is a duplicate of #77 so you may find help there. ASLR is a security measure to stop malicious processes inspecting the memory or altering the execution of a process (including arbitrary code execution). So you may need to change a security rule via seccomp to allow tarpaulin to disable ASLR. As for how to do that I'm not sure but maybe running tarpaulin with |
Yeah it run in docker started by |
BTW , why |
Because the user does have authority to disable ALSR by default, it's just things like docker or CI servers add some extra security restrictions to keep the systems and other users safe. If you're running docker the docker section of the readme might be helpful https://github.com/xd009642/tarpaulin#docker |
@new-commer Have you tried the method in the docker section of the readme? And has it solved your issue? |
@xd009642 Thanks for your help . We have tried and it works . And we're trying to do that in |
@new-commer : did you find any way to make this work with gitlab-ci? I'm hitting the same problem. |
You might be able to get it to work using the docker image in gitlab.
Although I tried it myself on a test project last weekend and it worked
fine (using tarpaulin version 0.9.1)
…On Tue, Nov 5, 2019 at 10:47 AM Guillaume Desmottes < ***@***.***> wrote:
@new-commer <https://github.com/new-commer> : did you find any way to
make this work with gitlab-ci? I'm hitting the same problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#146?email_source=notifications&email_token=AA2PZBWRO5LISTWKDTI3D73QSFFLVA5CNFSM4FTQC4NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDCNCNI#issuecomment-549769525>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2PZBT3AFE67UIKIZTGSTLQSFFLVANCNFSM4FTQC4NA>
.
|
Hi, just to help if someone is experiencing same issue using a custom built image for the runner. You can also add [[runners]]
[runners.docker]
security_opt = ["seccomp:unconfined"] Then restart gitlab-runner service in order to reload configuration. Note that as said in other issues this option can also be used when running a container by hand: It could be interesting to add this to a Wiki/FAQ page. |
Just to provide more background for people in situations where Docker's built-in default seccomp policy does allow the use of the The current method of disabling ASLR does not match one of the requested values, so is rejected by the kernel: tarpaulin/src/process_handling/linux.rs Lines 35 to 43 in c5e8e09
All of this is to say that one could add the object {
"names": [
"personality"
],
"action": "SCMP_ACT_ALLOW",
"args": [
{
"index": 0,
"value": 262144,
"valueTwo": 0,
"op": "SCMP_CMP_EQ"
}
],
"comment": "Enable personality(ADDR_NO_RANDOMIZE) syscall",
"includes": {},
"excludes": {}
} to the |
This is a port from previous version of CI and uses the same command as previously. There might seem to be multiple other and better ways to do it but they are all broken in some ways. We could use the action https://github.com/actions-rs/tarpaulin but that one is no longer maintained. The last version of tarpaulin it works with is 0.22 from October 2022 and the fix is still not merged in after multiple months: actions-rs/tarpaulin#23 . Additionally there are discussions to deprecate this action: actions-rs/tarpaulin#6 Alternatively we could have used the 'official' docker image of tarpaulin: https://hub.docker.com/r/xd009642/tarpaulin . This will not work since when github action runs in a docker, the container is not started with enough privileges which causes tarpaulin to crash, see as an example of this here: xd009642/tarpaulin#146
I use root user , and get the error
ASLR disable failed: EPERM: Operation not permitted
when executingcargo tarpaulin -v
. And i triedsudo cargo tarpaulin -v
, it promptcargo command not found
So i tried
sudo -s cargo tarpaulin -v
, it also promptASLR disable failed: EPERM: Operation not permitted
.How can i resolve it ?The text was updated successfully, but these errors were encountered: