操作系统内核权能访问控制的形式验证
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

王淑灵,E-mail:wangsl@ios.ac.cn

中图分类号:

基金项目:

重点研发项目2022YFA1005103,国家自然科学基金项目No.62432005,No.62032024


Formal Verification of Capability-based Access Control of Operating System Kernels
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    操作系统内核是构建安全攸关系统软件的基础. 任何计算机系统的正确运行都依赖于底层操作系统实现的正确性,因此,对操作系统内核进行形式验证是很迫切的需求.然而,操作系统中存在的多任务并发、数据共享和竞争等行为,给操作系统内核的验证带来很大的挑战.近年来,基于定理证明的方法广泛用于操作系统各功能模块的形式验证,并取得多个成功应用.微内核操作系统权能访问控制模块提供基于权能的细粒度访问控制,旨在防止未经授权的用户访问系统内核资源和服务.在权能访问控制模块实现中,所有任务的权能空间构成多个树结构,同时每个任务权能节点包含多种嵌套的复杂数据结构,以及权能函数中广泛存在的对权能结构的访问、修改、(递归)删除等操作,使得它的形式验证与操作系统其他功能模块相比更加困难.本文将以并发精化程序逻辑CSL-R为基础,通过证明权能应用程序接口函数(API函数)和其抽象规范之间的精化关系,来验证航天嵌入式领域某微内核操作系统权能访问控制的功能正确性.我们首先对权能数据结构进行形式建模,并在此基础上定义全局不变式来保持权能空间的一致性;然后定义反映功能正确性需求的内核函数的前后条件规范和API函数的抽象规范;最终验证了权能API函数C代码实现和抽象规范之间的精化关系.以上所有的定义和验证均在Coq定理证明器中完成.我们在验证过程中发现了实现的错误,并得到了微内核操作系统设计方的确认和修改.

    Abstract:

    Operating system (OS) kernels are the basis of designing safety-critical software systems. The correct running of any computer systems relies on the correctness of the underlying OS kernels, therefore, it is highly desirable to verify the correctness of OS kernels formally. However, the behavior such as multi-task concurrency, data sharing and race that exist in OS, brings great challenge to the verification of OS kernels. Recently, the theorem proving based methods have been applied for the formal verification of OS functionality modules, and achieved some successful applications. OS kernel capability-based access control module provides a fine-grained access control, designed to prevent unauthorized users from accessing system kernel resources and services. In the implementation of the capability-based access control, the capability spaces of all tasks form a set of tree structures, and at the same time each capability node contains nested complex data structures, plus the widespread operations in capability functions including access, modification, and (recursive) deletion to capability space, make the formal verification of capability-based access control more difficult compared to other OS modules. In this paper, based on concurrent separation logic with refinement CSL-R, we have verified the functional correctness of capability-based access control of an OS kernel in aerospace embedded field, by proving the refinement between capability API functions and their abstract specification. We first formally define the capability data structure, based on which we define the global capability invariant to keep the consistency of the capability spaces; then, we define the pre/post-conditions for internal functions and the abstract specification for API functions that reflect their functional correctness; and finally, we prove the refinement between the C implementation for API functions and their abstract specification. All the above definitions and verification are formalized in Coq theorem prover. During verification, we found errors for the C implementation, which have been confirmed and modified by the designer of the OS kernel.

    参考文献
    相似文献
    引证文献
引用本文

徐家乐,王淑灵,李黎明,詹博华,吕毅,代艺博,崔舍承,吴鹏,谭宇,张学军,詹乃军.操作系统内核权能访问控制的形式验证.软件学报,2025,36(8):0

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-08-26
  • 最后修改日期:2024-10-14
  • 录用日期:
  • 在线发布日期: 2024-12-10
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号