Skip to main content
Erschienen in: The Journal of Supercomputing 1/2023

20.07.2022

Exploring effective uses of the tagged memory for reducing bounds checking overheads

verfasst von: Jiwon Seo, Inyoung Bang, Yungi Cho, Jangseop Shin, Dongil Hwang, Donghyun Kwon, Yeongpil Cho, Yunheung Paek

Erschienen in: The Journal of Supercomputing | Ausgabe 1/2023

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

For spatial memory safety in C/C++ programs, bounds checking (BC) methods have been studied for decades. The practical use of BC has been deferred due to its inherently large performance overhead. Many efforts have been undertaken to reduce overhead by optimizing metadata management. However, BC’s performance is affected by another subtask, bounds comparison whose overhead is highly significant. To remedy this issue, we utilize the tagged memory (TM), a security architecture enabling efficient sanity checks by matching the tag IDs of pointers and the referent objects. We may replace expensive bounds comparisons with the lightweight tag matchings. However, due to physical limitation of TM for tag operations, this naive replacement scheme endangers security and even worsens the overhead of BC. Being aware of such downsides, we test a hybrid approach where we classify memory objects into two groups whose sanity is guaranteed by TM and bound comparison, respectively. For this, we perform compiler analysis and runtime profiling to comprehensively consider performance factors that influence the benefits and adverse effects of using TM. Our results exhibit that as long as TM is carefully orchestrated to work with conventional bound comparisons, it is effective to reduce the overall overhead.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Fußnoten
1
No real ARM processor officially offered TM at the time of writing.
 
