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

Assembler message on Ubuntu 18.04 #5

Open
arruah opened this issue Aug 10, 2018 · 7 comments
Open

Assembler message on Ubuntu 18.04 #5

arruah opened this issue Aug 10, 2018 · 7 comments

Comments

@arruah
Copy link

arruah commented Aug 10, 2018

I get the error after this gcc demo.c -o demo

demo.c:11: Error: `bound' is not supported in 64-bit mode

@jwilk
Copy link

jwilk commented Aug 10, 2018

You need to pass -m32 to the compiler.

@mathieujobin
Copy link

I have added -m32 to the Makefile under the util folder.
but I am still getting a compilation error on Ubuntu 18.04

mathieu:util :-) (master) $ make 
mkdir -p bin
gcc -m32 check.c -o ./bin/check
In file included from check.c:2:0:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
 #include <bits/libc-header-start.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:4: recipe for target 'bin/check' failed
make: *** [bin/check] Error 1
mathieu:util :-( 1 (master) $ 

please advise

@mathieujobin
Copy link

that file seems to be a 64 only flag, which is what is causing it to be missing with m32 flag

/usr/include/x86_64-linux-gnu/bits/libc-header-start.h

@jwilk
Copy link

jwilk commented Aug 10, 2018

/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory

Looks like you don't have 32-bit glibc development package installed.
I believe on Ubuntu the package name is libc6-dev-i386.

@mathieujobin
Copy link

Thank you, I can confirm compilation works with ubuntu 18.04

$ sudo apt install libc6-dev-i386
$ make 
mkdir -p bin
gcc -m32 check.c -o ./bin/check
$ ./bin/check 
! failed to open /dev/cpu/0/msr
$

does that mean I am not vulnerable?

@jwilk
Copy link

jwilk commented Aug 10, 2018

$ ./bin/check 
! failed to open /dev/cpu/0/msr

does that mean I am not vulnerable?

No; the program didn't check anything, because it couldn't open the device it needed.
It's most likely because you didn't have the msr kernel module loaded.

@brammittendorff-dd
Copy link

brammittendorff-dd commented Aug 30, 2018

@jwilk @mathieujobin you can load the msr kernel module with sudo modprobe msr. If you watch the video closely you will see he loads it up to: https://youtu.be/_eSAF_qT_FY?t=47m38s

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