-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ELF.libs
broken on wsl1
#1679
Labels
Comments
The issue is here that WSL1 (maybe your version) does not support sendfile syscall. You could try examining what is the errno returned by sendfile. (in gdb, p $eax or p $rax after syscall)
|
Probably a wsl issue then. At syscall: $rax : 0x28
$rdx : 0x0
$rsi : 0x3
$rdi : 0x1
$rip : 0x000000001000003f → <_start+63> syscall
$r8 : 0x0
$r9 : 0x0
$r10 : 0x7fffffff After syscall: $rax : 0xffffffffffffffea
$rdx : 0x0
$rsi : 0x3
$rdi : 0x0
$rip : 0x0000000010000043 → <_start+67> push 0x3c
$r8 : 0x0
$r9 : 0x0
$r10 : 0x7fffffff
0xffffffffffffffea == -22 == EINVAL (Invalid argument) Manpage says:
Nothing should be wrong with the file descriptor; running |
Yeah, try to update your wsl, it may have a broken sendflie, or it may be that wsl1 `seq_file`s (the descriptive files in /proc, here `maps`) do not support mmap-like operations (on native Linux they certainly do since forever)
|
Works? |
No idea. It's rather unlikely that I'll get wsl updated anytime soon, I'll reopen if/when it happens. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update Pwntools First
This issue was tested on both 4.2.1 and the current dev branch.
Debug Output
Linux (Ubuntu 20.04.1 LTS)
Windows
This appears to be a problem with wsl's execution of the shellcode used in _patch_elf_and_read_maps
gdb
debugging seems to indicate that wsl just does nothing when theSYS_sendfile
syscall happens.Misc
My wsl version is somewhat outdated (
4.4.0-17763-Microsoft
); it is entirely possible that newer versions of wsl are functioning fine.The text was updated successfully, but these errors were encountered: