On Tue, Feb 25, 2020 at 04:05:10AM -0800, Dmytro Kolomoiets wrote:<br>
> Literally. This works:<br>
> ```bash<br>
> $ sudo strace -qqu $USER -e trace=execve -e signal=none -- sudo true<br>
> <br>
> execve("/usr/bin/sudo", ["sudo", "true"], 0x7ffe1fc6b730 /* 13 vars */) = 0<br>
> ```<br>
> And this not:<br>
> ```bash<br>
> $ sudo strace --seccomp-bpf -fqqu $USER -e trace=execve -e signal=none -- sudo true<br>
> <br>
> execve("/usr/bin/sudo", ["sudo", "true"], 0x7ffc693481d8 /* 13 vars */) = 0<br>
> sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?<br>
> <br>
> ```<br>
> Is it temporary regression or `--seccomp-bpf` is fundamentally impossible for this usecase?<br>
<br>
This is a limitation of the current implementation which sets<br>
PR_SET_NO_NEW_PRIVS unconditionally.  Apparently, in an unlikely case when<br>
strace is privileged enough, there is no need to set PR_SET_NO_NEW_PRIVS.<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/strace/strace/issues/126?email_source=notifications&email_token=AOVBTRZJN4WH56D54LGXWYDREWM2HA5CNFSM4K3G2HG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM5ZZAQ#issuecomment-591109250">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AOVBTR2P43BHV6BG5O6TLUTREWM2HANCNFSM4K3G2HGQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AOVBTR5Q5NAMRH5RC3IB4ATREWM2HA5CNFSM4K3G2HG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM5ZZAQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/strace/strace/issues/126?email_source=notifications\u0026email_token=AOVBTRZJN4WH56D54LGXWYDREWM2HA5CNFSM4K3G2HG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM5ZZAQ#issuecomment-591109250",
"url": "https://github.com/strace/strace/issues/126?email_source=notifications\u0026email_token=AOVBTRZJN4WH56D54LGXWYDREWM2HA5CNFSM4K3G2HG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM5ZZAQ#issuecomment-591109250",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>