skip to main content
10.1145/3625275.3625399acmconferencesArticle/Chapter ViewAbstractPublication PagessospConference Proceedingsconference-collections
research-article
Open Access

CIVSCOPE: Analyzing Potential Memory Corruption Bugs in Compartment Interfaces

Published:23 October 2023Publication History

ABSTRACT

Compartmentalization decomposes a program into separate parts with mediated interactions through compartment interfaces---hiding information that would otherwise be accessible from a compromised component. Unfortunately, most code was not developed assuming its interfaces as trust boundaries. Left unchecked, these interfaces expose confused deputy attacks where data flowing from malicious inputs can coerce a compartment into accessing previously hidden information on-behalf-of the untrusted caller.

We introduce a novel program analysis that models data flows through compartment interfaces to automatically and comprehensively find and measure the attack surface from compartment bypassing data flows. Using this analysis we examine the Linux kernel along diverse compartment boundaries and characterize the degree of vulnerability. We find that there are many compartment bypassing paths (395/4394 driver interfaces have 22741 paths), making it impossible to correct by hand. We introduce CIVSCOPE as a comprehensive and sound approach to analyze and uncover the lower-bound and potential upper-bound risks associated with the memory operations in compartment boundary interfaces.

References

  1. Azab, A. M., Ning, P., Shah, J., Chen, Q., Bhutkar, R., Ganesh, G., Ma, J., and Shen, W. Hypervision across worlds: Real-time kernel protection from the arm trustzone secure world. In Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security (2014), pp. 90--102.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Costan, V., and Devadas, S. Intel sgx explained. Cryptology ePrint Archive (2016).Google ScholarGoogle Scholar
  3. Cui, R., Zhao, L., and Lie, D. Emilia: Catching iago in legacy code. In Proceedings of 29th Network and Distributed System Security (NDSS) (2022), NDSS'22.Google ScholarGoogle Scholar
  4. Gudka, K., Watson, R. N., Anderson, J., Chisnall, D., Davis, B., Laurie, B., Marinos, I., Neumann, P. G., and Richardson, A. Clean application compartmentalization with soaap. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security (2015), pp. 1016--1031.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Hu, H., Chua, Z. L., Liang, Z., and Saxena, P. Identifying arbitrary memory access vulnerabilities in privilege-separated software. In Proceedings of the 20th European Symposium on Research in Computer Security (Cham, 2015), G. Pernul, P. Y A Ryan, and E. Weippl, Eds., ESORICS'15, Springer International Publishing, pp. 312--331.Google ScholarGoogle Scholar
  6. Huang, Y., Narayanan, V., Detweiler, D., Huang, K., Tan, G., Jaeger, T., and Burtsev, A. Ksplit: Automating device driver isolation. In 16th USENIX Symposium on Operating Systems Design and Implementation (OSDI 22) (2022), pp. 613--631.Google ScholarGoogle Scholar
  7. Jia, J., Sahu, R., Oswald, A., Williams, D., Le, M. V., and Xu, T. Kernel extension verification is untenable. In Proceedings of the 19th Workshop on Hot Topics in Operating Systems (2023), pp. 150--157.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Khan, A., Xu, D., and Tian, D. J. Ec: Embedded systems compartmentalization via intra-kernel isolation. In 2023 IEEE Symposium on Security and Privacy (SP) (2023), IEEE, pp. 2990--3007.Google ScholarGoogle ScholarCross RefCross Ref
  9. Khan, A., Xu, D., and Tian, D. J. Low-cost privilege separation with compile time compartmentalization for embedded systems. In 2023 IEEE Symposium on Security and Privacy (SP) (2023), IEEE, pp. 3008--3025.Google ScholarGoogle ScholarCross RefCross Ref
  10. Lefeuvre, H., Bădoiu, V.-A., Chien, Y., Huici, F., Dautenhahn, N., and Olivier, P. Assessing the impact of interface vulnerabilities in compartmentalized software. In Proceedings of the 30th Annual Network and Distributed System Security Symposium (2023), NDSS'23.Google ScholarGoogle Scholar
  11. Lefeuvre, H., Bădoiu, V.-A., Jung, A., Teodorescu, S. L., Rauch, S., Huici, F., Raiciu, C., and Olivier, P. Flexos: Towards flexible os isolation. In Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (2022), pp. 467--482.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Lefeuvre, H., Bădoiu, V.-A., Teodorescu, Ş., Olivier, P., Mosnoi, T., Deaconescu, R., Huici, F., and Raiciu, C. Flexos: Making os isolation flexible. In Proceedings of the Workshop on Hot Topics in Operating Systems (2021), pp. 79--87.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Li, J., Miller, S., Zhuo, D., Chen, A., Howell, J., and Anderson, T. An incremental path towards a safer os kernel. In Proceedings of the Workshop on Hot Topics in Operating Systems (2021), pp. 183--190.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Li, L., Bhattar, A., Chang, L., Zhu, M., and Machiry, A. Checked-cbox: Type directed program partitioning with checked c for incremental spatial memory safety. arXiv preprint arXiv:2302.01811 (2023).Google ScholarGoogle Scholar
  15. Mao, Y., Chen, H., Zhou, D., Wang, X., Zeldovich, N., and Kaashoek, M. F. Software fault isolation with api integrity and multi-principal modules. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles (2011), pp. 115--128.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Mao, Y., Chen, H., Zhou, D., Wang, X., Zeldovich, N., and Kaashoek, M. F. Software fault isolation with api integrity and multi-principal modules. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles (New York, NY, USA, 2011), SOSP '11, Association for Computing Machinery, p. 115--128.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. McKee, D., Giannaris, Y., Perez, C. O., Shrobe, H., Payer, M., Okhravi, H., and Burow, N. Preventing kernel hacks with hakc. In Proceedings 2022 Network and Distributed System Security Symposium. NDSS (2022), vol. 22, pp. 1--17.Google ScholarGoogle ScholarCross RefCross Ref
  18. Narayan, S., Disselkoen, C., Garfinkel, T., Froyd, N., Rahm, E., Lerner, S., Shacham, H., and Stefan, D. Retrofitting fine grain isolation in the firefox renderer. In Proceedings of the 29th USENIX Security Symposium (Aug. 2020), USENIX Security'20, USENIX Association, pp. 699--716.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Narayan, S., Disselkoen, C., Garfinkel, T., Froyd, N., Rahm, E., Lerner, S., Shacham, H., and Stefan, D. Retrofitting fine grain isolation in the firefox renderer (extended version). arXiv preprint arXiv:2003.00572 (2020).Google ScholarGoogle Scholar
  20. Olivier, P., Barbalace, A., and Ravindran, B. The case for intra-unikernel isolation. Workshop on Systems for Post-Moore Architectures 3, 7 (2020), 8--12.Google ScholarGoogle Scholar
  21. Roessler, N., Atayde, L., Palmer, I., McKee, D., Pandey, J., Kemerlis, V. P., Payer, M., Bates, A., Smith, J. M., DeHon, A., et al. μscope: A methodology for analyzing least-privilege compartmentalization in large software artifacts. In Proceedings of the 24th International Symposium on Research in Attacks, Intrusions and Defenses (2021), pp.296--311.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Saltzer, J. H., and Schroeder, M. D. The protection of information in computer systems. Proceedings of the IEEE 63, 9 (1975), 1278--1308.Google ScholarGoogle ScholarCross RefCross Ref
  23. Sartakov, V. A., Vilanova, L., and Pietzuch, P. Cubicleos: A library os with software componentisation for practical isolation. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (2021), pp. 546--558.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Sung, M., Olivier, P., Lankes, S., and Ravindran, B. Intra-unikernel isolation with intel memory protection keys. In Proceedings of the 16th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (New York, NY, USA, 2020), VEE '20, Association for Computing Machinery, p. 143--156.Google ScholarGoogle Scholar
  25. Vahldiek-Oberwagner, A., Elnikety, E., Duarte, N. O., Sammler, M., Druschel, P., and Garg, D. Erim: Secure, efficient in-process isolation with protection keys mpk. In 28th USENIX Security Symposium (USENIX Security 19) (2019), pp. 1221--1238.Google ScholarGoogle Scholar
  26. Van Bulck, J., Oswald, D., Marin, E., Aldoseri, A., Garcia, F. D., and Piessens, F. A tale of two worlds: Assessing the vulnerability of enclave shielding runtimes. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security (New York, NY, USA, 2019), CCS '19, Association for Computing Machinery, p. 1741--1758.Google ScholarGoogle Scholar
  27. Vasilakis, N., Karel, B., Roessler, N., Dautenhahn, N., DeHon, A., and Smith, J. M. Breakapp: Automated, flexible application compartmentalization. In NDSS (2018).Google ScholarGoogle ScholarCross RefCross Ref
  28. Wahbe, R., Lucco, S., Anderson, T. E., and Graham, S. L. Efficient software-based fault isolation. In Proceedings of the fourteenth ACM symposium on Operating systems principles (1993), pp. 203--216.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Watson, R. N., Woodruff, J., Neumann, P. G., Moore, S. W., Anderson, J., Chisnall, D., Dave, N., Davis, B., Gudka, K., Laurie, B., et al. Cheri: A hybrid capability-system architecture for scalable software compartmentalization. In 2015 IEEE Symposium on Security and Privacy (2015), IEEE, pp. 20--37.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Weiser, M. Program slicing. IEEE Transactions on Software Engineering SE-10, 4 (July 1984), 352--357.Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Conferences
    KISV '23: Proceedings of the 1st Workshop on Kernel Isolation, Safety and Verification
    October 2023
    51 pages
    ISBN:9798400704116
    DOI:10.1145/3625275

    Copyright © 2023 Owner/Author(s)

    This work is licensed under a Creative Commons Attribution International 4.0 License.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 23 October 2023

    Check for updates

    Qualifiers

    • research-article

    Upcoming Conference

    SOSP '24
  • Article Metrics

    • Downloads (Last 12 months)335
    • Downloads (Last 6 weeks)44

    Other Metrics

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader