New Paste

 

Recent Pastes

Administrate




Pastebin on p.luis.im

PasteID: 2
Pasted by Anonymous, 2022-02-25 05:24:57 GMT
Expires Never
Paste size 1.57 Kb
Tools Raw   Download
 
  1. ubuntu@ubuntu:~/rdrand-test$ telegram-desktop   
  2. WARNING: CPU random generator seem to be failing, disabling hardware random number generation  
  3. WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff  
  4.   
  5. (telegram-desktop:7811): dbind-WARNING **: 16:22:53.032: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.  
  6.   
  7. =========  
  8.   
  9. ubuntu@ubuntu:~/rdrand-test$ ./amd-rdrand-bug   
  10. Your RDRAND() returns -1 every time, which means it has the AMD bug.  
  11.   
  12. =========  
  13. ubuntu@ubuntu:~/rdrand-test$ cat amd-rdrand-bug.c   
  14. // SPDX-License-Identifier: GPL-2.0  
  15. /*  
  16.  * Copyright (C) 2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.  
  17.  *  
  18.  * Compile: `gcc -o amd-rdrand-bug -O3 -mrdrnd -std=gnu99 amd-rdrand-bug.c`  
  19.  */  
  20.   
  21. #include <stdio.h>  
  22. #include <stdint.h>  
  23. #include <immintrin.h>  
  24.   
  25. int main(int argc, char *argv[])  
  26. {  
  27. 	for (int j, i = 0; i < 2000; ++i) {  
  28. 		for (j = 0; j < 100; ++j) {  
  29. 			uint32_t val = 0;  
  30. 			if (__builtin_ia32_rdrand32_step(&val)) {  
  31. 				if (val != 0xffffffffU) {  
  32. 					puts("Your RDRAND() does not have the AMD bug.");  
  33. 					return 0;  
  34. 				}  
  35. 				break;  
  36. 			}  
  37. 		}  
  38. 		if (j == 100) {  
  39. 			puts("Failed to sample your RDRAND().");  
  40. 			return 1;  
  41. 		}  
  42. 	}  
  43. 	puts("Your RDRAND() returns -1 every time, which means it has the AMD bug.");  
  44. 	return 1;  
  45. }  
  46.   
  47. =======  
  48.   
  49. https://arstechnica.com/gadgets/2019/10/how-a-months-old-amd-microcode-bug-destroyed-my-weekend/  
  50.  

 
 

 
 
 
 
 
Written by Xan Manning, 2010.