-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
AT_SECURE not set to 1 for SUID programs #2031
Comments
Well of course it's applicable. Fun part is in trying to collect an |
Thanks @therealkenc I've got your dump. What were the repro steps to get that green screen of near death? |
Crap I meant to put that in the email. As root:
Which doesn't crash after upgrade to 16184. |
@therealkenc, the auxiliary vector is supplied as part of the original process image and a pointer to it is passed to the startup code. It's not obtained using a system call or anything that would be visible in |
Thanks for reporting the issue. Marking this as a bug so we can track adding AT_SECURE to auxv. |
Thanks @stehufntdev. To be clear, it is already there, it's just stuck at the constant 0, ignoring the actual execution context. |
Understood, we just need to plumb up the logic to set that value. |
@fweimer - I have a fix for this, do you happen to have a link to instructions for running the glibc test suite you mention above? That test suite is something we should definitely add to our regression suite. |
|
Stats for [edited: with proper --prefix=/usr, my run, YRMV] 16237:
Native:
There's known stuff in there, but also a few nuggets. Interestingly WSL passes some tests that Native fails (🤷). In the other direction, here is the short list. You can see the |
Another possibly useful test suite:
I'm getting 20 failures on native Xenial and 105 failures on Xenial @ WSL build 16232. None of the native failures pass on WSL. Many failures are probably the same issues as in the glibc test suite. |
Musl is a great test, even if that feels counterintuitive because it isn't common in Ubuntu- or Redhat-land. Musl doesn't pretend to be a replacement for some circa 1997 Unix system libc, or the basis for GNU Hurd. You'll feel a lot closer to home tracking down (say) obscure |
@benhillis @therealkenc Please configure glibc with Known test failures are documented on the release pages:
The math failures you see are likely due to broken |
@beevvy, @therealkenc - I'm a big fan of any tests that we can use to help identify issues with our compatibility layer. Since we're wrapping up the Fall Creators Update release now we're going to start looking at integrating more test suites into our regression test suite. glibc and musl are both great candidates. |
Support for this is added in 16257. |
Your Windows build number:
[Version 10.0.15063]
What you're doing and what's happening: The
AT_SECURE
auxiliary vector entry is not set to 1 when running a SUID program:What's wrong / what should be happening instead: Only
Password:
should be printed because ifAT_SECURE
is 1, the glibc dynamic linker will ignore mostLD_
environment variables because they can be abused for privilege escalation.Strace of the failing command, if applicable: This bug occurs before the process starts running, so
strace
is not applicable.LD_SHOW_AUXV
, as shown in the example, is comparatively harmless (it only leaks load addresses, defeating ASLR), butLD_PRELOAD
is not ignored either, and that allows code execution as root. FixingAT_SECURE
will address all these issues at the same time (including the non-workingsecure_getenv
, whose failing test in the glibc testsuite brought the issue to my attention).The text was updated successfully, but these errors were encountered: