Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CPUの脆弱性 Spectre / Vulnerability of CPU, Spectre

CPUの脆弱性 Spectre / Vulnerability of CPU, Spectre

PHPer向けSpectre解説 / PHP勉強会#122の発表資料です

HASEGAWA Tomoki

January 31, 2018
Tweet

More Decks by HASEGAWA Tomoki

Other Decks in Technology

Transcript

  1. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  FDIP1$  FYJU    FDIPl8PSME
  2. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  FDIP1$  FYJU    FDIPl8PSME ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ
  3. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  FDIP1$  FYJU    FDIPl8PSME ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ ʣઌߦͯ͜͜͠Β΁Μ΋࣮ߦ͢Δ
  4. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  FDIP1$  FYJU    FDIPl8PSME ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ ʣઌߦͯ͜͜͠Β΁Μ΋࣮ߦ͢Δ ʣͷJGͷ݁ՌʹΑͬͯ͸ ແବʹͳΔ͚Ͳ౤ػ࣮ߦ͢Δ
  5. $16 ΞυϨεۭؒ(# ΞυϨεόεCJU  G G G G G G

    G G GGGGGGGG   (# 04
  6. $16 ΞυϨεۭؒ(# ΞυϨεόεCJU  G G G G G G

    G G GGGGGGGG   (# 04 ϢʔβϓϩάϥϜ
  7. $16 ΞυϨεۭؒ(# ΞυϨεόεCJU  G G G G G G

    G G GGGGGGGG   (# 04 ϢʔβϓϩάϥϜ ϢʔβϓϩάϥϜ͕
 04ͷྖҬͷϝϞϦʹ
 ΞΫηε͢Δͱྫ֎
 ൃੜ
  8. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍ΞυϨεʣ  
  9. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍ΞυϨεʣ   ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ
  10. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍ΞυϨεʣ   ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ ʣઌߦͯ͜͜͠Β΁Μ͕࣮ߦ͞ΕΔ
  11. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍ΞυϨεʣ   ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ ʣઌߦͯ͜͜͠Β΁Μ͕࣮ߦ͞ΕΔ ʣͷ஋ΛCʹ֨ೲɻ
  12. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍ΞυϨεʣ   ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ ʣઌߦͯ͜͜͠Β΁Μ͕࣮ߦ͞ΕΔ ʣͷ஋ΛCʹ֨ೲɻ ຊདྷ͸ྫ֎͕ൃੜ͢ΔΞΫηε ౤ػ࣮ߦத͸ྫ֎ൃੜ͠ͳ͍ ʢຊ࣮ߦ͡Όͳ͍ͷͰʣ
  13. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍ΞυϨεʣ   ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ ʣઌߦͯ͜͜͠Β΁Μ͕࣮ߦ͞ΕΔ ʣͷ஋ΛCʹ֨ೲɻ ʣ C  ͷ஋Λ
 Dʹ֨ೲɻ
  14. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍ΞυϨεʣ   ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ ʣઌߦͯ͜͜͠Β΁Μ͕࣮ߦ͞ΕΔ ʣͷ஋ΛCʹ֨ೲɻ ʣ C  ͷ஋Λ
 Dʹ֨ೲɻ w ʙGGͷൣғ w ϢʔβϓϩάϥϜ͔ΒΞΫηεͰ͖ΔྖҬ w ͜ͷΞΫηεͰʙGGͷ
 Ͳ͔͜ͷόΠτ͕Ωϟογϡʹ৐Δ
  15. ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B

    \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍ΞυϨεʣ   ʣ͜͜Β΁ΜΛ࣮ߦ͍ͯ͠Δ࣌ʹʜ ʣઌߦͯ͜͜͠Β΁Μ͕࣮ߦ͞ΕΔ ʣͷ஋ΛCʹ֨ೲɻ ʣ C  ͷ஋Λ
 Dʹ֨ೲɻ
  16. ΞυϨε ಺༰  YY  YY  YY  YY

     YY  YY  YY   GG YY ΞυϨε ಺༰  GPS JJJ \  TUBSUUJNF   ESFBE J    FOEUJNF   JG FOETUBSU \ FDIPͷ஋͸JͰͨ͠ʂʂ ^  ^  SFUVSO
  17. ΞυϨε ಺༰  YY  YY  YY  YY

     YY  YY  YY   GG YY ΞυϨε ಺༰  GPS JJJ \  TUBSUUJNF   ESFBE J    FOEUJNF   JG FOETUBSU \ FDIPͷ஋͸JͰͨ͠ʂʂ ^  ^  SFUVSO ॱ൪ʹಡΈࠐΈ͔͔ͯͬͨ࣌ؒ͠Λଌఆ
  18. ΞυϨε ಺༰  YY  YY  YY  YY

     YY  YY  YY   GG YY ΞυϨε ಺༰  GPS JJJ \  TUBSUUJNF   ESFBE J    FOEUJNF   JG FOETUBSU \ FDIPͷ஋͸JͰͨ͠ʂʂ ^  ^  SFUVSO ॱ൪ʹಡΈࠐΈ͔͔ͯͬͨ࣌ؒ͠Λଌఆ ͚ͩ͘͢͝ಡΈࠐΈ͕଎͔ͬͨ
 ‎͕Ωϟογϡʹ৐͍ͬͯͨ ‎ຊདྷಡΊͳ͍ͷ಺༰͸ͩͬͨ
  19. ΞυϨε ಺༰  YY  YY  YY  YY

     YY  YY  YY   GG YY ΞυϨε ಺༰  GPS JJJ \  TUBSUUJNF   ESFBE J    FOEUJNF   JG FOETUBSU \ FDIPͷ஋͸JͰͨ͠ʂʂ ^  ^  SFUVSO ॱ൪ʹಡΈࠐΈ͔͔ͯͬͨ࣌ؒ͠Λଌఆ ΞυϨε ಺༰  FDIP)FMMP  BSBOE   JG B \HPUP^  CSFBE    DSFBE C    ʢΞΫηεݖͷͳ͍஋ʣ   ͚ͩ͘͢͝ಡΈࠐΈ͕଎͔ͬͨ
 ‎͕Ωϟογϡʹ৐͍ͬͯͨ ‎ຊདྷಡΊͳ͍ͷ಺༰͸ͩͬͨ
  20. ()[   ճTFDԯճTFD ʢʢ5#TFDˠ5#TFDˠ(#TFDʣˠ(#TFDˠ(#TFDʣˠ.#TFD FUIFS ˠ.#TFD JOUFSFOU $16ͷΩϟογϡͱϝϞϦ $16

    -.# (#TFD ίΞ -,#
 5#TFD -,# 5#TFD ॲཧ૷ஔ ϝΠϯϝϞϦ (#(#TFD 44% 5#(#TFD
  21. ()[   ճTFDԯճTFD ʢʢ5#TFDˠ5#TFDˠ(#TFDʣˠ(#TFDˠ(#TFDʣˠ.#TFD FUIFS ˠ.#TFD JOUFSFOU $16ͷΩϟογϡͱϝϞϦ $16

    -.# (#TFD ίΞ -,#
 5#TFD -,# 5#TFD ॲཧ૷ஔ ϝΠϯϝϞϦ (#(#TFD 44% 5#(#TFD ഒ
  22. ()[   ճTFDԯճTFD ʢʢ5#TFDˠ5#TFDˠ(#TFDʣˠ(#TFDˠ(#TFDʣˠ.#TFD FUIFS ˠ.#TFD JOUFSFOU $16ͷΩϟογϡͱϝϞϦ $16

    -.# (#TFD ίΞ -,#
 5#TFD -,# 5#TFD ॲཧ૷ஔ ϝΠϯϝϞϦ (#(#TFD 44% 5#(#TFD ഒ ഒ
  23. ()[   ճTFDԯճTFD ʢʢ5#TFDˠ5#TFDˠ(#TFDʣˠ(#TFDˠ(#TFDʣˠ.#TFD FUIFS ˠ.#TFD JOUFSFOU $16ͷΩϟογϡͱϝϞϦ $16

    -.# (#TFD ίΞ -,#
 5#TFD -,# 5#TFD ॲཧ૷ஔ ϝΠϯϝϞϦ (#(#TFD 44% 5#(#TFD ഒ ഒ ഒ
  24. ()[   ճTFDԯճTFD ʢʢ5#TFDˠ5#TFDˠ(#TFDʣˠ(#TFDˠ(#TFDʣˠ.#TFD FUIFS ˠ.#TFD JOUFSFOU $16ͷΩϟογϡͱϝϞϦ $16

    -.# (#TFD ίΞ -,#
 5#TFD -,# 5#TFD ॲཧ૷ஔ ϝΠϯϝϞϦ (#(#TFD 44% 5#(#TFD ഒ ഒ ഒ ഒ
  25.  QIQ GPS JJJ \ FDIP)FMMP8PSME ^ L2 #0 EXT_STMT

    L2 #1 ASSIGN $i 0 L2 #2 JMP J7 L3 #3 EXT_STMT L3 #4 ECHO "Hello World." L2 #5 POST_INC $i ~1 L2 #6 FREE ~1 L2 #7 IS_SMALLER $i 10 ~2 L2 #8 EXT_STMT L2 #9 JMPNZ ~2 J3 L6 #10 RETURN 1
  26.  QIQ GPS JJJ \ FDIP)FMMP8PSME ^ L2 #0 EXT_STMT

    L2 #1 ASSIGN $i 0 L2 #2 JMP J7 L3 #3 EXT_STMT L3 #4 ECHO "Hello World." L2 #5 POST_INC $i ~1 L2 #6 FREE ~1 L2 #7 IS_SMALLER $i 10 ~2 L2 #8 EXT_STMT L2 #9 JMPNZ ~2 J3 L6 #10 RETURN 1 ۭؒతʹ͍ۙ
 ಉ͡ͱ͜ΖΛճ͍ͬͯΔ
  27.  QIQ GPS JJJ \ FDIP)FMMP8PSME ^ L2 #0 EXT_STMT

    L2 #1 ASSIGN $i 0 L2 #2 JMP J7 L3 #3 EXT_STMT L3 #4 ECHO "Hello World." L2 #5 POST_INC $i ~1 L2 #6 FREE ~1 L2 #7 IS_SMALLER $i 10 ~2 L2 #8 EXT_STMT L2 #9 JMPNZ ~2 J3 L6 #10 RETURN 1
  28.  QIQ GPS JJJ \ FDIP)FMMP8PSME ^ L2 #0 EXT_STMT

    L2 #1 ASSIGN $i 0 L2 #2 JMP J7 L3 #3 EXT_STMT L3 #4 ECHO "Hello World." L2 #5 POST_INC $i ~1 L2 #6 FREE ~1 L2 #7 IS_SMALLER $i 10 ~2 L2 #8 EXT_STMT L2 #9 JMPNZ ~2 J3 L6 #10 RETURN 1 Jʹසൟʹ ΞΫηε
 ͍ͯ͠Δ