Literatur
1.
Zurück zum Zitat Akritidis P, Costa M, Castro M, Hand S (2009) Baggy bounds checking: an efficient and backwards-compatible defense against out-of-bounds errors. In: USENIX Security Symposium, pp 51–66 Akritidis P, Costa M, Castro M, Hand S (2009) Baggy bounds checking: an efficient and backwards-compatible defense against out-of-bounds errors. In: USENIX Security Symposium, pp 51–66
2.
Zurück zum Zitat Nagarakatte S, Zhao J, Martin MM, Zdancewic S (2009) Softbound: highly compatible and complete spatial memory safety for c. In: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp 245–258 Nagarakatte S, Zhao J, Martin MM, Zdancewic S (2009) Softbound: highly compatible and complete spatial memory safety for c. In: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp 245–258
3.
Zurück zum Zitat Kwon A, Dhawan U, Smith JM, Knight Jr TF, DeHon A (2013) Low-fat pointers: compact encoding and efficient gate-level implementation of fat pointers for spatial safety and capability-based security. In: Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security, pp 721–732 Kwon A, Dhawan U, Smith JM, Knight Jr TF, DeHon A (2013) Low-fat pointers: compact encoding and efficient gate-level implementation of fat pointers for spatial safety and capability-based security. In: Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security, pp 721–732
4.
Zurück zum Zitat Ruwase O, Lam MS (2004) A practical dynamic buffer overflow detector. NDSS 2004:159–169 Ruwase O, Lam MS (2004) A practical dynamic buffer overflow detector. NDSS 2004:159–169
5.
Zurück zum Zitat Simpson MS, Barua RK (2013) Memsafe: ensuring the spatial and temporal memory safety of c at runtime. Softw Pract Exp 43(1):93–128CrossRef Simpson MS, Barua RK (2013) Memsafe: ensuring the spatial and temporal memory safety of c at runtime. Softw Pract Exp 43(1):93–128CrossRef
6.
Zurück zum Zitat Duck GJ, Yap RH (2016) Heap bounds protection with low fat pointers. In: Proceedings of the 25th International Conference on Compiler Construction, pp 132–142 Duck GJ, Yap RH (2016) Heap bounds protection with low fat pointers. In: Proceedings of the 25th International Conference on Compiler Construction, pp 132–142
7.
Zurück zum Zitat Duck GJ, Yap RH, Cavallaro L (2017) Stack bounds protection with low fat pointers. NDSS 17:1–15 Duck GJ, Yap RH, Cavallaro L (2017) Stack bounds protection with low fat pointers. NDSS 17:1–15
8.
Zurück zum Zitat Kroes T, Koning K, van der Kouwe E, Bos H, Giuffrida C (2018) Delta pointers: Buffer overflow checks without the checks. In: Proceedings of the Thirteenth EuroSys Conference, pp 1–14 Kroes T, Koning K, van der Kouwe E, Bos H, Giuffrida C (2018) Delta pointers: Buffer overflow checks without the checks. In: Proceedings of the Thirteenth EuroSys Conference, pp 1–14
10.
Zurück zum Zitat A. Holdings, “Arm architecture reference manual, armv8, for armv8-a architecture profile,” 2021 A. Holdings, “Arm architecture reference manual, armv8, for armv8-a architecture profile,” 2021
11.
Zurück zum Zitat Serebryany K, Stepanov E, Shlyapnikov A, Tsyrklevich V, Vyukov D (2018) Memory tagging and how it improves c/c++ memory safety. arXiv preprint arXiv:1802.09517 Serebryany K, Stepanov E, Shlyapnikov A, Tsyrklevich V, Vyukov D (2018) Memory tagging and how it improves c/c++ memory safety. arXiv preprint arXiv:​1802.​09517
12.
Zurück zum Zitat Kc GS, Keromytis AD, Prevelakis V (2003) Countering code-injection attacks with instruction-set randomization. In: Proceedings of the 10th ACM Conference on Computer and Communications Security, pp 272–280 Kc GS, Keromytis AD, Prevelakis V (2003) Countering code-injection attacks with instruction-set randomization. In: Proceedings of the 10th ACM Conference on Computer and Communications Security, pp 272–280
13.
Zurück zum Zitat Francillon A, Castelluccia C (2008) Code injection attacks on harvard-architecture devices. In: Proceedings of the 15th ACM Conference on Computer and Communications Security, pp 15–26 Francillon A, Castelluccia C (2008) Code injection attacks on harvard-architecture devices. In: Proceedings of the 15th ACM Conference on Computer and Communications Security, pp 15–26
14.
Zurück zum Zitat Carlini N, Wagner D (2014) Rop is still dangerous: breaking modern defenses. In: 23rd USENIX Security Symposium (USENIX Security 14), pp 385–399 Carlini N, Wagner D (2014) Rop is still dangerous: breaking modern defenses. In: 23rd USENIX Security Symposium (USENIX Security 14), pp 385–399
15.
Zurück zum Zitat Lee B, Song C, Jang Y, Wang T, Kim T, Lu L, Lee W (2015) Preventing use-after-free with dangling pointers nullification. In: NDSS Lee B, Song C, Jang Y, Wang T, Kim T, Lu L, Lee W (2015) Preventing use-after-free with dangling pointers nullification. In: NDSS
16.
Zurück zum Zitat Shin J, Kwon D, Seo J, Cho Y, Paek Y (2019) Crcount: pointer invalidation with reference counting to mitigate use-after-free in legacy c/c++. In: NDSS Shin J, Kwon D, Seo J, Cho Y, Paek Y (2019) Crcount: pointer invalidation with reference counting to mitigate use-after-free in legacy c/c++. In: NDSS
17.
Zurück zum Zitat Van Der Kouwe E, Nigade V, Giuffrida C (2017) Dangsan: scalable use-after-free detection. In: Proceedings of the Twelfth European Conference on Computer Systems, pp 405–419 Van Der Kouwe E, Nigade V, Giuffrida C (2017) Dangsan: scalable use-after-free detection. In: Proceedings of the Twelfth European Conference on Computer Systems, pp 405–419
18.
Zurück zum Zitat Zhang T, Lee D, Jung C (2019) Bogo: buy spatial memory safety, get temporal memory safety (almost) free. In: Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems, pp 631–644 Zhang T, Lee D, Jung C (2019) Bogo: buy spatial memory safety, get temporal memory safety (almost) free. In: Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems, pp 631–644
19.
Zurück zum Zitat Nagarakatte S, Zhao J, Martin MM, Zdancewic S (2010) Cets: compiler enforced temporal safety for c. In: Proceedings of the 2010 International Symposium on Memory Management, pp 31–40 Nagarakatte S, Zhao J, Martin MM, Zdancewic S (2010) Cets: compiler enforced temporal safety for c. In: Proceedings of the 2010 International Symposium on Memory Management, pp 31–40
20.
Zurück zum Zitat Yarom Y, Falkner K (2014) Flush+ reload: a high resolution, low noise, l3 cache side-channel attack. In: 23rd USENIX Security Symposium (USENIX Security 14), pp 719–732 Yarom Y, Falkner K (2014) Flush+ reload: a high resolution, low noise, l3 cache side-channel attack. In: 23rd USENIX Security Symposium (USENIX Security 14), pp 719–732
21.
Zurück zum Zitat Liu F, Yarom Y, Ge Q, Heiser G, Lee RB (2015) Last-level cache side-channel attacks are practical. In: 2015 IEEE Symposium on Security and Privacy, pp 605–622 Liu F, Yarom Y, Ge Q, Heiser G, Lee RB (2015) Last-level cache side-channel attacks are practical. In: 2015 IEEE Symposium on Security and Privacy, pp 605–622
22.
Zurück zum Zitat Kocher P, Horn J, Fogh A, Genkin D, Gruss D, Haas W, Hamburg M, Lipp M, Mangard S, Prescher T, et al (2019) Spectre attacks: Exploiting speculative execution. In: 2019 IEEE Symposium on Security and Privacy (SP), pp 1–19 Kocher P, Horn J, Fogh A, Genkin D, Gruss D, Haas W, Hamburg M, Lipp M, Mangard S, Prescher T, et al (2019) Spectre attacks: Exploiting speculative execution. In: 2019 IEEE Symposium on Security and Privacy (SP), pp 1–19
23.
Zurück zum Zitat Lipp M, Schwarz M, Gruss D, Prescher T, Haas W, Fogh A, Horn J, Mangard S, Kocher P, Genkin D, et al (2018) Meltdown: reading kernel memory from user space. In: 27th USENIX Security Symposium (USENIX Security 18), pp 973–990 Lipp M, Schwarz M, Gruss D, Prescher T, Haas W, Fogh A, Horn J, Mangard S, Kocher P, Genkin D, et al (2018) Meltdown: reading kernel memory from user space. In: 27th USENIX Security Symposium (USENIX Security 18), pp 973–990
25.
Zurück zum Zitat Lattner C, Adve V (2005) Automatic pool allocation: improving performance by controlling data structure layout in the heap. ACM Sigplan Not 40(6):129–142CrossRef Lattner C, Adve V (2005) Automatic pool allocation: improving performance by controlling data structure layout in the heap. ACM Sigplan Not 40(6):129–142CrossRef
27.
Zurück zum Zitat Kuvaiskii D, Oleksenko O, Arnautov S, Trach B, Bhatotia P, Felber P, Fetzer C (2017) Sgxbounds: memory safety for shielded execution. In: Proceedings of the Twelfth European Conference on Computer Systems, pp 205–221 Kuvaiskii D, Oleksenko O, Arnautov S, Trach B, Bhatotia P, Felber P, Fetzer C (2017) Sgxbounds: memory safety for shielded execution. In: Proceedings of the Twelfth European Conference on Computer Systems, pp 205–221
30.
Zurück zum Zitat Bradbury A, Ferris G, Mullins R (2014) Tagged memory and minion cores in the lowrisc soc. University of Cambridge, Memo Bradbury A, Ferris G, Mullins R (2014) Tagged memory and minion cores in the lowrisc soc. University of Cambridge, Memo
33.
Zurück zum Zitat Henning JL (2006) Spec cpu2006 benchmark descriptions. ACM SIGARCH Comput Arch News 34(4):1–17CrossRef Henning JL (2006) Spec cpu2006 benchmark descriptions. ACM SIGARCH Comput Arch News 34(4):1–17CrossRef
35.
Zurück zum Zitat Wilander J, Nikiforakis N, Younan Y, Kamkar M, Joosen W (2011) RIPE: runtime intrusion prevention evaluator. In: In Proceedings of the 27th Annual Computer Security Applications Conference, ACSAC. ACM, Wilander J, Nikiforakis N, Younan Y, Kamkar M, Joosen W (2011) RIPE: runtime intrusion prevention evaluator. In: In Proceedings of the 27th Annual Computer Security Applications Conference, ACSAC. ACM,
37.
Zurück zum Zitat Austin TM, Breach SE, Sohi GS (1994) Efficient detection of all pointer and array access errors. In: Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, pp 290–301 Austin TM, Breach SE, Sohi GS (1994) Efficient detection of all pointer and array access errors. In: Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, pp 290–301
38.
Zurück zum Zitat Jim T, Morrisett JG, Grossman D, Hicks MW, Cheney J, Wang Y (2002) Cyclone: a safe dialect of c. In: USENIX Annual Technical Conference, General Track, pp 275–288 Jim T, Morrisett JG, Grossman D, Hicks MW, Cheney J, Wang Y (2002) Cyclone: a safe dialect of c. In: USENIX Annual Technical Conference, General Track, pp 275–288
39.
Zurück zum Zitat Necula GC, Condit J, Harren M, McPeak S, Weimer W (2005) Ccured: Type-safe retrofitting of legacy software. ACM Trans Program Lang Sys (TOPLAS) 27(3):477–526CrossRef Necula GC, Condit J, Harren M, McPeak S, Weimer W (2005) Ccured: Type-safe retrofitting of legacy software. ACM Trans Program Lang Sys (TOPLAS) 27(3):477–526CrossRef
40.
Zurück zum Zitat Woodruff J, Joannou A, Xia H, Fox A, Norton RM, Chisnall D, Davis B, Gudka K, Filardo NW, Markettos AT et al (2019) Cheri concentrate: practical compressed capabilities. IEEE Trans Comput 68(10):1455–1469MathSciNetCrossRefMATH Woodruff J, Joannou A, Xia H, Fox A, Norton RM, Chisnall D, Davis B, Gudka K, Filardo NW, Markettos AT et al (2019) Cheri concentrate: practical compressed capabilities. IEEE Trans Comput 68(10):1455–1469MathSciNetCrossRefMATH
41.
Zurück zum Zitat Younan Y, Philippaerts P, Cavallaro L, Sekar R, Piessens F, Joosen W (2010) Paricheck: an efficient pointer arithmetic checker for c programs. In: Proceedings of the 5th ACM Symposium on Information, Computer and Communications Security, pp 145–156 Younan Y, Philippaerts P, Cavallaro L, Sekar R, Piessens F, Joosen W (2010) Paricheck: an efficient pointer arithmetic checker for c programs. In: Proceedings of the 5th ACM Symposium on Information, Computer and Communications Security, pp 145–156
42.
Zurück zum Zitat Eigler FC (2003) Mudflap: pointer use checking for c/c+. In: GCC Developers Summit, pp 57. Citeseer Eigler FC (2003) Mudflap: pointer use checking for c/c+. In: GCC Developers Summit, pp 57. Citeseer
43.
Zurück zum Zitat Serebryany K, Bruening D, Potapenko A, Vyukov D (2012) Addresssanitizer: a fast address sanity checker. In: Presented as Part of the 2012 USENIX Annual Technical Conference (USENIX ATC 12), pp 309–318 Serebryany K, Bruening D, Potapenko A, Vyukov D (2012) Addresssanitizer: a fast address sanity checker. In: Presented as Part of the 2012 USENIX Annual Technical Conference (USENIX ATC 12), pp 309–318
44.
Zurück zum Zitat Hasabnis N, Misra A, Sekar R (2012) Light-weight bounds checking. In: Proceedings of the Tenth International Symposium on Code Generation and Optimization, pp 135–144 Hasabnis N, Misra A, Sekar R (2012) Light-weight bounds checking. In: Proceedings of the Tenth International Symposium on Code Generation and Optimization, pp 135–144
45.
Zurück zum Zitat Sasaki H, Arroyo MA, Ziad MTI, Bhat K, Sinha K, Sethumadhavan S (2019) Practical byte-granular memory blacklisting using califorms. In: Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture, pp 558–571 Sasaki H, Arroyo MA, Ziad MTI, Bhat K, Sinha K, Sethumadhavan S (2019) Practical byte-granular memory blacklisting using califorms. In: Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture, pp 558–571
46.
Zurück zum Zitat Haller I, Slowinska A, Neugschwandtner M, Bos H (2013) Dowsing for overflows: a guided fuzzer to find buffer boundary violations. In: Presented as Part of the 22nd USENIX Security Symposium (USENIX Security 13), pp 49–64 Haller I, Slowinska A, Neugschwandtner M, Bos H (2013) Dowsing for overflows: a guided fuzzer to find buffer boundary violations. In: Presented as Part of the 22nd USENIX Security Symposium (USENIX Security 13), pp 49–64
47.
Zurück zum Zitat Grieco G, Ceresa M, Buiras P (2016) Quickfuzz: an automatic random fuzzer for common file formats. ACM SIGPLAN Not 51(12):13–20CrossRef Grieco G, Ceresa M, Buiras P (2016) Quickfuzz: an automatic random fuzzer for common file formats. ACM SIGPLAN Not 51(12):13–20CrossRef
48.
Zurück zum Zitat Zeldovich N, Kannan H, Dalton M, Kozyrakis C (2008) Hardware enforcement of application security policies using tagged memory. OSDI 8:225–240 Zeldovich N, Kannan H, Dalton M, Kozyrakis C (2008) Hardware enforcement of application security policies using tagged memory. OSDI 8:225–240
49.
Zurück zum Zitat Dhawan U, Hritcu C, Rubin R, Vasilakis N, Chiricescu S, Smith JM, Knight Jr TF, Pierce BC, DeHon A (2015) Architectural support for software-defined metadata processing. In: Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems, pp 487–502 Dhawan U, Hritcu C, Rubin R, Vasilakis N, Chiricescu S, Smith JM, Knight Jr TF, Pierce BC, DeHon A (2015) Architectural support for software-defined metadata processing. In: Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems, pp 487–502
Metadaten
Titel
Exploring effective uses of the tagged memory for reducing bounds checking overheads
verfasst von
Jiwon Seo
Inyoung Bang
Yungi Cho
Jangseop Shin
Dongil Hwang
Donghyun Kwon
Yeongpil Cho
Yunheung Paek
Publikationsdatum
20.07.2022
Verlag
Springer US
Erschienen in
The Journal of Supercomputing / Ausgabe 1/2023
Print ISSN: 0920-8542
Elektronische ISSN: 1573-0484
DOI
https://doi.org/10.1007/s11227-022-04694-y

Weitere Artikel der Ausgabe 1/2023

The Journal of Supercomputing 1/2023 Zur Ausgabe

Premium Partner