-
Notifications
You must be signed in to change notification settings - Fork 268
auxval AT_RANDOM isn't deterministic #3539
Copy link
Copy link
Closed
Milestone
Description
Given the following test program:
#include <sys/auxv.h>
#include <stdio.h>
int main() {
unsigned long *x = (void*)getauxval(AT_RANDOM);
printf("*getauxval(AT_RANDOM) %lx\n", *x);
}
shadow currently produces non-deterministic results:
$ shadow-exec ./a.out
*getauxval(AT_RANDOM) 280741edbe5ef200
$ shadow-exec ./a.out
*getauxval(AT_RANDOM) f2cf2d8a17f3400c
i.e. this is initialized with some random value before shadow gets control. Maybe by the dynamic linker/loader? Or maybe even by the linux kernel itself?
I'm not aware of any real-world programs that use this value, though it would be a subtle source of nondeterminism to detect if and when we do bump into it. (I was hoping maybe it was the source of nondeterminism in #2693 , but it doesn't appear to be)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels