SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Zhenyu Ning1,2, Yinqian Zhang3, and Fengwei Zhang2
1Wayne State University, 2Southern University of Science and Technology, 3The Ohio State University
SecLabel: Enhancing RISC-V Platform Security with Labelled - - PowerPoint PPT Presentation
SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture Zhenyu Ning 1,2 , Yinqian Zhang 3 , and Fengwei Zhang 2 1 Wayne State University, 2 Southern University of Science and Technology, 3 The Ohio State University Outline
1Wayne State University, 2Southern University of Science and Technology, 3The Ohio State University
SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture 2
SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture 3
4 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
5 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture 6
7 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
if *x0 = 0 then x1 = addr1 else x1 = addr2 jmp to x1 *x0 = 0
8 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
if *x0 = 0 then x1 = addr1 else x1 = addr2 jmp to x1 *x0 = 0 x1 = addr1
9 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
if *x0 = 0 then x1 = addr1 else x1 = addr2 jmp to x1 *x0 = 0 x1 = addr3
10 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
if *x0 = 0 then x1 = addr1 else x1 = addr2 jmp to x1 *x0 = 0
11 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
if *x0 = 0 then x1 = addr1 else x1 = addr2 jmp to x1 *x0 = 2
12 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
if *x0 = 0 then x1 = addr1 else x1 = addr2 jmp to x1 *x0 = 2 x1 = addr2
13 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Local Var a … Local Var b Local Var c … Stack Pointer
14 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Local Var a … Local Var b Local Var c … Stack Pointer
15 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Local Var a … Local Var b Local Var c … Stack Pointer Params Return Addr Frame Pointer Local Var a … Local Var b Random data … Stack Pointer
16 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Local Var a … Local Var b Local Var c … Stack Pointer Params Return Addr Frame Pointer Local Var a … Random data Random data … Stack Pointer
17 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Local Var a … Local Var b Local Var c … Stack Pointer Params Return Addr Frame Pointer Random data … Random data Random data … Stack Pointer
18 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Local Var a … Local Var b Local Var c … Stack Pointer Params Return Addr Random data Random data … Random data Random data … Stack Pointer
19 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Local Var a … Local Var b Local Var c … Stack Pointer Params Modified Addr Random data Random data … Random data Random data … Stack Pointer
20 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Canary … Local Var a Local Var b … Stack Pointer Params Modified Addr Random data Random data … Random data Random data … Stack Pointer
21 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Params Return Addr Frame Pointer Canary … Local Var a Local Var b … Stack Pointer Params Modified Addr Random data Random data … Random data Random data … Stack Pointer
Canary is changed by overflow
22 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
23 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
63
24 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
25 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
63
26 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
63
47
48 54
27 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
28 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture 29
30 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
a[0] a[1] … a[8] a[9] int a[10]; … …
a
a[0] a[1] … a[8] a[9] a[8] = 1 … …
a a[8]
31 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
a[0] a[1] … a[8] a[9] int a[10]; … …
a
a[0] a[1] … a[8] a[9] a[10] = 1 … …
a
a[10]
32 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
a[0] a[1] … a[8] a[9] int a[10]; … …
a
Redzone a[0] … a[9] Redzone int a[10]; Redzone Redzone
a
33 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Redzone a[0] … a[9] Redzone int a[10]; Redzone Redzone
a
Redzone a[0] … a[9] Redzone a[10] = 1 Redzone Redzone
a a[10]
34 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
35 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Pointer Address Base Address of Bounds Directory Table 0 Table 1 Table 2 Table 3 Table 4 Bound Directory Entry 0 Entry 1 Entry 2 Entry 3 Entry 4 Bound Table 3 Pointer Address Upper Bound Lower Bound
36 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
37 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
63
47
48 54
SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture 38
39 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
…… char* password = getInput(); char* copied = copy(password); printf(“copied: %s\n”, copied); …… getInput Taint Source printf Taint Sink
40 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
…… char* password = getInput(); char* copied = copy(password); printf(“copied: %s\n”, copied); …… getInput Taint Source printf Taint Sink password Tainted Variable
41 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
…… char* password = getInput(); char* copied = copy(password); printf(“copied: %s\n”, copied); …… getInput Taint Source printf Taint Sink password Tainted Variable copied
42 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
…… char* password = getInput(); char* copied = copy(password); printf(“copied: %s\n”, copied); …… getInput Taint Source printf Taint Sink password Tainted Variable copied
43 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
…… char* password = getInput(); char* copied = copy(password); printf(“copied: %s\n”, copied); …… getInput Taint Source printf Taint Sink password Tainted Variable copied
44 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Core 0 Core 1 Core N … Shared Last Level Cache I/O Chipset Memory Controller Disk Disk Disk NIC
DS-id DS-id DS-id DS-id DS-id DS-id DS-id CL CL CL
45 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
46 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture 47
48 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
Source Code Compiler IR Modified IR Binary SecLabel-Enabled RISC-V Platform
Compiler Frontend Compiler Backend
SecLabel
Instruction-level Instrumentation
SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture 49
50 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
[1] Cowan, Crispan, et al. "Stackguard: Automatic adaptive detection and prevention of buffer-overflow attacks." USENIX Security Symposium. Vol.
[2] Richarte, Gerardo. "Four different tricks to bypass stackshield and stackguard protection." World Wide Web 1. 2002. [3] Liljestrand, Hans, et al. "PAC it up: Towards pointer integrity using ARM pointer authentication." 28th USENIX Security. 2019. [4] Serebryany, Konstantin, et al. "AddressSanitizer: A fast address sanity checker." Presented as part of the 2012 USENIX Annual Technical
[5] Oleksenko, Oleksii, et al. "Intel MPX explained: An empirical study of intel MPX and software-based bounds checking approaches." arXiv preprint arXiv:1702.00719. 2017. [6] Wallach, Steve. “128-bit addressing in RISC-V and security.“ 5th RISC-V Workshop. 2016. [7] Yu, Zihao, et al. "Labeled RISC-V: A new perspective on software-defined architecture." CARVV. 2017. 51 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture
52 SecLabel: Enhancing RISC-V Platform Security with Labelled Architecture