KR20210096500A - Method and Apparatus for protecting caches from side-channel attacks - Google Patents

Method and Apparatus for protecting caches from side-channel attacks Download PDF

Info

Publication number
KR20210096500A
KR20210096500A KR1020200010037A KR20200010037A KR20210096500A KR 20210096500 A KR20210096500 A KR 20210096500A KR 1020200010037 A KR1020200010037 A KR 1020200010037A KR 20200010037 A KR20200010037 A KR 20200010037A KR 20210096500 A KR20210096500 A KR 20210096500A
Authority
KR
South Korea
Prior art keywords
cache
attack
shared
block
application
Prior art date
Application number
KR1020200010037A
Other languages
Korean (ko)
Inventor
김대훈
장민우
Original Assignee
재단법인대구경북과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 재단법인대구경북과학기술원 filed Critical 재단법인대구경북과학기술원
Priority to KR1020200010037A priority Critical patent/KR20210096500A/en
Publication of KR20210096500A publication Critical patent/KR20210096500A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/084Multiuser, multiprocessor or multiprocessing cache systems with a shared cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Storage Device Security (AREA)

Abstract

As a preferred embodiment of the present invention, provided is a device for protecting against a cache-based side-channel attack, which adds a shared DRAM L4 cache, adds a bypass bit to L1, L2, and L4 caches, applies an LLC bypass policy to a cache block which is a target of a flush reload attack, and neutralizes the attack on the shared cache.

Description

캐시기반 부채널공격 방어 장치 및 방법{Method and Apparatus for protecting caches from side-channel attacks} {Method and Apparatus for protecting caches from side-channel attacks}

본 발명은 캐시기반 부채널공격 방어에 관한 것이다.The present invention relates to cache-based side-channel attack defense.

오늘날의 프로세서는 종종 대용량 메모리에 저장된 데이터 및 명령어의 사본을 저장할 수있는 캐시를 갖추고 있다. 이러한 대용량 메모리의 보편적 인 예는 다이나믹 랜덤 액세스 메모리 (DRAM)이다. 여기서, "메모리"라는 용어는 모든 기존 및 미래의 메모리 구현을 집합적으로 지칭하는데 사용된다. 캐시 메모리(간략하게 "캐시")는 다른 메모리 구현보다 훨씬 작고 훨씬 빠른 메모리로 만들어지며 이후에는 주 메모리 또는 보조 저장 장치에 저장된 데이터의 일부만을 특정 시점에 저장할 수 있다. 오늘날 캐시는 종종 SRAM을 사용하여 구현되며 대용량 캐시는 DRAM을 사용하여 구현 될 수 있다. 여기에 설명 된 캐시는 임의의 기존 및 미래의 메모리 기술을 사용하여 구현 될 수 있다. 프로세서의 아키텍쳐적 정의는 보안 공격으로부터 안전하도록 향상된 보고 기능을 제공하는 것이 포함될 수 있으나, 캐시 구현과 같은 많은 종속된 기능들(예를 들어, 마이크로 아키텍쳐)에는 보호 기능이 포함되지 않아 공격으로부터 취약할 수 있다.Today's processors often have caches that can store copies of data and instructions stored in large amounts of memory. A popular example of such a large capacity memory is dynamic random access memory (DRAM). Herein, the term “memory” is used to collectively refer to all existing and future memory implementations. Cache memory ("cache" for short) is made with much smaller and much faster memory than other memory implementations, and can then store only a portion of the data stored in main memory or secondary storage at a particular point in time. Today caches are often implemented using SRAM, and large caches can be implemented using DRAM. The cache described herein may be implemented using any existing and future memory technology. The architectural definition of a processor may include providing enhanced reporting capabilities to be safe from security attacks, but many dependent functions such as cache implementations (e.g., micro-architecture) do not include protection, making them vulnerable to attacks. can

[1] Liu, Fangfei, et al. "Catalyst: Defeating last-level cache side channel attacks in cloud computing." 2016 IEEE international symposium on high performance computer architecture (HPCA). IEEE, 2016.[1] Liu, Fangfei, et al. "Catalyst: Defeating last-level cache side channel attacks in cloud computing." 2016 IEEE international symposium on high performance computer architecture (HPCA). IEEE, 2016. [2] Kayaalp, Mehmet, et al. "RIC: relaxed inclusion caches for mitigating LLC side-channel attacks." 2017 54th ACM/EDAC/IEEE Design Automation Conference (DAC). IEEE, 2017.[2] Kayaalp, Mehmet, et al. "RIC: relaxed inclusion caches for mitigating LLC side-channel attacks." 2017 54th ACM/EDAC/IEEE Design Automation Conference (DAC). IEEE, 2017. [3] Liu, Fangfei, and Ruby B. Lee. "Random fill cache architecture." Proceedings of the 47th Annual IEEE/ACM International Symposium on Microarchitecture. IEEE Computer Society, 2014.[3] Liu, Fangfei, and Ruby B. Lee. "Random fill cache architecture." Proceedings of the 47th Annual IEEE/ACM International Symposium on Microarchitecture. IEEE Computer Society, 2014.

본 발명의 바람직한 일 실시예에서는 캐시기반 부채널공격의 대상이 될 수 있는 모든 피공격자 어플리케이션에서 이를 방어할 수 있는 방법을 제안하고자 한다. In a preferred embodiment of the present invention, it is intended to propose a method for defending against all attacked applications that can be the target of a cache-based side-channel attack.

본 발명의 바람직한 일 실시예에서는 캐시기반 부채널공격의 대상이 될 수 있는 캐시 블록이 최종레벨캐시(LLC)에 들어가지 못하도록 변형하여 캐시기반 부채널공격을 방어할 수 있는 방법을 제안하고자 한다. In a preferred embodiment of the present invention, it is intended to propose a method for preventing a cache-based side-channel attack by modifying a cache block that can be a target of a cache-based side-channel attack from entering the final level cache (LLC).

본 발명의 바람직한 일 실시예에서는 clflush 명령어로 DRAM 캐시 내의 캐시블록을 축출할 수 없도록 제한함으로써 모든 프로세스가 해당 캐시블록에 접근할 때 DRAM캐시에 접근하는 시간을 경험하도록 변형함으로써 캐시기반 부채널공격을 방어할 수 있는 방법을 제안하고자 한다. In a preferred embodiment of the present invention, the cache-based side-channel attack is prevented by limiting the cache block in the DRAM cache from being evicted with the clflush command, so that all processes experience the time to access the DRAM cache when accessing the corresponding cache block. We would like to suggest a way to defend it.

본 발명의 바람직한 일 실시예에서는 데이터의 쓰기 가능 여부 및 공유 여부 등과 상관없이 캐시기반 부채널공격을 방어할 수 있는 방법을 제안하고자 한다. In a preferred embodiment of the present invention, it is intended to propose a method capable of defending against a cache-based side-channel attack regardless of whether data is writable or shared.

본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 장치는 또한 공유DRAM 캐시;를 더 포함하도록 메모리 계층구조가 구현되며, 이 경우 상기 공유DRAM 캐시의 각 캐시블록은 바이패스 비트를 포함하여, 공격자 어플리케이션이 피공격자 어플리케이션에 대한 부채널공격여부를 표시하고, 상기 피공격자 어플리케이션은 상기 공유DRAM 캐시에서 적어도 하나의 캐시 블록을 로드할 때, 상기 적어도 하나의 캐시 블록 내의 상기 바이패스 비트 각각을 확인하며,상기 공격자 어플리케이션은 플러시-재적재 공격을 수행한 후 재적재를 수행할 때 플러시-재적재 공격을 수행한 적어도 하나의 캐시 블록들이 모두 상기 공유DRAM캐시에 적재되어 있어, 상기 공격자 어플리케이션에서 플러시-재적재 공격을 수행한 적어도 하나의 캐시 블록에 대한 접근 시간이 상기 피공격자 어플리케이션의 접근 여부와 무관하게 동일한 것을 특징으로 한다.As a preferred embodiment of the present invention, the device for defending against a cache-based side-channel attack also implements a memory hierarchy to further include a shared DRAM cache, and in this case, each cache block of the shared DRAM cache includes a bypass bit. Including, indicating whether the attacker application is a side channel attack on the attacked application, and when the attacked application loads at least one cache block from the shared DRAM cache, the bypass bit in the at least one cache block Checking each, when the attacker application performs a flush-reload attack and then performs a reload, at least one cache block that performed the flush-reload attack is all loaded in the shared DRAM cache, so the attacker It is characterized in that the access time for at least one cache block for which the flush-reload attack is performed by the application is the same regardless of whether the attacked application accesses it.

본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 장치는 상기 공유DRAM 캐시에서 적어도 하나의 캐시 블록을 로드할 때 확인한 바이패스 비트 값이 1로서 부채널공격이 확인되는 캐시 블록의 경우 상기 공유 최종레벨캐시를 우회하여 상기 프라이빗 캐시로 로드하고, 바이패스 비트 값이 0으로서 부채널공격이 확인되지 않는 캐시 블록의 경우 상기 공유 최종레벨캐시로 로드하는 것을 특징으로 한다. 이 경우, 프라이빗 캐시는 L1 캐시 또는 L2 캐시이며, 부채널공격이 확인되는 캐시 블록을 로드할 때 바이패스 비트값을 0에서 1로 변경하는 것을 특징으로 한다.As a preferred embodiment of the present invention, the device for defending against a cache-based side-channel attack has a value of the bypass bit checked when loading at least one cache block from the shared DRAM cache is 1, and the cache block for which the side-channel attack is confirmed. In this case, it bypasses the shared final level cache and loads it into the private cache, and in the case of a cache block in which a side channel attack is not confirmed as a bypass bit value of 0, it is characterized in that it is loaded into the shared final level cache. In this case, the private cache is an L1 cache or an L2 cache, and it is characterized in that the bypass bit value is changed from 0 to 1 when the cache block in which the side-channel attack is confirmed is loaded.

본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 장치는 프라이빗 캐시;및 SRAM 기반의 공유 최종레벨캐시(Last-Level Cache, LLC);를 포함하고, 또한 공유DRAM 캐시;를 더 포함하도록 메모리 계층구조를 구현하며, 상기 프라이빗 캐시 및 상기 공유DRAM 캐시는 바이패스 비트를 포함하고 상기 바이패스 비트값을 이용하여 공격자 어플리케이션이 피공격자 어플리케이션에 대한 부채널공격여부를 판단하며, 상기 공격자 어플리케이션은 플러시-재적재 공격을 수행한 후 재적재를 수행할 때 플러시-재적재 공격을 수행한 적어도 하나의 캐시 블록들이 모두 상기 공유DRAM캐시에 적재되어 있어, 상기 공격자 어플리케이션에서 플러시-재적재 공격을 수행한 적어도 하나의 캐시 블록에 대한 접근 시간이 상기 피공격자 어플리케이션의 접근 여부와 무관하게 동일하여 피공격자 어플리케이션의 접근 패턴 및 실행패턴을 판단할 수 없는 것을 특징으로 한다. 이 경우, 공격자 어플리케이션은 상기 플러시-재적재 공격을 clflush 명령을 이용하여 수행하고, clflush 명령이 실행되면 상기 프라이빗 캐시 및 상기 공유 최종레벨캐시에 있는 캐시 블락은 축출될 수 있으나, 상기 공유DRAM 캐시에 있는 캐시 블락은 축출되지 않고, clflush가 수행되었는지 여부만 바이패스비트를 이용하여 정보를 표시하는 것을 특징으로 한다.As a preferred embodiment of the present invention, the device for protecting against a cache-based side-channel attack includes a private cache; and a SRAM-based shared Last-Level Cache (LLC), and also a shared DRAM cache; implement a memory hierarchy to include, wherein the private cache and the shared DRAM cache include a bypass bit, and the attacker application determines whether a side-channel attack on the attacker application is performed using the bypass bit value, and the attacker When the application performs the flush-reload attack and then performs the reload, at least one cache block that performed the flush-reload attack is all loaded in the shared DRAM cache, so that the flush-reload attack in the attacker application It is characterized in that it is impossible to determine the access pattern and execution pattern of the attacked application because the access time for the at least one cache block that has been performed is the same irrespective of whether the attacked application accesses or not. In this case, the attacker application performs the flush-reload attack using the clflush command, and when the clflush command is executed, the cache blocks in the private cache and the shared last-level cache may be evicted, but in the shared DRAM cache It is characterized in that the cache block in existence is not evicted, and information is displayed using the bypass bit only whether clflush has been performed.

본 발명의 또 다른 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 방법은 프라이빗 캐시, SRAM 기반의 공유 최종레벨캐시 및 공유DRAM 캐시를 포함하는 메모리 계층구조를 이용하는 단계; 상기 공유DRAM 캐시의 캐시 블락에 포함된 바이패스 비트를 이용하여 공격자 어플리케이션에서 피공격자 어플리케이션에 플러시-재적재 공격을 수행하였는지 여부를 표시하는 단계; 상기 피공격자 어플리케이션에서 상기 공유DRAM 캐시로부터 적어도 하나의 캐시 블록을 로드할 때, 상기 적어도 하나의 캐시 블록 내의 상기 바이패스 비트를 각각 확인하는 단계; 및 상기 바이패스 비트를 확인한 결과 플러시-재적재 공격이 수행된 캐시 블록은 상기 SRAM 기반의 공유 최종레벨캐*를 우회하여 상기 피공격자 어플리케이션 코어의 프라이빗 캐시에 로드하고, 플러시-재적재 공격이 검출되지 않는 캐시 블록은 상기 SRAM 기반의 공유 최종레벨캐시로 로드하는 단계;를 포함하는 것을 특징으로 한다. As another preferred embodiment of the present invention, a method for protecting against a cache-based side-channel attack includes using a memory hierarchy including a private cache, an SRAM-based shared last-level cache and a shared DRAM cache; using a bypass bit included in the cache block of the shared DRAM cache to display whether an attacker application has performed a flush-reload attack on the attacker application; when the attacked application loads at least one cache block from the shared DRAM cache, checking each of the bypass bits in the at least one cache block; and as a result of checking the bypass bit, the cache block on which the flush-reload attack has been performed bypasses the SRAM-based shared last-level cache* and is loaded into the private cache of the attacked application core, and the flush-reload attack is detected. It characterized in that it comprises; loading the cache block that is not done into the SRAM-based shared last-level cache.

본 발명의 바람직한 일 실시예로서, 상기 공격자 어플리케이션은 clflush 명령어를 이용하여 상기 플러시 공격을 실행할 수 있으며, 이 경우 상기 피공격자 어플리케이션의 상기 프라이빗 캐시, 상기 SRAM 기반의 공유 최종레벨 캐시에 있는 블락은 축출되나, 상기 공유DRAM캐시에 있는 블락은 축출되지 않고, 상기 공유 DRAM캐시에 있는 캐시 블락 내의 바이패스 비트를 이용하여 상기 플러시-재적재 공격이 실행여부에 대한 정보를 제공하는 것을 특징으로 한다. As a preferred embodiment of the present invention, the attacker application can execute the flush attack by using the clflush command. In this case, the blocks in the private cache and the SRAM-based shared last-level cache of the attacker application are evicted. However, the block in the shared DRAM cache is not evicted, and information on whether the flush-reload attack is executed using a bypass bit in the cache block in the shared DRAM cache is provided.

본 발명의 바람직한 일 실시예로서, 공유 DRAM캐시에 있는 캐시 블락 내의 바이패스 비트의 값이 "1"인 경우 플러시-재적재 공격이 실행되었음을 나타내고, 이 경우 상기 프라이빗 캐시는 상기 바이패스 비트의 값이 "1"인 상기 공유 DRAM캐시에 있는 캐시 블락을 로드하면서 상기 프라이빗 캐시 내의 바이패스 비트값도 "1"로 표시하는 것을 특징으로 한다. As a preferred embodiment of the present invention, when the value of the bypass bit in the cache block in the shared DRAM cache is "1", it indicates that a flush-reload attack has been performed, and in this case, the private cache determines the value of the bypass bit. It is characterized in that the bypass bit value in the private cache is also displayed as "1" while loading the cache block in the shared DRAM cache, which is "1".

본 발명의 바람직한 일 실시예로서, 상기 공격자 어플리케이션은 플러시-재적재 공격을 수행한 후 재적재를 수행할 때 플러시-재적재 공격을 수행한 적어도 하나의 캐시 블록들이 모두 상기 공유DRAM캐시에 적재되어 있어, 상기 공격자 어플리케이션에서 플러시-재적재 공격을 수행한 적어도 하나의 캐시 블록에 대한 접근 시간이 상기 피공격자 어플리케이션의 접근 여부와 무관하게 동일하여 피공격자 어플리케이션의 접근 패턴 및 실행패턴을 판단할 수 없는 것을 특징으로 한다.As a preferred embodiment of the present invention, when the attacker application performs a flush-reload attack and then performs a reload, at least one cache block that has performed the flush-reload attack is all loaded into the shared DRAM cache. In this case, since the access time to at least one cache block for which the flush-reload attack is performed in the attacker application is the same regardless of whether the attacked application is accessed, the access pattern and execution pattern of the attacked application cannot be determined. characterized in that

본 발명의 바람직한 일 실시예에서는 별도의 소프트웨어의 변형없이, 하드웨어만의 변형을 통해 캐시기반 부채널공격의 대상이 될 수 있는 모든 피공격자 어플리케이션에서 이를 방어하는 효과가 있다. In a preferred embodiment of the present invention, there is an effect of defending against all attacker applications that can be the target of a cache-based side-channel attack through only hardware modification without modification of separate software.

본 발명의 바람직한 일 실시예에서는 캐시기반 부채널공격의 대상이 될 수 있는 캐시 블록이 최종레벨캐시(LLC)에 들어가지 못하도록 변형하여 캐시기반 부채널공격을 방어하는 효과가 있다. In a preferred embodiment of the present invention, there is an effect of preventing a cache-based side-channel attack by transforming a cache block that can be a target of a cache-based side-channel attack from entering the final level cache (LLC).

본 발명의 바람직한 일 실시예에서는 clflush 명령어로 DRAM 캐시 내의 캐시블록을 축출할 수 없도록 제한함으로써 모든 프로세스가 해당 캐시블록에 접근할 때 DRAM캐시에 접근하는 시간을 경험하도록 변형함으로써 캐시기반 부채널공격을 방어할 수 있는 효과가 있다. In a preferred embodiment of the present invention, the cache-based side-channel attack is prevented by limiting the cache block in the DRAM cache from being evicted with the clflush command, so that all processes experience the time to access the DRAM cache when accessing the corresponding cache block. It has a protective effect.

본 발명의 바람직한 일 실시예에서는 데이터의 쓰기 가능 여부 및 공유 여부 등과 상관없이 캐시기반 부채널공격을 방어할 수 있는 효과가 있다. In a preferred embodiment of the present invention, there is an effect that can prevent a cache-based side-channel attack regardless of whether data is writable or shared.

도 1 내지 3은 본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 장치에서 플로시재적재 공격을 무력화하는 방법을 도시한다.
도 4 는 본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 방법의 흐름도를 도시한다.
1 to 3 show a method of neutralizing a flow reload attack in a device for defending against a cache-based side-channel attack as a preferred embodiment of the present invention.
4 is a flowchart of a method for defending against a cache-based side-channel attack as a preferred embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고, 이를 상세한 설명을 통해 상세히 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명은 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and will be described in detail through the detailed description. However, this is not intended to limit the present invention to specific embodiments, and it should be understood that the present invention includes all modifications, equivalents and substitutes included in the spirit and scope of the present invention.

컴퓨터 시스템의 메모리 시스템은 메인 메모리에 가까우며, 용량이 크고 느린 캐시 및 프로세서에 가까우며, 용량이 작고 빠른 캐시를 포함할 수 있다. 이러한 캐시의 구성은 일반적으로 캐시 계층, 메모리 계층 또는 메모리 시스템이라고 지칭할 수 있다. 캐시 계층의 각 레벨은 캐시 레벨로 지칭할 수 있다. The memory system of a computer system is close to main memory, and may include large, slow caches and processor-like, small and fast caches. The configuration of such a cache may be generally referred to as a cache layer, a memory layer, or a memory system. Each level of the cache hierarchy may be referred to as a cache level.

캐시 시스템을 설계할 때, 부채널 공격(side-channel attack)과 같은 보안 공격에 대한 취약점을 회피하는 것이 중요할 수 있다. 부채널 공격의 일 형태인 플러시재적재(Flush+Reload) 공격은 공격자가 피공격자의 명령어 실행 패턴을 알아내어 피공격자의 비밀 암호 키 등을 무단으로 가져오는 공격이다. When designing a cache system, it can be important to avoid vulnerabilities to security attacks such as side-channel attacks. A flush+reload attack, which is a form of side-channel attack, is an attack in which an attacker finds out the attacker's command execution pattern and obtains the attacker's secret encryption key without permission.

이러한 플러시재적재 공격을 방어하기 위한 기술의 예로, Liu, Fangfei, et al. "Catalyst: Defeating last-level cache side channel attacks in cloud computing." 2016 IEEE international symposium on high performance computer architecture (HPCA). IEEE, 2016 가 있다. 이 방법에서는 Intel CPU의 기능 중 하나인 CAT를 사용하여 안전하게 보호해야되는 데이터를 캐시 파티셔닝을 통해 물리적으로 격리하는 방법을 사용하여 플러시재적재 공격을 무력화 시키는 방법을 사용하고 있다. 그러나, 이 방법의 경우에는 CAT를 지원하는 일부 프로세서에서만 지원되는 단점이 있다. As an example of a technique for defending against such a flushload attack, Liu, Fangfei, et al. "Catalyst: Defeating last-level cache side channel attacks in cloud computing." 2016 IEEE international symposium on high performance computer architecture (HPCA). IEEE, 2016. This method uses CAT, one of the functions of Intel CPU, to physically isolate data that needs to be protected through cache partitioning to neutralize the flush reload attack. However, in the case of this method, there is a disadvantage that is supported only by some processors supporting CAT.

또 다른 기술로 Kayaalp, Mehmet, et al. "RIC: relaxed inclusion caches for mitigating LLC side-channel attacks." 2017 54th ACM/EDAC/IEEE Design Automation Conference (DAC). IEEE, 2017 에서는 읽기 전용 데이터가 LLC에 저장되지 않도록 캐시 정책을 변경함으로써 플러시재적재의 주 공격 대상이 되는 캐시블록들에 공격자 어플리케이션이 접근하는 경우, 피공격자 어플리케이션의 접근 여부와 무관하게 항상 긴 메모리 접근 시간을 겪도록 하는 방법을 이용하고 있다. 이 방법의 경우에는 데이터를 읽기 전용 데이터로 한정하고 있는 단점이 있다. Another technique is Kayaalp, Mehmet, et al. "RIC: relaxed inclusion caches for mitigating LLC side-channel attacks." 2017 54th ACM/EDAC/IEEE Design Automation Conference (DAC). In IEEE, 2017, by changing the cache policy so that read-only data is not stored in LLC, when an attacker application accesses cache blocks, which are the main attack targets for flush reloading, the long memory is always long regardless of whether the attacker application accesses it. We are using a method that allows access time to suffer. This method has a disadvantage in that data is limited to read-only data.

본 발명의 일 실시예에서는 별도의 소프트웨어의 변형없이, 하드웨어만의 변형을 통해 가상머신 또는 프로세스를 지정해줄 필요도 없이, 캐시기반 부채널공격의 대상이 될 수 있는 모든 피공격자 어플리케이션에서 이를 방어하고자 한다. 또한 캐시기반 부채널공격의 대상이 될 수 있는 캐시 블록이 최종레벨캐시(LLC)에 들어가지 못하도록 변형하여 캐시기반 부채널공격을 방어하는 방법을 제안하고자 한다.In one embodiment of the present invention, without modification of separate software, without the need to designate a virtual machine or process through only hardware modification, it is intended to defend against all attacker applications that can be the target of a cache-based side-channel attack. do. Also, we would like to propose a method to prevent cache-based side-channel attacks by modifying the cache blocks that can be the target of cache-based side-channel attacks from entering the final level cache (LLC).

도 1 내지 3은 본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 장치에서 플로시재적재 공격을 무력화하는 방법을 도시한다. 1 to 3 show a method of neutralizing a flow reload attack in an apparatus for defending a cache-based side-channel attack as a preferred embodiment of the present invention.

본 발명의 바람직한 일 실시예에서 사용되는 clflush 명령어는 L1 내지 L3캐시에 있는 블락은 축출하되, 공유L4 캐시에 있는 블락은 축출하는 않고, clflush 가 되었는지 안되었는지 여부를 바이패스비트를 이용하여 정보를 남기는 명령어를 지칭한다. 바이패스비트가 "1"인 경우에는 clflush가 되었음을 나타내고, 바이패스비트가 "0"인 경우에는 clflush가 되지 않았음을 나타낸다.The clflush instruction used in the preferred embodiment of the present invention evicts blocks in the L1 to L3 caches, but does not evict blocks in the shared L4 cache. Indicates the command to leave. When the bypass bit is "1", it indicates that clflush has been performed, and when the bypass bit is "0", it indicates that clflush is not performed.

본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 장치는 적어도 하나의 프라이빗 캐시(130), SRAM 기반의 공유캐시(140)를 포함하고,또한 공유DRAM 캐시(150)를 더 포함하도록 메모리 계층구조가 구현된다. 또한,공유DRAM 캐시(150)의 각 캐시블록은 바이패스 비트(151a)를 포함하여, 공격자 어플리케이션이 피공격자 어플리케이션에 대한 부채널공격여부를 표시한다. 바이패스비트가 "1"인 경우에는 부채널공격이 있었음을 나타내고, 바이패스비트가 "0"인 경우에는 부채널공격이 없음을 나타낸다. As a preferred embodiment of the present invention, the device for protecting against a cache-based side-channel attack includes at least one private cache 130 , an SRAM-based shared cache 140 , and further includes a shared DRAM cache 150 . A memory hierarchy is implemented to In addition, each cache block of the shared DRAM cache 150 includes a bypass bit 151a to indicate whether the attacker application has a side channel attack on the attacker application. When the bypass bit is "1", it indicates that there was a side channel attack, and when the bypass bit is "0", it indicates that there is no side channel attack.

본 발명의 바람직한 일 실시예로서, 프라이빗 캐시(130)는 L1 캐시 또는 L2 캐시, SRAM 기반의 공유캐시(140)는 L3 캐시, 그리고 공유DRAM 캐시(150)는 L4캐시로 구현될 수 있다. As a preferred embodiment of the present invention, the private cache 130 may be implemented as an L1 cache or an L2 cache, the SRAM-based shared cache 140 may be implemented as an L3 cache, and the shared DRAM cache 150 may be implemented as an L4 cache.

본 발명의 바람직한 일 실시예로서, 피공격자 어플리케이션은 공유DRAM 캐시에서 적어도 하나의 캐시 블록을 로드할 때 적어도 하나의 캐시 블록 내의 상기 바이패스 비트 각각을 확인한다. 그리고, 바이패스비트가 "1"인 경우에는 해당 캐시블록을 최종레벨캐시(140)를 우회하여 프라이빗 캐시(130)에 로드하고, 프라이빗 캐시의 바이패스비트(131b, 131c)를 "0"에서 "1"로 변경한다. 피공격자 어플리케이션은 바이패스비트가 "0"인 경우에는 해당 캐시블록을 최종레벨캐시(140)에 로드하도록 구현될 수 있다. As a preferred embodiment of the present invention, the attacked application checks each of the bypass bits in at least one cache block when loading at least one cache block from the shared DRAM cache. And, when the bypass bit is "1", the corresponding cache block is loaded into the private cache 130 by bypassing the final level cache 140, and the bypass bits 131b and 131c of the private cache are changed from "0" to Change it to "1". The attacker application may be implemented to load the corresponding cache block into the final level cache 140 when the bypass bit is "0".

도 1 내지 3 을 참고하여, 본 발명의 바람직한 일 실시예로서 캐시기반 부채널공격을 방어하는 장치(100)가 플러시재적재 공격을 방어하는 방법을 기술한다. 본 발명의 바람직한 일 실시예로서, 도 1 은 공격자 어플리케이션에서 "clush"명령어를 통해 축출을 수행하는 과정을 나타내고, 도 2 는 "clflush"명령 이후 기다리는 과정을, 그리고 도 3 은 공격자 어플리케이션에서 재적재를 수행하는 과정을 나타낸다. 1 to 3, as a preferred embodiment of the present invention, a method for the apparatus 100 for defending against a cache-based side-channel attack to defend against a flush reload attack will be described. As a preferred embodiment of the present invention, FIG. 1 shows the process of performing an eviction through the "clush" command in the attacker application, FIG. 2 shows the waiting process after the "clflush" command, and FIG. 3 is the reloading process in the attacker application represents the process of performing

도 1 을 참고하면, 공격자 어플리케이션(110)은 "Core 0"(111) 그리고 피공격자 어플리케이션(120)은 "Core 1"(121)에 있고, 공격자 어플리케이션(110)이 캐시블록 A 및 B에 대해 플러시재적재 공격을 수행하는 것을 가정한다. Referring to FIG. 1 , the attacker application 110 is in “Core 0” 111 and the attacker application 120 is in “Core 1” 121 , and the attacker application 110 is a cache block A and B. Assume that a flush reload attack is performed.

공격자 어플리케이션(110)은 "clflush" 명령어를 이용하여 캐시블록 A 및 B를 축출하고자 한다(S110). 이 경우, 캐시블록 A 및 B가 기적재된 공유DRAM캐시(150)에서는 캐시블록 A 및 B(151a) 내의 바이패스비트를 "0"에서 "1"로 설정한다. The attacker application 110 attempts to evict cache blocks A and B using the "clflush" command (S110). In this case, in the shared DRAM cache 150 in which the cache blocks A and B are written, the bypass bits in the cache blocks A and B 151a are set from "0" to "1".

도 2 를 참고하면, 피공격자 어플리케이션(120)은 공유DRAM캐시(150)에 있는 캐시블록을 로드할 때(S130) 해당 캐시블록 내의 바이패스 비트(151b)를 각각 확인한다. 확인한 결과 바이패스 비트(151b)가 "1"인 경우에는 clflush의 대상이 된 캐시 블록 A에 대해 최종레벨캐시 우회정책을 적용하여(S140) 플러시재적재 공격을 무력화 한다. 그리고, 캐시 블록 A를 피공격자 코어(121)의 프라이빗캐시에 로드하고, 프라이빗 캐시의 캐시블록A에 포함된 바이패스 비트를 "1"로 설정한다(S131c). 만일, 공유DRAM캐시(150)에 있는 캐시블록 A의 바이패스비트가 "0"인 경우에는, 캐시블록 A를 최종레벨캐시에 로드한다. Referring to FIG. 2 , the attacker application 120 checks each of the bypass bits 151b in the corresponding cache block when loading the cache block in the shared DRAM cache 150 (S130). As a result of checking, if the bypass bit 151b is "1", the final level cache bypass policy is applied to the cache block A that is the target of clflush (S140) to neutralize the flush reload attack. Then, the cache block A is loaded into the private cache of the attacker core 121, and the bypass bit included in the cache block A of the private cache is set to “1” (S131c). If the bypass bit of the cache block A in the shared DRAM cache 150 is "0", the cache block A is loaded into the last level cache.

도 3은 공격자 어플리케이션에서 "clflush"명령 이후 일정 시간의 기다림 이후에 재적재를 위해, 공유DRAM캐시(150) 내의 캐시블록 A 및 B에 다시 접근하는 과정을 나타낸다. 공격자 어플리케이션(110)은 최종레벨캐시(140)에 캐시블록 A 및 B가 모두 존재하지 않으므로, 공유DRAM캐시(150)까지 접근해야 한다. 최종레벨캐시(140)가 L3캐시로, 공유DRAM캐시(150)가 L4캐시로 구현된 경우 공격자 어플리케이션(110)은 추가적인 접근시간이 요구된다. 3 shows a process of re-accessing cache blocks A and B in the shared DRAM cache 150 for reloading after waiting for a predetermined time after the "clflush" command in the attacker application. Since the attacker application 110 does not have both cache blocks A and B in the final level cache 140 , it must access the shared DRAM cache 150 . When the final level cache 140 is implemented as an L3 cache, and the shared DRAM cache 150 is implemented as an L4 cache, the attacker application 110 requires additional access time.

또한 공격자 어플리케이션(110)은 플러시 공격을 수행한 후 재적재를 수행할 때 플러시 공격을 수행한 캐시 블록 A 및 B가 모두 공유DRAM캐시(150)에 적재되어 있으므로, 공격자 어플리케이션(110)에서 플러시 공격을 수행한 캐시 블록 A 및 B에 대한 접근 시간이 피공격자 어플리케이션(120)의 접근 여부와 무관하게 동일해진다. 따라서 공격자 어플리케이션(110)은 피공격자 어플리케이션(120)의 접근 패턴 및 실행패턴을 판단할 수 없게 되어 플러시재적재 공격에 실패한다. In addition, when the attacker application 110 performs a flush attack and then performs reloading, since both cache blocks A and B that have performed the flush attack are loaded in the shared DRAM cache 150, the attacker application 110 performs a flush attack. The access times for the cache blocks A and B that have performed are the same regardless of whether the attacker application 120 accesses or not. Therefore, the attacker application 110 cannot determine the access pattern and execution pattern of the attacked application 120, and the flush reload attack fails.

도 4 는 본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 방법의 흐름도를 도시한다. 4 is a flowchart of a method for defending against a cache-based side-channel attack as a preferred embodiment of the present invention.

본 발명의 바람직한 일 실시예로서, 캐시기반 부채널공격을 방어하는 방법은 하드웨어적으로 프라이빗 캐시, SRAM 기반의 공유캐시, 그리고 공유DRAM 캐시를 포함하는 메모리 계층구조를 이용하는 장치를 이용한다(S410). As a preferred embodiment of the present invention, the method for defending against a cache-based side-channel attack uses a hardware device using a memory hierarchy including a private cache, an SRAM-based shared cache, and a shared DRAM cache (S410).

공격자 어플리케이션에서 공유DRAM 캐시 내의 적어도 하나 이상의 캐시 블락을 축출하고자 하는 경우, 공유DRAM캐시는 캐시 블락은 축출하지 않은 채, clflush된 적어도 하나의 캐시 블락 각각의 내부 바이패스비트값을 "1"로 설정한다(S420). 이 후, 공격자 어플리케이션이 쉬고 있는 동안, 피공격자 어플리케이션에서 공유DRAM 캐시로부터 적어도 하나의 캐시 블록을 로드할 때, 캐시 블록 내의 바이패스비트를 각각 확인한다(S430). 피공격자 어플리케이션은 바이패스비트값이 "1"인 경우 clflush된 캐시블락으로 판단하고, 해당 캐시블록을 최종레벨캐시를 우회하여 피공격자 어플리케이션 코어의 프라이빗 캐시로 로드한다. 그 외 플러시 공격이 검출되지 않은 캐시 블록은 최종레벨캐시로 로드한다(S440). When an attacker application attempts to evict at least one cache block in the shared DRAM cache, the shared DRAM cache sets the internal bypass bit value of each clflushed at least one cache block to “1” without evicting the cache block. do (S420). After that, while the attacker application is resting, when the attacker application loads at least one cache block from the shared DRAM cache, each of the bypass bits in the cache block is checked ( S430 ). When the bypass bit value is "1", the attacked application determines that the cache block is clflushed, and loads the corresponding cache block into the private cache of the attacked application core, bypassing the final level cache. Cache blocks in which other flush attacks are not detected are loaded into the final level cache (S440).

도면들에서 논의되고 제시된 예시적 실시예들을 포함하는 본 개시의 주요 특징은 다양한 아키텍쳐로 구현될 수 있다. 일 실시 예에서, 캐시는 하나 이상의 프로세서상에서 실행되는 스레드 또는 프로세스와 같은 하나 이상의 소프트웨어 구성 요소에 의해 제어되거나 액세스 되거나 저장될 수 있다. 일 실시예에서, 메모리에 저장되는 명령 셋과 같은 소프트웨어 라이브러리는 메모리에 저장되고, 프로세스 및/ 또는 운영 시스템의 스레드 및/또는 어플리케이션에 의해 액세스될 수 있다. 일 실시예에서, 비일시적인 컴퓨터 판독 가능 매체에 저장된 명령 셋은 프로세서에 의해 수행될 수 있다. 일 실시예에서, 캐시는 하나 이상의 하드웨어 장치에 의해 제어되거나 액세스되거나 저장될 수 있다. 일 실시에ㅖ에서, 이러한 하드웨어 장치는, 하나 이상의 프로세서 코어를 각각 갖는 하나 이상의 프로세서와 같으나, 이에 한정되지 않는, 프로세싱 회로를 포함할 수 있다. 이러한 프로세서는 중앙 처리 장치(central processing unit, CPU), 그래픽 처리 장치(graphics processing unit, GPU), 멀티 코어 CPU 또는 멀티 코어 GPU의 코어, 산술 로직 유닛(arithmetic logic unit, ALU), 디지털 신호 프로세서, 마이크로 컨트롤러, 시스템 온 칩(System-on-Chip, SoC), 필드 프로그램어블 게이트 어레이(field programmable gate array, FPGA), 프로그램어블 로직 어레이(programmable logic array, PLA), 주문형 집적 회로(application specific integrated circuit, ASIC), 모듈러 로직 장치, 패키지 로직 칩, 및/또는 정의된 방식으로 명령에 응답하고 명령을 실행할 수 있는 임의의 다른 장치 중 적어도 하나 일 수 있다. 일 실시예에서, 캐시는 동일한 타입 또는 상이한 타입의 구성의 조합의 의해 저장되거나, 액세스 되거나, 저장될 수 있다. 예를 들어, 상기 구성은, 복수의 프로세서들, 단일 프로세서의 프로세싱 코어들, 멀티 프로세서 컴퓨터의 프로세싱 코어들, 직렬로 동작하는 2개 이상의 프로세서(예를 들어, CPU 및 GPU, ASIC를 이용하는 CPU), 및/또는 프로세서에 의해 실행되는 소프트웨어일 수 있다. 예시적 실시예들은 캐시를 저장, 액세스, 및 관리하는 하나 이상의 CPU들을 포함하는 컴퓨터와 같은 단일 장치의 구성을 포함할 수 있다. 일 실시예는 캐시를 액세스 및/또는 관리하기 위해 통신하는 CPU를 포함하는 2개 이상의 장치와 같은 다수의 장치의 구성 요소를 포함할 수 있다. 일 실시예는 서버 컴퓨팅 장치, 서버 컴퓨터, 서버 컴퓨터의 연결, 서버 팜, 클라우드 컴퓨터, 컨텔츠 플랫폼, 모바일 컴퓨팅 장치, 스마트 폰, 태블릭, 또는 셋탑박스를 포함할 수 있다. 일 실시예는 직접적으로 통신하는 구성 요소(예를 들어, 멀티 코어 프로세서의 2개 이상의 코어) 및/또는 간접적으로 통신하는 구성 요소(예를 들어, 버스를 통해, 유선 또는 무선 채널 또는 네트워크를 통해, 마이크로 컨트롤러 또는 아비터(arbiter)와 같은 중간(intermediate) 구성을 통해)을 포함할 수 있다. 일 실시예는 장치 또는 구성에 의해 각각 수행되는 캐시 관리자의 다수의 인스턴스들을 특징으로 할 수 있고, 이러한 인스턴스들은 동시에, 연속적으로, 및/또는 인터리빙된 방식으로 실행될 수 있다. 일 실시예는 2개 이상의 장치 또는 컴포넌트에 대한 캐시 관리자의 인스턴스의 분포를 특징으로 할 수 있다.The key features of the present disclosure, including the exemplary embodiments discussed and presented in the drawings, may be implemented in a variety of architectures. In one embodiment, the cache may be controlled, accessed, or stored by one or more software components, such as threads or processes running on one or more processors. In one embodiment, a software library, such as a set of instructions stored in memory, is stored in the memory and may be accessed by processes and/or threads and/or applications of the operating system. In one embodiment, a set of instructions stored in a non-transitory computer-readable medium may be executed by a processor. In one embodiment, the cache may be controlled, accessed, or stored by one or more hardware devices. In one embodiment, such hardware devices may include processing circuitry, such as, but not limited to, one or more processors each having one or more processor cores. Such a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a multi-core CPU or a core of a multi-core GPU, an arithmetic logic unit (ALU), a digital signal processor, Microcontroller, System-on-Chip (SoC), field programmable gate array (FPGA), programmable logic array (PLA), application specific integrated circuit , ASIC), a modular logic device, a packaged logic chip, and/or any other device capable of responding to and executing commands in a defined manner. In one embodiment, the cache may be stored, accessed, or stored by a combination of the same type or different types of configuration. For example, the configuration may include a plurality of processors, processing cores of a single processor, processing cores of a multiprocessor computer, two or more processors operating in series (eg, CPU and GPU, CPU using ASIC) , and/or software executed by a processor. Example embodiments may include the configuration of a single device, such as a computer, that includes one or more CPUs to store, access, and manage a cache. One embodiment may include components of multiple devices, such as two or more devices including CPUs in communication to access and/or manage caches. An embodiment may include a server computing device, a server computer, a server computer connection, a server farm, a cloud computer, a content platform, a mobile computing device, a smart phone, a tablet, or a set-top box. One embodiment is a component that communicates directly (eg, two or more cores of a multi-core processor) and/or a component that communicates indirectly (eg, via a bus, via a wired or wireless channel or network). , via an intermediate configuration such as a microcontroller or arbiter). An embodiment may feature multiple instances of the cache manager, each being performed by a device or configuration, and such instances may be executed concurrently, sequentially, and/or in an interleaved manner. An embodiment may feature a distribution of instances of the cache manager for two or more devices or components.

본 발명의 바람직한 일 실시예로서, 메모리에 저장되는 캐시 및 컴퓨터 판독 가능 명령어들을 포함하는 컴포넌트들을 포함할 수 있다. 이하의 설명에 한정되지는 않으나, 메모리의 비 한정적인 예시는 재기록 가능한 비휘발성 메모리 장치(예를 들어, 플래시 메모리 장치, 소거 가능 프로그램어블 판독 전용 메모리 장치, 또는 마스크 판독 전용 메모리 장치), 휘발성 메모리 장치(예를 들어, 정적 랜덤 액세스 메모리 장치(SRAM), 동적 랜덤 액세스 메모리 장치(DRAM)), 자기 저장 매체(예를 들어, 아날로그 또는 디지털 자기 테이프, 하드 디스크 드라이브) 및 광 저장 매체(예를 들어, CD, DVD, 또는 블루레이 디스크)를 포함할 수 있다. 재기록 가능 비휘발성 메모리 장치가 내장된 메모리의 예로는 메모리 카드, 판독 전용 메모리(read only memory, ROM)가 내장된 매체가 있을 수 있으나, 이에 한정되는 것은 아니다. 일 실시예는 랜덤 액세스 메모리(randoem access memory, RAM), ROM, 영구 대용양 저장 장치(예를 들어, 디스트 드라이브) 및/또는 데이터를 저장하고 기록할 수 있는 임의의 다른 유사한 데이터 저장 메커니즘을 포함할 수 있다. 메모리는 하나 이상의 운영 체제 및/또는 여기에 설명된 예시적인 실시예를 구현하기 위해 컴퓨터 프로그램, 프로그램 코드, 명령 또는 이들의 조합을 저장하도록 구성될 수 있다. 메모리는 USB(universal serial bus) 플래시 드라이브, 메모리 스틱, 블루레이/DVD/CD-ROM 드라이브, 메모리 카드 및/또는 다른 유사한 컴퓨터 판독 가능 저장 매체를 포함할 수 있다. 일 실시예에서, 캐시, 컴퓨터 프로그램, 프로그램 코드, 명령들 및/또는 이들의 조합은 네트워크 인터페이스를 통해 원격 데이터 저장 장치들로부터 하나 이상의 로컬 메모리들 및/또는 하나 이상의 로컬 프로세서들로 로딩될 수 있다. 일 실시예에서, 캐시, 컴퓨터 프로그램, 프로그램 코드, 명령 및/또는 이들의 조합은 다른 로컬 메모리 및/또는 다른 로컬 프로세서 또는 다른 구성 요소로부터 로딩될 수 있다.A preferred embodiment of the present invention may include a cache stored in a memory and components comprising computer readable instructions. Although not limited to the description below, non-limiting examples of memory include, but are not limited to, rewritable non-volatile memory devices (eg, flash memory devices, erasable programmable read-only memory devices, or mask read-only memory devices), volatile memory devices (eg, static random access memory devices (SRAM), dynamic random access memory devices (DRAM)), magnetic storage media (eg, analog or digital magnetic tape, hard disk drives) and optical storage media (eg, for example, a CD, DVD, or Blu-ray Disc). Examples of the memory in which the rewritable nonvolatile memory device is embedded may include, but is not limited to, a memory card and a medium in which a read only memory (ROM) is embedded. One embodiment includes random access memory (RAM), ROM, persistent mass storage (eg, disk drive) and/or any other similar data storage mechanism capable of storing and writing data. can do. The memory may be configured to store one or more operating systems and/or computer programs, program code, instructions, or combinations thereof for implementing the exemplary embodiments described herein. The memory may include a universal serial bus (USB) flash drive, a memory stick, a Blu-ray/DVD/CD-ROM drive, a memory card, and/or other similar computer-readable storage media. In one embodiment, the cache, computer program, program code, instructions, and/or combination thereof may be loaded from remote data storage devices via a network interface into one or more local memories and/or one or more local processors. . In one embodiment, the cache, computer program, program code, instructions, and/or combinations thereof may be loaded from other local memory and/or from another local processor or other component.

본 발명에서는 특정 예시적인 컴퓨터 아키텍쳐와 관련하여 상술하였으나, 캐싱은 컴퓨터 시스템 내부뿐만 아니라 외부의 많은 다른 설정들에 존재할 수 있고, 상기 실시예뜰은 이러한 다른 상황들에 동등하게 적용될 수 있다. 이러한 용도의 예로는 디스크 또는 플래시 메모리와 같은 저속 대용량 저장 장치의 데이터를, DRAM을 사용하여 구현할 수 있는 더 빠르고 더 작은 대용량 저장 장치로 캐시하는 가상 메모리 시스템이 있다. 컴퓨터 시스템에서 캐싱의 다른 예는, 디스크 캐싱, 웹 캐싱 및 네임 캐싱을 포함할 수 있으나, 이에 한정되지는 않는다. 이러한 캐시의 조직 및 캐싱 메커니즘은 상기 논의된 캐시의 구성 및 캐싱 메커니즘, 예를 들어, 세트의 크기 차이, 세트 및 연관성의 구현 등과 다를 수 있다. 캐싱 메커니즘 그 자체의 구현에 관계없이, 다양한 캐싱 방식을 구현하는 데 동등하게 적용될 수 있다.Although the present invention has been described above with respect to a particular exemplary computer architecture, caching may exist in many other settings, both internal to the computer system as well as external to the computer system, and the above embodiments are equally applicable to these other situations. An example of this use is a virtual memory system that caches data from a low-speed mass storage device such as disk or flash memory into a faster, smaller mass storage device that can be implemented using DRAM. Other examples of caching in computer systems may include, but are not limited to, disk caching, web caching, and name caching. The organization and caching mechanisms of such caches may differ from the cache configurations and caching mechanisms discussed above, eg, differences in size of sets, implementations of sets and associations, and the like. Regardless of the implementation of the caching mechanism itself, it is equally applicable to implementing various caching schemes.

개시된 실시예들은 예를 들어, 다양한 캐시 계층 구조와 관련된 시스템 및 방법을 설명하나, 본 개시의 실시예들은 설명에 한정되지 않으며, 설명된 실시예들은 본 발명의 사상 및 범위에 포함되는 대안, 수정 및 등가물을 포함할 수 있다. 본 실시 예의 특징 및 요소가 실시 예에서 특정 조합으로 기술되었지만, 각 특징 또는 요소는 실시 예의 다른 특징 및 요소없이 단독으로 또는 본원에 개시된 다른 특징 및 요소가 있거나 없는 다양한 조합으로 사용될 수 있다. 본 출원에 제공된 방법 또는 흐름도는 범용 컴퓨터 또는 프로세서에 의한 실행을 위해 컴퓨터 읽기 가능 저장 매체에 유형적으로 구현된 컴퓨터 프로그램, 소프트웨어 또는 펌웨어로 구현 될 수 있다.Although the disclosed embodiments describe, for example, systems and methods related to various cache hierarchies, the embodiments of the present disclosure are not limited to the description, and the described embodiments include alternatives, modifications, etc., included within the spirit and scope of the present invention. and equivalents. Although features and elements of the present embodiment are described in specific combinations in the embodiments, each feature or element may be used alone without the other features and elements of the embodiment or in various combinations with or without other features and elements disclosed herein. The method or flowchart provided in the present application may be implemented as a computer program, software, or firmware tangibly embodied in a computer-readable storage medium for execution by a general-purpose computer or processor.

본 발명은 도면에 도시된 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 다른 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 특허청구범위의 기술적 사상에 의하여 정해져야 할 것이다.Although the present invention has been described with reference to the embodiments shown in the drawings, which are merely exemplary, those skilled in the art will understand that various modifications and equivalent other embodiments are possible therefrom. Accordingly, the true technical protection scope of the present invention should be determined by the technical spirit of the appended claims.

Claims (15)

캐시기반 부채널공격을 방어하는 장치로서,
프라이빗 캐시;및
SRAM 기반의 공유캐시;를 포함하고, 또한
공유DRAM 캐시;를 더 포함하도록 메모리 계층구조가 구현되며, 이 경우 상기 공유DRAM 캐시의 각 캐시블록은 바이패스 비트를 포함하여, 상기 바이패스 비트는 공격자 어플리케이션이 피공격자 어플리케이션에 대한 부채널공격여부를 표시하는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
As a device to defend against cache-based side-channel attacks,
private cache; and
SRAM-based shared cache; including, and
A memory hierarchy is implemented to further include a shared DRAM cache. In this case, each cache block of the shared DRAM cache includes a bypass bit, and the bypass bit determines whether the attacker application performs a side-channel attack on the attacker application. A device for defending against a cache-based side-channel attack, characterized in that it displays.
제 1 항에 있어서,
상기 공유DRAM 캐시에서 적어도 하나의 캐시 블록을 로드할 때 확인한 바이패스 비트 값이 1로서 부채널공격이 확인되는 캐시 블록의 경우 상기 공유 최종레벨캐*를 우회하여 상기 프라이빗 캐시로 로드하고,
바이패스 비트 값이 0으로서 부채널공격이 확인되지 않는 캐시 블록의 경우 상기 SRAM 기반 공유캐시로 로드하는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
The method of claim 1,
The bypass bit value checked when loading at least one cache block from the shared DRAM cache is 1, and in the case of a cache block in which a side channel attack is confirmed, the shared final level cache* is bypassed and loaded into the private cache,
A device for preventing a cache-based side-channel attack, characterized in that in the case of a cache block in which a side-channel attack is not confirmed as the bypass bit value is 0, the SRAM-based shared cache is loaded.
제 2 항에 있어서, 상기 프라이빗 캐시는
L1 캐시 또는 L2 캐시이며, 상기 프라이빗 캐시는 바이패스 비트를 더 포함하고, 상기 프라이빗 캐시 내의 바이패스 비트는 부채널공격이 확인되는 캐시 블록을 로드할 때 바이패스 비트값을 0에서 1로 변경되는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
3. The method of claim 2, wherein the private cache is
L1 cache or L2 cache, wherein the private cache further includes a bypass bit, and the bypass bit in the private cache changes the bypass bit value from 0 to 1 when loading a cache block in which a side-channel attack is confirmed. A device for defending against a cache-based side-channel attack, characterized in that.
캐시기반 부채널공격을 방어하는 장치로서,
프라이빗 캐시;및
SRAM 기반의 공유캐시;를 포함하고, 또한
공유DRAM 캐시;를 더 포함하도록 메모리 계층구조를 구현하며,
상기 프라이빗 캐시 및 상기 공유DRAM 캐시는 바이패스 비트를 포함하고 상기 바이패스 비트값을 이용하여 공격자 어플리케이션이 피공격자 어플리케이션에 대한 부채널공격여부를 판단하며,
상기 공격자 어플리케이션은 플러시 공격을 수행한 후 재적재를 수행할 때 플러시 공격을 수행한 적어도 하나의 캐시 블록들이 모두 상기 공유DRAM캐시에 적재되어 있어, 상기 공격자 어플리케이션에서 플러시 공격을 수행한 적어도 하나의 캐시 블록에 대한 접근 시간이 상기 피공격자 어플리케이션의 접근 여부와 무관하게 동일하여 피공격자 어플리케이션의 접근 패턴 및 실행패턴을 판단할 수 없는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
As a device to defend against cache-based side-channel attacks,
private cache; and
SRAM-based shared cache; including, and
A shared DRAM cache; implements a memory hierarchy to further include,
The private cache and the shared DRAM cache include a bypass bit, and by using the bypass bit value, the attacker application determines whether a side-channel attack on the attacker application is performed,
When the attacker application performs a flush attack and then reloads, at least one cache block that has performed a flush attack is all loaded in the shared DRAM cache. At least one cache in which the attacker application performs a flush attack Apparatus for preventing a cache-based side-channel attack, characterized in that the access pattern and execution pattern of the attacked application cannot be determined because the access time to the block is the same regardless of whether the attacked application is accessed.
제 4 항에 있어서, 피공격자 어플리케이션은
상기 공유DRAM 캐시 내의 적어도 하나의 캐시 블록 각각의 바이패스 비트값에 따라 상기 피공격자 어플리케이션의 상기 프라이빗 캐시 또는 상기 SRAM 기반의 공유캐시에 캐시 블록 각각을 로드하는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
The method of claim 4, wherein the attacked application is
A cache-based side-channel attack characterized in that each cache block is loaded into the private cache or the SRAM-based shared cache of the attacked application according to the bypass bit value of each at least one cache block in the shared DRAM cache. defense device.
제 5 항에 있어서,
상기 공유DRAM 캐시 내의 적어도 하나의 캐시 블록 각각의 바이패스 비트값은 공격자 어플리케이션이 피공격자 어플리케이션에 플로시-재적재 공격(Flush - Reload)을 수행하는 경우 1값으로 표시되고, 그렇지 않은 경우 0값으로 표시되는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
6. The method of claim 5,
The bypass bit value of each of the at least one cache block in the shared DRAM cache is displayed as a value of 1 when the attacker application performs a flush-reload attack on the attacked application, otherwise a value of 0 A device that protects against cache-based side-channel attacks, characterized in that indicated by
제 5 항에 있어서, 상기 바이패스 비트값이 1인 캐시 블록은
상기 공유캐시를 우회하여 상기 피공격자 어플리케이션 코어의 상기 프라이빗 캐시로 로드되고, 상기 프라이빗 캐시 내의 바이패스 비트값은 1로 변경되는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
6. The cache block according to claim 5, wherein the bypass bit value is 1,
It bypasses the shared cache and is loaded into the private cache of the attacked application core, and the bypass bit value in the private cache is changed to 1.
제 5 항에 있어서, 상기 바이패스 비트값이 0인 캐시 블록은
상기 피공격자 어플리케이션의 상기 공유캐시에 로드되는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
6. The cache block of claim 5, wherein the bypass bit value is 0.
A device for defending against a cache-based side-channel attack, characterized in that it is loaded into the shared cache of the attacker application.
제 4 항에 있어서,
상기 공격자 어플리케이션은 상기 플러시 공격을 clflush 명령을 이용하여 수행하고,
clflush 명령 실행시 상기 프라이빗 캐시 및 상기 공유캐시에 있는 캐시 블락이 축출될 수 있으나, 상기 공유DRAM 캐시에 있는 캐시 블락은 축출되지 않고, clflush가 수행되었는지 여부만 바이패스비트를 이용하여 정보를 표시하는 것을 특징으로 하는 캐시기반 부채널공격을 방어하는 장치.
5. The method of claim 4,
The attacker application performs the flush attack using the clflush command,
When the clflush command is executed, the cache blocks in the private cache and the shared cache may be evicted, but the cache blocks in the shared DRAM cache are not evicted, and only whether the clflush has been performed is displayed using the bypass bit. A device for defending against a cache-based side-channel attack, characterized in that.
캐시기반 부채널공격을 방어하는 방법으로서,
프라이빗 캐시, SRAM 기반의 공유캐시 및 공유DRAM 캐시를 포함하는 메모리 계층구조를 이용하는 단계;
상기 공유DRAM 캐시의 캐시 블락에 포함된 바이패스 비트를 이용하여 공격자 어플리케이션에서 피공격자 어플리케이션에 플러시 공격을 수행하였는지 여부를 표시하는 단계;
상기 피공격자 어플리케이션에서 상기 공유DRAM 캐시로부터 적어도 하나의 캐시 블록을 로드할 때, 상기 적어도 하나의 캐시 블록 내의 상기 바이패스 비트를 각각 확인하는 단계; 및
상기 바이패스 비트를 확인한 결과 플러시 공격이 수행된 캐시 블록은 상기 SRAM 기반의 공유캐시를 우회하여 상기 피공격자 어플리케이션 코어의 프라이빗 캐시에 로드하고, 플러시 공격이 검출되지 않는 캐시 블록은 상기 SRAM 기반의 공유캐시로 로드하는 단계;를 포함하는 것을 특징으로 하는 방법.
As a method of defending against a cache-based side-channel attack,
using a memory hierarchy including a private cache, an SRAM-based shared cache, and a shared DRAM cache;
displaying whether a flush attack has been performed on the attacker application by the attacker application using the bypass bit included in the cache block of the shared DRAM cache;
when the attacked application loads at least one cache block from the shared DRAM cache, checking each of the bypass bits in the at least one cache block; and
As a result of checking the bypass bit, the cache block on which the flush attack is performed bypasses the SRAM-based shared cache and is loaded into the private cache of the attacked application core, and the cache block for which the flush attack is not detected is the SRAM-based shared cache. Loading into the cache; Method comprising the.
제 10 항에 있어서,
상기 공격자 어플리케이션은 clflush 명령어를 이용하여 상기 플러시 공격을 실행할 수 있으며, 이 경우 상기 피공격자 어플리케이션의 상기 프라이빗 캐시, 상기 SRAM 기반의 공유캐시에 있는 블락은 축출되나, 상기 공유DRAM캐시에 있는 블락은 축출되지 않고,
상기 공유 DRAM캐시에 있는 캐시 블락 내의 바이패스 비트를 이용하여 상기 플러시 공격 실행여부에 대한 정보를 제공하는 것을 특징으로 하는 방법.
11. The method of claim 10,
The attacker application can execute the flush attack by using the clflush command. In this case, the blocks in the private cache and the SRAM-based shared cache of the attacked application are evicted, but the blocks in the shared DRAM cache are evicted. not done,
and providing information on whether the flush attack is executed using a bypass bit in a cache block in the shared DRAM cache.
제 10 항에 있어서, 상기 공유 DRAM캐시에 있는 캐시 블락 내의 바이패스 비트의 값이 "1"인 경우 플러시 공격이 실행되었음을 나타내고, 이 경우 상기 프라이빗 캐시는 상기 바이패스 비트의 값이 "1"인 상기 공유 DRAM캐시에 있는 캐시 블락을 로드하면서 상기 프라이빗 캐시 내의 바이패스 비트값도 "1"로 표시하는 것을 특징으로 하는 방법.11. The method of claim 10, wherein a value of the bypass bit in the cache block in the shared DRAM cache is "1", indicating that a flush attack has been performed, and in this case, the private cache has a value of the bypass bit equal to "1". The method of claim 1, wherein the bypass bit value in the private cache is also displayed as "1" while loading the cache block in the shared DRAM cache. 제 11항에 있어서,
상기 공격자 어플리케이션은 플러시 공격을 수행한 후 재적재를 수행할 때 플러시 공격을 수행한 적어도 하나의 캐시 블록들이 모두 상기 공유DRAM캐시에 적재되어 있어, 상기 공격자 어플리케이션에서 플러시 공격을 수행한 적어도 하나의 캐시 블록에 대한 접근 시간이 상기 피공격자 어플리케이션의 접근 여부와 무관하게 동일하여 피공격자 어플리케이션의 접근 패턴 및 실행패턴을 판단할 수 없는 것을 특징으로 하는 방법.
12. The method of claim 11,
When the attacker application performs a flush attack and then reloads, at least one cache block that has performed a flush attack is all loaded in the shared DRAM cache. At least one cache in which the attacker application performs a flush attack A method characterized in that it is impossible to determine the access pattern and execution pattern of the attacked application because the access time to the block is the same regardless of whether the attacked application accesses or not.
제 10 항에 있어서,
상기 프라이빗 캐시는 L1 캐시 또는 L2 캐시이고,
상기 SRAM 기반의 공유캐시는 L3캐시이며,
상기 공유DRAM 캐시는 L4캐시인 것을 특징으로 하는 방법.
11. The method of claim 10,
The private cache is an L1 cache or an L2 cache,
The SRAM-based shared cache is an L3 cache,
The method of claim 1, wherein the shared DRAM cache is an L4 cache.
청구항 10항 내지 청구항 14항 중 어느 한항에 기재된 캐시기반 부채널공격을 방어하는 방법을 실행하기 위한 프로그램을 기록한 것을 특징으로 하는 컴퓨터 판독 가능 저장매체.

A computer-readable storage medium, characterized in that a program for executing the method for defending against a cache-based side-channel attack according to any one of claims 10 to 14 is recorded.

KR1020200010037A 2020-01-28 2020-01-28 Method and Apparatus for protecting caches from side-channel attacks KR20210096500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200010037A KR20210096500A (en) 2020-01-28 2020-01-28 Method and Apparatus for protecting caches from side-channel attacks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200010037A KR20210096500A (en) 2020-01-28 2020-01-28 Method and Apparatus for protecting caches from side-channel attacks

Publications (1)

Publication Number Publication Date
KR20210096500A true KR20210096500A (en) 2021-08-05

Family

ID=77316454

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200010037A KR20210096500A (en) 2020-01-28 2020-01-28 Method and Apparatus for protecting caches from side-channel attacks

Country Status (1)

Country Link
KR (1) KR20210096500A (en)

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
[1] Liu, Fangfei, et al. "Catalyst: Defeating last-level cache side channel attacks in cloud computing." 2016 IEEE international symposium on high performance computer architecture (HPCA). IEEE, 2016.
[2] Kayaalp, Mehmet, et al. "RIC: relaxed inclusion caches for mitigating LLC side-channel attacks." 2017 54th ACM/EDAC/IEEE Design Automation Conference (DAC). IEEE, 2017.
[3] Liu, Fangfei, and Ruby B. Lee. "Random fill cache architecture." Proceedings of the 47th Annual IEEE/ACM International Symposium on Microarchitecture. IEEE Computer Society, 2014.

Similar Documents

Publication Publication Date Title
TWI798370B (en) Non-transitory computer-readable storage medium and system and method for accessing data in device
US10810309B2 (en) Method and system for detecting kernel corruption exploits
US7870336B2 (en) Operating system protection against side-channel attacks on secrecy
US11777705B2 (en) Techniques for preventing memory timing attacks
EP3591565A1 (en) Computing device with increased resistance against rowhammer attacks
RU2510074C2 (en) System and method of checking executable code before execution thereof
CN110945509B (en) Apparatus and method for controlling access to data in a protected memory region
US8549325B2 (en) Reducing information leakage between processes sharing a cache
TWI797347B (en) Apparatus, method and computer program with memory protection unit using memory protection table stored in memory system to control access to memory
US11061829B2 (en) Prefetch support with address space randomization
CN107851032B (en) Computing device, system and method for executing services in containers
WO2020007813A1 (en) Computing device with increased resistance against rowhammer attacks
KR20210059212A (en) Method for defending memory sharing-based side channel attacks by embedding random values in binaries
KR20210034618A (en) Binary search procedure for control tables stored in the memory system
JP2023526811A (en) Tag check device and method
JP6944444B2 (en) Memory access instruction
CN111373405B (en) Computer-implemented method for preventing bit flipping attacks in computing devices
KR20210096500A (en) Method and Apparatus for protecting caches from side-channel attacks
Zhang et al. A Retrospective and futurespective of Rowhammer attacks and defenses on DRAM
JP6689471B2 (en) Information processing apparatus, information processing method, and information processing program
CN113536364A (en) Intel SGX-based construction method of security key value storage system
CN115398410A (en) Memory accessor failure
US10884953B2 (en) Capability enforcement processors
KR102474874B1 (en) Buffer management system and method for identifying ransomware attacks
KR20210096499A (en) Method and Apparatus for protecting caches from side-channel attacks