Abstract
Many sensor operating systems have memory limitation constraint; therefore, stack memory areas of threads resides in a single memory space. Because most target platforms do not have hardware MMY (Memory Management Unit), it is difficult to protect each stack area. The method to solve this problem is to exchange original stack handling instructions in binary code for wrapper routines to protect stack area. In this exchanging phase, instruction corruption problem occurs due to difference of each instruction length between stack handling instructions and branch instructions. In this paper, we propose the algorithm to call a target routine without instruction corruption problem. This algorithm can reach a target routine by repeating branch instructions to have a short range. Our solution makes it easy to apply security patch and maintain upgrade of software of sensor node.
현재 많은 센서 운영체제에서는 메모리 제약 때문에 스레드 스택을 공유한다. 하지만 대부분의 대상 플랫폼에서는 MMU가 없어서 하드웨어적으로 스택 보호가 이루어지기 어렵다. 이러한 문제를 해결하기 위해 바이너리코드에 스택 보호 기능을 가진 래퍼 함수를 추가하고 바이너리 코드 안에 존재하는 스택 연산 명령어들을 스택 보호 기능을 가진 래퍼 함수호출로 바꾸어준다. 이때 스택 영역에 접근하는 명령어들과 스택 관리 모듈로의 분기 명령어간의 명령어 길이 차이에 의한 명령어 밀림현상이 발생한다. 이러한 문제를 해결하기 위해 본 논문에서는 밀림현상을 발생시키지 않고 임의의 명령어를 추가된 임의의 모듈을 호출하는 알고리즘을 제안하였다. 이 알고리즘은 제한된 도달 범위를 가지는 분기명령어를 반복적으로 사용하여 명령어 밀림현상 없이 추가된 임의의 모듈에 도달하게 한다. 본 논문에서 제안한 알고리즘은 센서 노드의 소프트웨어 보안 패치와 소프트웨어적 유지 보수를 용이하게 할 것이다.