You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have not ported the Meltdown and Spectre Labs to Ubuntu 20.04. Our initial attempts failed, but we have not invested much time to figure out why. The issues were placed on the back burner. Recently, I got a message from a professor from University of Connecticut, who shed some light on the problem. I am posting his email here, hoping somebody can further look into this:
-------------------- email from the professor -----------------
I tested Spectre Attacks on Ubuntu 20.04 VM. Initially, SpectreAttack and SpectreAttackImproved did not work while the program retreiving the long string worked (a sort). Later I found that if printf() is called before the attack, all programs, including SpectreAttack and SpectreAttackImproved, work very well.
For example, I added printf() in SpectreAttack.c.
printf("here\n");
spectreAttack(larger_x);
Without the printf, I cannot get 83. With printf, the chance of seeing 83 is pretty high.
I have only tested the workaround in 20.04 VM on two computers. Probably some other system calls can make it work, too.
I also tested the lab in WSL. Since we are not really dealing with kernel data in this lab, it works in WSL, too.
Hope the information could be helpful to migrate the lab to Ubuntu 20.04 officially.
The text was updated successfully, but these errors were encountered:
Update on Ubuntu 20.04: I have confirmed on Ubuntu 20.04 that by adding printf("something\n") before calling spectreAttack(larger_x) (in both SpectreAttack.c and SpectreAttackImproved.c), the Spectre attack will be successful. Not sure why. I guess this is a race condition problem, so the timing matters. That extra printf statement might have got the timing correct. On Ubuntu 16.04, there is no need for this extra printf statement. The conclusion is, the Spectre lab can be used on Ubuntu 20.04 without a problem.
For Meltdown attack, everything up to Task 6 will still work on Ubuntu 20.04. However, the actual attack (Task 7 and Task 8) still do not work on Ubuntu 20.04. Meltdown could be mitigated by modifying the OS, and I suspect that is exactly what has been done by the Ubuntu 20.04 OS. In my class, I am asking students to use Ubuntu 20.04. Even though they won't be able to get the final attack to work, they will get the idea from Tasks 1 to 6. This way, students do not need to switch the VM just for this lab.
This week, I am doing a test in my class with 80 students. If everything works fine, I will update the lab description to officially port these two labs to Ubuntu 20.04.
We have not ported the Meltdown and Spectre Labs to Ubuntu 20.04. Our initial attempts failed, but we have not invested much time to figure out why. The issues were placed on the back burner. Recently, I got a message from a professor from University of Connecticut, who shed some light on the problem. I am posting his email here, hoping somebody can further look into this:
-------------------- email from the professor -----------------
I tested Spectre Attacks on Ubuntu 20.04 VM. Initially, SpectreAttack and SpectreAttackImproved did not work while the program retreiving the long string worked (a sort). Later I found that if
printf()
is called before the attack, all programs, includingSpectreAttack
andSpectreAttackImproved
, work very well.For example, I added
printf()
inSpectreAttack.c
.Without the
printf
, I cannot get 83. Withprintf
, the chance of seeing 83 is pretty high.I have only tested the workaround in 20.04 VM on two computers. Probably some other system calls can make it work, too.
I also tested the lab in WSL. Since we are not really dealing with kernel data in this lab, it works in WSL, too.
Hope the information could be helpful to migrate the lab to Ubuntu 20.04 officially.
The text was updated successfully, but these errors were encountered: