HardSecBench: 하드웨어 코드 생성에 사용되는 LLM의 보안 인식 벤치마킹
HardSecBench: Benchmarking the Security Awareness of LLMs for Hardware Code Generation
대규모 언어 모델(LLM)은 코드 생성을 위해 실제 하드웨어 및 펌웨어 개발 프로세스에 점점 더 많이 통합되고 있습니다. 기존 연구는 주로 LLM이 생성한 코드의 기능적 정확성을 평가하는 데 중점을 두었지만, 보안 문제에는 상대적으로 덜 주의를 기울였습니다. 그러나 기능적으로는 문제가 없어 보이는 LLM이 생성한 코드에 보안 취약점이 포함되어 있을 수 있으며, 배포 후 심각한 피해를 초래할 수 있습니다. 이러한 중요한 연구 격차를 해결하기 위해, 우리는 실제 사양을 기반으로 보안 인식을 평가하기 위한 벤치마크를 설계했습니다. 본 연구에서는 924개의 작업으로 구성된 벤치마크인 HardSecBench를 소개합니다. HardSecBench는 Verilog Register Transfer Level (RTL) 및 펌웨어 수준의 C 코드를 다루며, 하드웨어와 관련된 76개의 Common Weakness Enumeration (CWE) 항목을 포함합니다. 각 작업은 구조화된 사양, 안전한 참조 구현, 그리고 실행 가능한 테스트를 포함합니다. 아티팩트 생성을 자동화하기 위해, 우리는 검증과 분리되고 실행 결과를 기반으로 평가를 수행하는 멀티 에이전트 파이프라인을 제안합니다. HardSecBench를 사용하여 다양한 LLM을 하드웨어 및 펌웨어 코드 생성에 적용한 결과, 모델이 기능적 요구 사항을 충족하는 동시에 여전히 보안 위험을 초래하는 경우가 많다는 것을 확인했습니다. 또한, 보안 결과가 프롬프트에 따라 달라지는 것을 발견했습니다. 이러한 결과는 LLM 지원 하드웨어 설계의 미래 발전을 위한 시급한 과제를 강조하며, 실질적인 통찰력을 제공합니다. 저희의 데이터 및 코드는 곧 공개될 예정입니다.
Large language models (LLMs) are being increasingly integrated into practical hardware and firmware development pipelines for code generation. Existing studies have primarily focused on evaluating the functional correctness of LLM-generated code, yet paid limited attention to its security issues. However, LLM-generated code that appears functionally sound may embed security flaws which could induce catastrophic damages after deployment. This critical research gap motivates us to design a benchmark for assessing security awareness under realistic specifications. In this work, we introduce HardSecBench, a benchmark with 924 tasks spanning Verilog Register Transfer Level (RTL) and firmware-level C, covering 76 hardware-relevant Common Weakness Enumeration (CWE) entries. Each task includes a structured specification, a secure reference implementation, and executable tests. To automate artifact synthesis, we propose a multi-agent pipeline that decouples synthesis from verification and grounds evaluation in execution evidence, enabling reliable evaluation. Using HardSecBench, we evaluate a range of LLMs on hardware and firmware code generation and find that models often satisfy functional requirements while still leaving security risks. We also find that security results vary with prompting. These findings highlight pressing challenges and offer actionable insights for future advancements in LLM-assisted hardware design. Our data and code will be released soon.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.