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

Make issue on ubuntu. #81

Open
HiddenRoom opened this issue Jun 20, 2022 · 4 comments
Open

Make issue on ubuntu. #81

HiddenRoom opened this issue Jun 20, 2022 · 4 comments

Comments

@HiddenRoom
Copy link

running "make" in sandsifter directory gives this output

cc -c injector.c -o injector.o -Wall
injector.c:171:13: error: variably modified ‘stack’ at file scope
171 | static char stack[SIGSTKSZ];
| ^~~~~
In file included from /usr/include/signal.h:328,
from injector.c:12:
injector.c:172:27: error: initializer element is not constant
172 | stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, };
| ^~~~~~~~
injector.c:172:27: note: (near initialization for ‘ss.ss_size’)
injector.c:321:100: warning: excess elements in array initializer
321 | .start={.bytes={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, .len=0},
| ^~~~
injector.c:321:100: note: (near initialization for ‘total_range.start.bytes’)
injector.c:322:98: warning: excess elements in array initializer
322 | .end={.bytes={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}, .len=0},
| ^~~~
injector.c:322:98: note: (near initialization for ‘total_range.end.bytes’)
make: *** [Makefile:38: injector.o] Error 1

@NobodyFAH
Copy link

same problem here

did you find a solution?

@HiddenRoom
Copy link
Author

HiddenRoom commented Jun 13, 2023

SOLVED!!! The issue was due to a change in glibc to the define in signal.h making SIGSTKSZ not a constant so you have to write a separate program to print it out (example below) then replace every instance of SIGSTKSZ in injector.c with the constant printed. Additionally you must add -no-pie to CFLAGS in the Makefile.

to find what you should replace SIGSTKSZ with run

`#include <stdio.h>
#include <signal.h>

int main(void)
{
printf("%d\n", SIGSTKSZ);
return 0;
}`

@ilikenwf
Copy link

ilikenwf commented Mar 6, 2024

Make a pull request or fork

@TheBloodEaglez
Copy link

I'm on ubuntu 22.04 I did all this, I couldn't install libcapstone3 ( I could install libacpstone 4). I got this output sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t
File "/home/david/Downloads/yods/sandsifter-master/./sifter.py", line 196
if type(x) not in [type(0), type(0L)]:
^
SyntaxError: invalid decimal literal
don't know if anyone knows how to solve?

SOLVED!!! The issue was due to a change in glibc to the define in signal.h making SIGSTKSZ not a constant so you have to write a separate program to print it out (example below) then replace every instance of SIGSTKSZ in injector.c with the constant printed. Additionally you must add -no-pie to CFLAGS in the Makefile.

to find what you should replace SIGSTKSZ with run

`#include <stdio.h> #include <signal.h>

int main(void) { printf("%d\n", SIGSTKSZ); return 0; }`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants