CMChengyan Ma

Chengyan Ma

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Chengyan Ma has a total of 38 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Corruption is Futile: Hardware-Assisted Multi-User Searchable Encryption

    by Feng Li, Chengyan Ma, Xiaoguo Li, Pengfei Wu, Lisha Yao, Jianting Ning, Guomin Yang, Jianfeng Ma, Robert H. Deng

  • Open Access

    Automated Repair of TEE Partitioning Issues via DSL-Guided and LLM-Assisted Patching

    by Chengyan Ma, Jieke Shi, Ruidong Han, Ye Liu, Feng Li, Yuqing Niu, David Lo

    Trusted Execution Environments (TEEs) provide hardware-based isolation to protect sensitive data and computations from potentially compromised operating systems (OS). However, TEE applications inevitably interact with the untrusted OS through SDK interfaces, and improper partitioning can introduce severe vulnerabilities such as data leakage and code injection. While prior work has proposed static analysis tools to detect such issues, automated repair remains largely unexplored. This problem is particularly challenging due to three TEE-specific factors: the lack of standardized secure development guidelines, the difficulty of extracting semantic information from low-level C code, and the absence of mature testing and validation methods. In this work, we present TEERepair, a framework for automatically repairing bad partitioning issues in TEE applications. Our approach tackles the above challenges by introducing a domain-specific language (DSL) to encode repair rules that express and capture common TEE security patterns, which are instantiated as patch templates with placeholders for context-specific variables. We then leverage large language models (LLMs) to reason about code semantics and synthesize context-aware patches, and further generate test clients to validate the repairs. We evaluate TEERepair on the TEE Partitioning Errors Benchmark (PartitioningE-Bench), achieving a significantly higher repair success rate of 87.6% compared to baselines. Furthermore, applying TEERepair to real-world TEE projects, we submitted 5 repair pull requests, 2 of which have been confirmed and merged by project maintainers.

  • Open Access

    PatchGPT: Multi-Agent Patch Backporting without Model Fine-Tuning

    by Ye Liu, Ruidong Han, Chengyan Ma, Yuqing Niu, David Lo

    Patch backporting is crucial and prevalent in the maintenance of modern open-source software such as Linux kernels and forked repositories. However, porting patches across program versions remains a challenging problem due to the complexity of synergizing diverse patches with divergent program versions. In this paper, we propose PatchGPT, an agentic patch backporting framework for fine-grained patch generation. PatchGPT encompasses three agents: Miner for decomposing a sequence of atomic change steps as the original patch plan, Adapter for adapting the patch plan, and Executor for executing the adapted patch plan according to predefined change semantics. We conduct experiments on the PPatHF’s benchmark containing 310 Vim-NeoVim patch pairs. The experiment results indicate that PatchGPT not only achieves a success rate of up to 50.96%, outperforming PPatHF by 8.71%, but also provides actionable insights into the reasoning process behind patch generation and adaptation.

  • Open Access

    Finding Missing Input Validation in TEEs via LLM-Assisted Symbolic Execution

    by Chengyan Ma, Jieke Shi, Ruidong Han, Ye Liu, Yuqing Niu, David Lo


  • Towards Secure Program Partitioning for Smart Contracts With LLM’s In-Context Learning

    by Ye Liu, Yuqing Niu, Chengyan Ma, Ruidong Han, Wei Ma, Yi Li, Debin Gao, David Lo

    Smart contracts are highly susceptible to manipulation attacks due to the leakage of sensitive information. Addressing manipulation vulnerabilities is particularly challenging because they stem from inherent data confidentiality issues rather than straightforward implementation bugs. To tackle this by preventing sensitive information leakage, we present PARTITIONGPT, the first LLM-driven approach that combines static analysis with the in-context learning capabilities of large language models (LLMs) to partition smart contracts into critical (privileged) and normal codebases, guided by a few annotated sensitive data variables. We evaluated PARTITIONGPT on 18 annotated smart contracts containing 99 sensitive functions. The results demonstrate that PARTITIONGPT successfully generates compilable, and verified partitions, achieving a precision of 80% while reducing more than 26% code compared to functionlevel partitioning approach. Furthermore, we evaluated PARTITIONGPT on nine real-world manipulation attacks that led to a total loss of 25 million dollars, PARTITIONGPT effectively prevents eight cases, highlighting its potential for broad applicability and the necessity for secure program partitioning during smart contract development to diminish manipulation vulnerabilities.


  • Automated TEE Adaptation With LLMs: Identifying, Transforming, and Porting Sensitive Functions in Programs

    by Ruidong Han, Zhou Yang, Chengyan Ma, Ye Liu, Yuqing Niu, Siqi Ma, Debin Gao, David Lo

    Trusted Execution Environments (TEEs) isolate a special space within a device’s memory that is not accessible to the normal world (also known as the untrusted environment), even when the device is compromised. Therefore, developers can utilize TEEs to provide robust security guarantees for their programs, protecting sensitive operations, such as encrypted data storage, fingerprint verification, and remote attestation, from software-based attacks. Despite the robust protections offered by TEEs, adapting existing programs to leverage such security guarantees is challenging, often requiring extensive domain knowledge and manual intervention, which makes TEEs less accessible to developers. This motivates us to design AUTOTEE, the first Large Language Model (LLM) enabled approach that can automatically identify, transform, and port functions containing sensitive operations into TEEs with minimal developer intervention. By manually reviewing 68 repositories, we constructed a benchmark dataset consisting of 385 sensitive functions eligible for transformation, on which AUTOTEE achieves a F1 score of 0.94 on Java and 0.87 on Python. AUTOTEE effectively transforms these sensitive functions into TEE-compatible versions, achieving success rates of 91.8% and 84.3% for Java and Python, respectively, when using GPT-4o.


  • DITING: A Static Analyzer for Identifying Bad Partitioning Issues in TEE Applications

    by Chengyan Ma, Ruidong Han, Jieke Shi, Ye Liu, Yuqing Niu, Di Lu, Chuang Tian, Jianfeng Ma, Debin Gao, David Lo

  • FC-TEE: Lightweight Trusted Execution Environment for Low-Cost UAV Flight Control Systems

    by Peixue Lu, Ning Xi, Chengyan Ma, Qin Wang, Di Lu, Chuang Tian, Jianfeng Ma

    Unmanned Aerial Vehicle (UAV) flight control systems are increasingly exposed to software-level security threats. However, existing Trusted Execution Environment (TEE) technologies that can effectively defend against software attacks are difficult to deploy on the low-cost UAVs due to: (1) the lack of onboard security hardware, (2) limited Memory Protection Unit (MPU) resources, and (3) strict real-time requirements. To address these issues, we design FC-TEE, a lightweight TEE framework tailored for low-cost UAV platforms, which integrates fine-grained memory isolation and a multi-level task scheduling strategy. By analyzing the flight control code and control principles, we provide three key attributes (task priority, maximum invocation frequency, and required argument types) of flight control tasks and classify these tasks into two categories (privileged tasks and common tasks) based on the attributes. Then, we run the privileged tasks in FC-TEE to achieve memory isolation from common tasks, protecting the privileged tasks from software attacks. Meanwhile, we design multi-level task scheduling based on the task priority and categories to ensure the real-time requirements of the flight control system. Compared with existing UAV protection solutions such as MINION and TrustZone-based RT-TEE, the average additional execution overhead introduced by FC-TEE only is 2.7%. We prototype FC-TEE on a real quadrotor platform and validate its effectiveness through task-level performance and security evaluations.


  • Open Access

    BiTDB: Constructing A Built-in TEE Secure Database for Embedded Systems

    by Chengyan Ma, Di Lu, Chaoyue Lv, Ning Xi, Xiaohong Jiang, Yulong Shen, Jiangfen Ma

    In this paper, we propose BiTDB, a built-in Trusted Execution Environment (TEE) database for embedded systems, to realize higher system availability while ensuring data confidentiality. With BiTDB, dilemmas the state-of-the-art research work on secure embedded databases has to face can be significantly reduced and eliminated, including (i) complicated research and realization on searchable encryption algorithms (SEA), (ii) limited support to all database operations, and (iii) almost none of specific design and optimizations toward build-in TEE embedded databases. Through BiTDB, all database operations can process plaintext in TEE instead of retrieving on ciphertext by developing complicated SEAs. To enable BiTDB to handle database files in Rich Execution Environmen (REE) as local ones, we extend the TEE OS with generic file I/O libraries. Then, we contribute three critical optimizations to significantly reduce redundant memory and file operations between TEE and REE, and BiTDB achieve better system performance and availability in embedded systems. Finally, we have implemented the prototype system based on OP-TEE and SQLite for several typical platforms, including virtualization and hardware environments. The TPC-H test shows BiTDB can achieve 85% (on average) of the original database performance while guaranteeing data confidentiality and integrity. Our project repository is at https://github.com/CharlieMCY/BiTDB .