Skip to content
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

Ping doesn't work as /bin/ping is not SUID #226

Closed
imgrant opened this issue Nov 24, 2018 · 7 comments
Closed

Ping doesn't work as /bin/ping is not SUID #226

imgrant opened this issue Nov 24, 2018 · 7 comments
Assignees
Labels
Bug This is a problem. Patched This has been fixed.
Milestone

Comments

@imgrant
Copy link

imgrant commented Nov 24, 2018

Describe the bug
Ping operations (e.g. ping localhost) fail with the error ping: socket: Operation not permitted.
The command does work when run with root privilege (e.g. sudo ping localhost).
This particular issue should have been resolved since the Creator's Update (see, e.g. microsoft/WSL#18), and does not exhibit in a fresh install of the Ubuntu WSL distro (I am running Windows 10 1809 release)
In comparing /bin/ping in WLinux and Ubuntu (18.04) WSL distros, it seems my ping in WLinux does not have the SUID bit:

WLinux /bin/ping

-rwxr-xr-x 1 root root 64K Aug 3 17:53 /bin/ping

Ubuntu 18.04 /bin/ping

-rwsr-xr-x 1 root root 63K Mar 9 2017 /bin/ping

To Reproduce
Steps to reproduce the behavior:

  1. Install WLinux
  2. Attempt to ping an address
  3. Observe the error ping: socket: Operation not permitted
  4. Try again with sudo, observe success
  5. Execute chmod u+s /bin/ping, repeat ping without root and observe success

Expected behavior
/bin/ping should have the SUID bit (u+s) set, so that ping operations without root privilege should work without error.

Basic Troubleshooting Checklist

[X] I have searched Google for the error message.
[X] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled.
[X] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues.
[X] I have searched the WLinux issues page: https://github.com/WhitewaterFoundry/WLinux/issues.
[X] I have reset WLinux: Settings->Apps->Apps & features->WLinux->Advanced Options->Reset.
[ ] I have disabled and re-enabled WSL in Windows Features.
[X] I have run Windows 10 updates and restarted.

What other troubleshooting have you attempted?

I ran chmod u+s on /bin/ping in WLinux, and now it works as expected.

WLinux Version

1.1.25.0

Windows Build

OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17763 N/A Build 17763
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
BIOS Version: Dell Inc. 1.5.1, 09/08/2018

@sirredbeard sirredbeard added the Triage We need to figure out what is going on here. label Nov 24, 2018
@onuralpszr
Copy link

Same version Wlinux Version : 1.125.0 and fully updated "apt update && apt upgrade" and I don't have it. (didn't change it too) (Shared for helping purpose)

image

@imgrant
Copy link
Author

imgrant commented Nov 26, 2018

Hmm, bizarre. Maybe something odd about my install. I didn't do apt upgrade (tho don't know if wlinux-setup does this?).
Unfortunately don't really want to blow away my install now to reset & retry. Feel free to close if not reproducible.

@sirredbeard sirredbeard added User Support This is a user who needs help. Unable To Reproduce We cannot reproduce the problem. Needs Help This needs community attention. and removed Triage We need to figure out what is going on here. labels Nov 27, 2018
@sirredbeard
Copy link

I will leave open for now, see if other reports come in, and try to reproduce on 1.1.26.

@Xeonacid
Copy link

Hi everyone:
I newly installed WLinux 1.1.27.0 on Build 17763, ran ping localhost as my first thing after creating the user, and reproduced it. 😢 (Maybe I should be 😄 since I reproduced it? lol)

@sirredbeard sirredbeard reopened this Jan 15, 2019
@sirredbeard sirredbeard added Bug This is a problem. and removed Unable To Reproduce We cannot reproduce the problem. User Support This is a user who needs help. labels Jan 15, 2019
@crramirez
Copy link
Collaborator

crramirez commented Jan 15, 2019

I could reproduce it in the same Windows 10 and WLinux versions. In fact after issuing sudo chmod u+s $(which ping) ping starts working. The strange thing is that in my other machine with Widnows 1803 it works and have the same permissions without running sudo chmod u+s $(which ping)

@sirredbeard sirredbeard added this to the 1.2 milestone Jan 18, 2019
@sirredbeard sirredbeard added the To Implement This is something we should implement. label Jan 18, 2019
@ghost
Copy link

ghost commented Jan 24, 2019

I mean we can add something to the rootfs script creation just to make sure the setuid bit is set, which would fix it, but understanding why is definitely something I'm going to work towards figuring out.

@ghost ghost mentioned this issue Jan 29, 2019
@sirredbeard sirredbeard removed the Needs Help This needs community attention. label Feb 24, 2019
@sirredbeard sirredbeard modified the milestones: 1.2, 1.2.1 Mar 9, 2019
@crramirez crramirez self-assigned this Jun 19, 2019
@crramirez
Copy link
Collaborator

@sirredbeard sirredbeard added Patched This has been fixed. and removed To Implement This is something we should implement. labels Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a problem. Patched This has been fixed.
Projects
None yet
Development

No branches or pull requests

5 participants