当前位置>主页 > 期刊在线 > 计算机技术 >

计算机技术22年12期

基于 Linux 的沙箱评测系统内核的设计与实现
王硕,郑晓东,张强
(齐齐哈尔大学 计算机与控制工程学院,黑龙江 齐齐哈尔 161006)

摘  要:为了避免执行安全性未知的用户代码对服务器造成不良影响,文章基于 Linux 操作系统内核提供的系统调用拦截机制,利用控制组、命名空间等技术实现了一种完全定制化的 Linux 沙箱评测系统内核,其可以阻断用户程序的恶意系统调用,控制程序的内存消耗、CPU 消耗、网络连接;同时为了适应当下互联网服务高并发的需求,该评测系统内核使用了改进后的管道并发模型和高效的评测任务调度策略,能充分利用服务器的硬件资源、准确地完成代码评测任务。


关键词:Linux 系统;沙箱评测系统内核;高并发



DOI:10.19850/j.cnki.2096-4706.2022.012.017


基金项目:2020 年度黑龙江省省属高等学校基本科研业务费青年创新人才项目(135509210)


中图分类号:TP311                                        文献标识码:A                                文章编号:2096-4706(2022)12-0067-04


Design and Implementation of Sandbox Judge System Kernel Based on Linux

WANG Shuo, ZHENG Xiaodong, ZHANG Qiang

(College of Computer and Control Engineering, Qiqihar University, Qiqihar 161006, China)

Abstract: In order to avoid causing adverse effects on the server by executing user code of unknown security, based on the system call interception mechanism provided by Linux operating system kernel, this paper implements a completely customized Linux sandbox judge system kernel by using control groups and namespaces and other technologies. It can block the malicious system calls from user programs, control the memory consumption, CPU consumption and network connections of program. At the same time, in order to meet the high concurrency requirements of current Internet services, the judge system kernel uses an improved pipeline concurrency model and efficient judge task scheduling strategy and it can make full use of the server’s hardware resources and complete the code judge task accurately.

Keywords: Linux system; sandbox judge system kernel; high concurrency


参考文献:

[1] 沈济南,胡俊鹏,梁芳,等 . 基于 API Hook 的进程行为监控系统 [J]. 云南大学学报(自然科学版),2018,40(3):466-473.

[2] 崔滔.沙箱与容器的区别 [J].计算机与网络,2021,47(10):40-41.

[3] 邢云龙,严飞,刘彦孝,等 . 基于系统调用限制的容器安全防护方案 [J]. 武汉大学学报(理学版),2022,68(1):35-43.

[4] 吕鹏,戴冠中 .Linux 下 Ptrace() 调用的安全分析 [J]. 计算机应用研究,2005(8):102-104.

[5] 郭建伟 . 巧设“监牢”保护 Linux 服务安全 [J]. 网络安全和信息化,2020(10):134-136.

[6] WAN Z Y,LO D,XIA X,et al. Practical and effective sandboxing for Linux containers [J].Empirical Software Engineering,2019,24(6):4034-4070.

[7] 李植,陈莉君 . 一种适于 Docker 容器资源控制的分类预测方法 [J]. 计算机与数字工程,2019,47(12):3063-3068.

[8] 王明 . 利用容器虚拟化技术实现 Linux 版本管理的关键技术研究 [D]. 武汉:湖北大学,2020.


作者简介:王硕(1993—),男,汉族,黑龙江齐齐哈尔人,助理实验师,硕士,研究方向:计算机应用;肖磊(2000—),男,汉族,广东汕头人,本科在读,研究方向:计算机应用。