Bug#925359: dietlibc: built program on x32 terminates with 'smashed stack detected, program terminated.'

2019-04-09 Thread Bernhard Übelacker
Hello Thorsten Glaser, Am 24.03.19 um 14:25 schrieb Thorsten Glaser: > Bernhard Übelacker dixit: > >> I see that the syscall number gets modified to become 0x4062. >> >> But the syscall modifies 144 bytes, more than just the size of >> variable ru1 of 88 bytes. >> >> This 144 bytes is the siz

Bug#925359: dietlibc: built program on x32 terminates with 'smashed stack detected, program terminated.'

2019-03-24 Thread Thorsten Glaser
Bernhard Übelacker dixit: >I see that the syscall number gets modified to become 0x4062. > >But the syscall modifies 144 bytes, more than just the size of >variable ru1 of 88 bytes. > >This 144 bytes is the size I could observe within amd64 userland. The x32 syscalls often have struct mapping

Bug#925359: dietlibc: built program on x32 terminates with 'smashed stack detected, program terminated.'

2019-03-24 Thread Bernhard Übelacker
Hello Thorsten, Am 24.03.19 um 01:46 schrieb Thorsten Glaser: > Bernhard Übelacker dixit: > >> Now I wonder if a x32 binary doing a syscall getrusage to a 64bit >> kernel is supposed to supply memory like "long" would be 8 bytes? > > The x32 kernel is amd64, it’s just a userspace ABI, with a > s

Bug#925359: dietlibc: built program on x32 terminates with 'smashed stack detected, program terminated.'

2019-03-23 Thread Thorsten Glaser
Bernhard Übelacker dixit: >Now I wonder if a x32 binary doing a syscall getrusage to a 64bit >kernel is supposed to supply memory like "long" would be 8 bytes? The x32 kernel is amd64, it’s just a userspace ABI, with a separate entry point in the kernel (OR’d a high bit in the syscall number). l

Bug#925359: dietlibc: built program on x32 terminates with 'smashed stack detected, program terminated.'

2019-03-23 Thread Bernhard Übelacker
Dear Maintainer, I just tried to get some more information. Following backtrace, little after the stack smashing happend, I could reproduce with a amd64 qemu VM crossgraded from Buster amd64 to x32. :-) That "struct rusage" has some elements of type "long" [1]. In gdb sizeof shows 4 bytes for suc

Bug#925359: dietlibc: built program on x32 terminates with 'smashed stack detected, program terminated.'

2019-03-23 Thread Thorsten Glaser
Package: dietlibc-dev Version: 0.34~cvs20160606-10 Severity: important https://buildd.debian.org/status/fetch.php?pkg=mksh&arch=x32&ver=57-1&stamp=1551461619&raw=0 mksh built, with -fstack-protector-strong though, against dietlibc is not usable at all, on x32 only. -- System Information: Debian