Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3433210.3453111acmconferencesArticle/Chapter ViewAbstractPublication Pagesasia-ccsConference Proceedingsconference-collections
research-article

Cali: Compiler-Assisted Library Isolation

Published: 04 June 2021 Publication History
  • Get Citation Alerts
  • Abstract

    Software libraries can freely access the program's entire address space, and also inherit its system-level privileges. This lack of separation regularly leads to security-critical incidents once libraries contain vulnerabilities or turn rogue. We present Cali, a compiler-assisted library isolation system that fully automatically shields a program from a given library. Cali is fully compatible with mainline Linux and does not require supervisor privileges to execute. We compartmentalize libraries into their own process with well-defined security policies. To preserve the functionality of the interactions between program and library, Cali uses a Program Dependence Graph to track data flow between the program and the library during link time. We evaluate our open-source prototype against three popular libraries: Ghostscript, OpenSSL, and SQLite. Cali successfully reduced the amount of memory that is shared between the program and library to 0.08% (ImageMagick) - 0.4% (Socat), while retaining an acceptable program performance.

    Supplementary Material

    MP4 File (ASIA-CCS21-fp248.mp4)
    Software libraries can freely access the program?s entire address space, and also inherit its system-level privileges. This lack of separation regularly leads to security-critical incidents once libraries contain vulnerabilities or turn rogue. In this talk we present Cali, a compiler assisted library isolation system that fully automatically shields a program from a given library. Cali is fully compatible with mainline Linux and does not require supervisor privileges to execute. We compartmentalize libraries into their own process with well-defined security policies. To preserve the functionality of the interactions between program and library, Cali uses a Data Dependence Graph to track data flow between the program and the library during link time. Cali is almost fully automated, even developers that are not familiar with tool and program can isolate libraries in less than 45 minutes, making library isolation available to the masses.

    References

    [1]
    Bill Allombert. 2020. Debian Popularity Contest. https://popcon.debian.org/stable/by_vote
    [2]
    Andrea Bittau, Petr Marchenko, Mark Handley, and Brad Karp. 2008. Wedge: Splitting Applications into Reduced-privilege Compartments. In Proceedings of the 5th USENIX Symposium on Networked Systems Design and Implementation (San Francisco, California) (NSDI'08). USENIX Association, Berkeley, CA, USA, 309--322.
    [3]
    David Brumley and Dawn Song. 2004. Privtrans: Automatically Partitioning Programs for Privilege Separation. In Proceedings of the 13th Conference on USENIX Security Symposium - Volume 13 (San Diego, CA) (SSYM'04). USENIX Association, Berkeley, CA, USA, 5--5.
    [4]
    Y. Chen, S. Reymondjohnson, Z. Sun, and L. Lu. 2016. Shreds: Fine-Grained Execution Units with Private Memory. In 2016 IEEE Symposium on Security and Privacy (SP). IEEE Computer Society, San Jose, CA, USA, 56--71. https://doi.org/10.1109/SP.2016.12
    [5]
    MITRE Corporation. 2019 a. Artifex Ghostscript : Security Vulnerabilities. https://www.cvedetails.com/vulnerability-list/vendor_id-10846/product_id-36469/Artifex-Ghostscript.html
    [6]
    MITRE Corporation. 2019 b. CVE-2019--5018. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019--5018
    [7]
    MITRE Corporation. 2019 c. Openssl : Security Vulnerabilities. https://www.cvedetails.com/vulnerability-list/vendor_id-217/product_id-383/Openssl-Openssl.html
    [8]
    MITRE Corporation. 2019 d. Sqlite : Security Vulnerabilities. https://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html
    [9]
    Standard Performance Evaluation Corporation. 2017. SPEC CPU® 2017. https://www.spec.org/cpu2017/
    [10]
    Nicholas DeMarinis, Kent Williams-King, Di Jin, Rodrigo Fonseca, and Vasileios P. Kemerlis. 2020. sysfilter: Automated System Call Filtering for Commodity Software. In 23rd International Symposium on Research in Attacks, Intrusions and Defenses (RAID 2020). USENIX Association, San Sebastian, 459--474.
    [11]
    The Linux Kernel documentation. 2019. Seccomp BPF (SECure COMPuting with filters). https://www.kernel.org/doc/html/v4.16/userspace-api/seccomp_filter.html
    [12]
    Jeanne Ferrante, Karl J. Ottenstein, and Joe D. Warren. 1987. The Program Dependence Graph and Its Use in Optimization. ACM Trans. Program. Lang. Syst., Vol. 9, 3 (July 1987), 319--349. https://doi.org/10.1145/24039.24041
    [13]
    Seyedhamed Ghavamnia, Tapti Palit, Azzedine Benameur, and Michalis Polychronakis. 2020 a. Confine: Automated System Call Policy Generation for Container Attack Surface Reduction. In 23rd International Symposium on Research in Attacks, Intrusions and Defenses (RAID 2020). USENIX Association, San Sebastian, 443--458. https://www.usenix.org/conference/raid2020/presentation/ghavanmnia
    [14]
    Seyedhamed Ghavamnia, Tapti Palit, Shachee Mishra, and Michalis Polychronakis. 2020 b. Temporal System Call Specialization for Attack Surface Reduction. In 29th USENIX Security Symposium (USENIX Security 20). USENIX Association, 1749--1766.
    [15]
    Google. 2019. google/sandboxed-api. https://github.com/google/sandboxed-api
    [16]
    Google. 2021. nsjail. https://nsjail.dev/
    [17]
    Le Guan, Jingqiang Lin, Bo Luo, Jiwu Jing, and Jing Wang. 2015. Protecting Private Keys Against Memory Disclosure Attacks Using Hardware Transactional Memory. In Proceedings of the 2015 IEEE Symposium on Security and Privacy (SP '15). IEEE Computer Society, Washington, DC, USA, 3--19. https://doi.org/10.1109/SP.2015.8
    [18]
    Khilan Gudka, Robert N.M. Watson, Jonathan Anderson, David Chisnall, Brooks Davis, Ben Laurie, Ilias Marinos, Peter G. Neumann, and Alex Richardson. 2015. Clean Application Compartmentalization with SOAAP. In Proceedings of the 22Nd ACM SIGSAC Conference on Computer and Communications Security (Denver, Colorado, USA) (CCS '15). ACM, New York, NY, USA, 1016--1031. https://doi.org/10.1145/2810103.2813611
    [19]
    Terry Ching-Hsiang Hsu, Kevin Hoffman, Patrick Eugster, and Mathias Payer. 2016. Enforcing Least Privilege Memory Views for Multithreaded Applications. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (Vienna, Austria) (CCS '16). ACM, New York, NY, USA, 393--405. https://doi.org/10.1145/2976749.2978327
    [20]
    Hong Hu, Zheng Leong Chua, Zhenkai Liang, and Prateek Saxena. 2015. Identifying Arbitrary Memory Access Vulnerabilities in Privilege-Separated Software. In Computer Security -- ESORICS 2015. Springer International Publishing, Cham, 312--331.
    [21]
    Douglas Kilpatrick. 2003. Privman: A Library for Partitioning Applications. In 2003 USENIX Annual Technical Conference (USENIX ATC 03). USENIX Association, San Antonio, TX, 273--284.
    [22]
    Hojoon Lee, Chihyun Song, and Brent Byunghoon Kang. 2018. Lord of the x86 Rings: A Portable User Mode Privilege Separation Architecture on x86. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security (Toronto, Canada) (CCS '18). ACM, New York, NY, USA, 1441--1454. https://doi.org/10.1145/3243734.3243748
    [23]
    James Litton, Anjo Vahldiek-Oberwagner, Eslam Elnikety, Deepak Garg, Bobby Bhattacharjee, and Peter Druschel. 2016. Light-weight Contexts: An OS Abstraction for Safety and Performance. In Proceedings of the 12th USENIX Conference on Operating Systems Design and Implementation (Savannah, GA, USA) (OSDI'16). USENIX Association, Berkeley, CA, USA, 49--64.
    [24]
    Shen Liu, Gang Tan, and Trent Jaeger. 2017. PtrSplit: Supporting General Pointers in Automatic Program Partitioning. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (Dallas, Texas, USA) (CCS '17). ACM, New York, NY, USA, 2359--2371. https://doi.org/10.1145/3133956.3134066
    [25]
    Shen Liu, Dongrui Zeng, Yongzhe Huang, Frank Capobianco, Stephen McCamant, Trent Jaeger, and Gang Tan. 2019. Program-Mandering: Quantitative Privilege Separation. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security (London, United Kingdom) (CCS '19). Association for Computing Machinery, New York, NY, USA, 1023--1040. https://doi.org/10.1145/3319535.3354218
    [26]
    Yutao Liu, Tianyu Zhou, Kexin Chen, Haibo Chen, and Yubin Xia. 2015. Thwarting Memory Disclosure with Efficient Hypervisor-enforced Intra-domain Isolation. In Proceedings of the 22Nd ACM SIGSAC Conference on Computer and Communications Security (Denver, Colorado, USA) (CCS '15). ACM, New York, NY, USA, 1607--1619. https://doi.org/10.1145/2810103.2813690
    [27]
    Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, and Adrian Perrig. 2010. TrustVisor: Efficient TCB Reduction and Attestation. In Proceedings of the 2010 IEEE Symposium on Security and Privacy (SP '10). IEEE Computer Society, Washington, DC, USA, 143--158.
    [28]
    Microsoft. 2012. The BlueHat prize contest official rules. http://www.microsoft.com/security/bluehatprize/rules.aspx
    [29]
    Robert B. Miller. 1968. Response Time in Man-computer Conversational Transactions. In Proceedings of the December 9--11, 1968, Fall Joint Computer Conference, Part I (San Francisco, California) (AFIPS '68 (Fall, part I)). ACM, New York, NY, USA, 267--277. https://doi.org/10.1145/1476589.1476628
    [30]
    Shravan Narayan, Craig Disselkoen, Tal Garfinkel, Nathan Froyd, Eric Rahm, Sorin Lerner, Hovav Shacham, and Deian Stefan. 2020. Retrofitting Fine Grain Isolation in the Firefox Renderer. In 29th USENIX Security Symposium (USENIX Security 20). USENIX Association, 699--716.
    [31]
    Jakob Nielsen. 1993. Usability Engineering. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA.
    [32]
    Ben Niu and Gang Tan. 2012. Enforcing User-space Privilege Separation with Declarative Architectures. In Proceedings of the Seventh ACM Workshop on Scalable Trusted Computing (Raleigh, North Carolina, USA) (STC '12). ACM, New York, NY, USA, 9--20. https://doi.org/10.1145/2382536.2382541
    [33]
    LLVM Project. 2020. LLVM Language Reference Manual. https://llvm.org/docs/LangRef.html
    [34]
    Niels Provos, Markus Friedl, and Peter Honeyman. 2003. Preventing Privilege Escalation. In Proceedings of the 12th Conference on USENIX Security Symposium - Volume 12 (Washington, DC) (SSYM'03). USENIX Association, Berkeley, CA, USA, 16--16.
    [35]
    Weizhong Qiang, Yong Cao, Weiqi Dai, Deqing Zou, Hai Jin, and Benxi Liu. 2017. Libsec: A Hardware Virtualization-Based Isolation for Shared Library. In 19th IEEE International Conference on High Performance Computing and Communications; 15th IEEE International Conference on Smart City; 3rd IEEE International Conference on Data Science and Systems, HPCC/SmartCity/DSS 2017. IEEE Computer Society, Bangkok, Thailand, 34--41. https://doi.org/10.1109/HPCC-SmartCity-DSS.2017.5
    [36]
    David Schrammel, Samuel Weiser, Stefan Steinegger, Martin Schwarzl, Michael Schwarz, Stefan Mangard, and Daniel Gruss. 2020. Donky: Domain Keys textendash Efficient In-Process Isolation for RISC-V and x86. In 29th USENIX Security Symposium (USENIX Security 20). USENIX Association, 1677--1694.
    [37]
    Michael Schwarz, Daniel Gruss, Moritz Lipp, Clémentine Maurice, Thomas Schuster, Anders Fogh, and Stefan Mangard. 2018. Automated Detection, Exploitation, and Elimination of Double-Fetch Bugs Using Modern CPU Features. In Proceedings of the 2018 on Asia Conference on Computer and Communications Security (Incheon, Republic of Korea) (ASIACCS '18). Association for Computing Machinery, New York, NY, USA, 587--600. https://doi.org/10.1145/3196494.3196508
    [38]
    Raoul Strackx, Pieter Agten, Niels Avonds, and Frank Piessens. 2015. Salus: Kernel Support for Secure Process Compartments. ICST Trans. Security Safety, Vol. 2 (2015), e1.
    [39]
    Laszlo Szekeres, Mathias Payer, Tao Wei, and Dawn Song. 2013. SoK: Eternal War in Memory. In Proceedings of the 2013 IEEE Symposium on Security and Privacy (SP '13). IEEE Computer Society, Washington, DC, USA, 48--62.
    [40]
    Carnegie Mellon University. 2018. Ghostscript contains multiple -dSAFER sandbox bypass vulnerabilities. https://www.kb.cert.org/vuls/id/332928/
    [41]
    Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler, Peter Druschel, and Deepak Garg. 2019. ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK). In 28th USENIX Security Symposium (USENIX Security 19). USENIX Association, Santa Clara, CA, 1221--1238.
    [42]
    Z. Wan, D. Lo, X. Xia, L. Cai, and S. Li. 2017. Mining Sandboxes for Linux Containers. In 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST). IEEE Computer Society, Tokyo, Japan, 92--102.
    [43]
    Jun Wang, Xi Xiong, and Peng Liu. 2015. Between Mutual Trust and Mutual Distrust: Practical Fine-grained Privilege Separation in Multithreaded Applications. In Proceedings of the 2015 USENIX Conference on Usenix Annual Technical Conference (Santa Clara, CA) (USENIX ATC '15). USENIX Association, Berkeley, CA, USA, 361--373.
    [44]
    Pengfei Wang, Jens Krinke, Kai Lu, Gen Li, and Steve Dodier-Lazaro. 2017a. How Double-Fetch Situations turn into Double-Fetch Vulnerabilities: A Study of Double Fetches in the Linux Kernel. In 26th USENIX Security Symposium (USENIX Security 17). USENIX Association, Vancouver, BC, 1--16.
    [45]
    Wenhao Wang, Xiaoyang Xu, and Kevin W. Hamlen. 2017b. Object Flow Integrity. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (Dallas, Texas, USA) (CCS '17). Association for Computing Machinery, New York, NY, USA, 1909--1924. https://doi.org/10.1145/3133956.3133986
    [46]
    Yu-Ping Wang, Xu-Qiang Hu, Zi-Xin Zou, Wende Tan, and Gang Tan. 2019. IVT: An Efficient Method for Sharing Subtype Polymorphic Objects. Proc. ACM Program. Lang., Vol. 3, OOPSLA, Article 130 (Oct 2019), 22 pages. https://doi.org/10.1145/3360556
    [47]
    Yongzheng Wu, Sai Sathyanarayan, Roland H. C. Yap, and Zhenkai Liang. 2012. Codejail: Application-Transparent Isolation of Libraries with Tight Program Interactions. In Computer Security -- ESORICS 2012. Springer Berlin Heidelberg, Berlin, Heidelberg, 859--876.
    [48]
    Yongzheng Wu, Jun Sun, Yang Liu, and Jin Song Dong. 2013. Automatically Partition Software into Least Privilege Components Using Dynamic Data Dependency Analysis. In Proceedings of the 28th IEEE/ACM International Conference on Automated Software Engineering (Silicon Valley, CA, USA) (ASE'13). IEEE Press, Piscataway, NJ, USA, 323--333. https://doi.org/10.1109/ASE.2013.6693091

    Cited By

    View all
    • (2023)FreePart: Hardening Data Processing Software via Framework-based Partitioning and IsolationProceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 410.1145/3623278.3624760(169-188)Online publication date: 25-Mar-2023
    • (2023)Dynamic Library CompartmentalizationCompanion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity10.1145/3618305.3623604(51-52)Online publication date: 22-Oct-2023
    • (2023)NatiSand: Native Code Sandboxing for JavaScript RuntimesProceedings of the 26th International Symposium on Research in Attacks, Intrusions and Defenses10.1145/3607199.3607233(639-653)Online publication date: 16-Oct-2023
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ASIA CCS '21: Proceedings of the 2021 ACM Asia Conference on Computer and Communications Security
    May 2021
    975 pages
    ISBN:9781450382878
    DOI:10.1145/3433210
    • General Chairs:
    • Jiannong Cao,
    • Man Ho Au,
    • Program Chairs:
    • Zhiqiang Lin,
    • Moti Yung
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 04 June 2021

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Cali
    2. LLVM
    3. compiler
    4. library isolation
    5. memory isolation
    6. privilege separation
    7. program dependence graph

    Qualifiers

    • Research-article

    Conference

    ASIA CCS '21
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 418 of 2,322 submissions, 18%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)108
    • Downloads (Last 6 weeks)5
    Reflects downloads up to 27 Jul 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)FreePart: Hardening Data Processing Software via Framework-based Partitioning and IsolationProceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 410.1145/3623278.3624760(169-188)Online publication date: 25-Mar-2023
    • (2023)Dynamic Library CompartmentalizationCompanion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity10.1145/3618305.3623604(51-52)Online publication date: 22-Oct-2023
    • (2023)NatiSand: Native Code Sandboxing for JavaScript RuntimesProceedings of the 26th International Symposium on Research in Attacks, Intrusions and Defenses10.1145/3607199.3607233(639-653)Online publication date: 16-Oct-2023
    • (2022)FlexOS: towards flexible OS isolationProceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3503222.3507759(467-482)Online publication date: 28-Feb-2022
    • (2022)PKRU-safeProceedings of the Seventeenth European Conference on Computer Systems10.1145/3492321.3519582(132-148)Online publication date: 28-Mar-2022
    • (2022)Annotating, Tracking, and Protecting Cryptographic Secrets with CryptoMPK2022 IEEE Symposium on Security and Privacy (SP)10.1109/SP46214.2022.9833650(650-665)Online publication date: May-2022
    • (2022)On the (in)security of Memory Protection Units : A Cautionary Note2022 IEEE International Conference on Cyber Security and Resilience (CSR)10.1109/CSR54599.2022.9850322(157-162)Online publication date: 27-Jul-2022
    • (2021)FlexOSProceedings of the 22nd International Middleware Conference: Doctoral Symposium10.1145/3491087.3493683(29-32)Online publication date: 6-Dec-2021
    • (2021)FlexOSProceedings of the Workshop on Hot Topics in Operating Systems10.1145/3458336.3465292(79-87)Online publication date: 1-Jun-2021

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media