AI News 10月07日
AI自动修复代码漏洞,CodeMender已提交72项安全修复
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

Google DeepMind推出名为CodeMender的AI代理,能够自主发现并修复软件代码中的关键安全漏洞。在过去六个月中,CodeMender已成功为开源项目贡献了72项安全修复。该系统利用Gemini Deep Think模型,通过先进的程序分析和多代理架构,不仅能即时修补新发现的漏洞,还能主动重写代码以消除潜在的安全隐患,从而减轻开发者的负担,提高软件安全性。

🤖 **CodeMender的自主性与效率**:CodeMender是一款由Google DeepMind开发的AI代理,其核心能力在于能够自主地检测并修复软件代码中的安全漏洞。在短短六个月内,它已成功为多个知名的开源项目贡献了72项重要的安全修复。这种自动化修复能力极大地提高了安全漏洞响应的速度和效率,减轻了人工审查和修复的巨大压力。

🧠 **先进技术与多代理协作**:CodeMender的强大能力源于其对Google先进的Gemini Deep Think模型的运用,使其能够进行复杂的代码分析和推理。系统采用了多代理架构,不同的代理专注于代码的特定方面,如代码审查和验证。此外,它还集成了静态分析、动态分析、模糊测试和SMT求解器等多种先进工具,以深入挖掘代码中的安全隐患和架构弱点。

🛡️ **主动防御与代码加固**:除了被动地修复已发现的漏洞,CodeMender还具备主动防御能力。它可以识别潜在的安全风险并主动重写代码,以消除整个类别的安全漏洞,从而在漏洞被利用之前就进行预防。例如,它能为libwebp库添加-fbounds-safety注解,以防止缓冲区溢出等严重漏洞的发生,显著提升了软件的整体安全性。

✅ **严格的验证与人工审核**:尽管CodeMender自动化程度很高,但其输出的每一个补丁都经过严格的验证流程,确保其正确性、功能完整性,并且不引入新的问题(回归)。最终,所有高质量的补丁在提交给开源项目之前,都会经过人工研究人员的审核,确保最高级别的安全性和可靠性。

Google DeepMind has deployed a new AI agent designed to autonomously find and fix critical security vulnerabilities in software code. The system, aptly-named CodeMender, has already contributed 72 security fixes to established open-source projects in the last six months.

Identifying and patching vulnerabilities is a notoriously difficult and time-consuming process, even with the aid of traditional automated methods like fuzzing. Google DeepMind’s own research, including AI-based projects such as Big Sleep and OSS-Fuzz, has proven effective at discovering new zero-day vulnerabilities in well-audited code. This success, however, creates a new bottleneck: as AI accelerates the discovery of flaws, the burden on human developers to fix them intensifies.

CodeMender is engineered to address this imbalance. It functions as an autonomous AI agent that takes a comprehensive approach to fix code security. Its capabilities are both reactive, allowing it to patch newly discovered vulnerabilities instantly, and proactive, enabling it to rewrite existing code to eliminate entire classes of security flaws before they can be exploited. This allows human developers and project maintainers to dedicate more of their time to building features and improving software functionality.

The system operates by leveraging the advanced reasoning capabilities of Google’s recent Gemini Deep Think models. This foundation allows the agent to debug and resolve complex security issues with a high degree of autonomy. To achieve this, the system is equipped with a set of tools that permit it to analyse and reason about code before implementing any changes. CodeMender also includes a validation process to ensure any modifications are correct and do not introduce new problems, known as regressions.

While large language models are advancing rapidly, a mistake when it comes to code security can have costly consequences. CodeMender’s automatic validation framework is therefore essential. It systematically checks that any proposed changes fix the root cause of an issue, are functionally correct, do not break existing tests, and adhere to the project’s coding style guidelines. Only high-quality patches that satisfy these stringent criteria are surfaced for human review.

To enhance its code fixing effectiveness, the DeepMind team developed new techniques for the AI agent. CodeMender employs advanced program analysis, utilising a suite of tools including static and dynamic analysis, differential testing, fuzzing, and SMT solvers. These instruments allow it to systematically scrutinise code patterns, control flow, and data flow to identify the fundamental causes of security flaws and architectural weaknesses.

The system also uses a multi-agent architecture, where specialised agents are deployed to tackle specific aspects of a problem. For example, a dedicated large language model-based critique tool reveals the differences between original and modified code. This allows the primary agent to verify that its proposed changes do not introduce unintended side effects and to self-correct its approach when necessary.

In one practical example, CodeMender addressed a vulnerability where a crash report indicated a heap buffer overflow. Although the final patch only required changing a few lines of code, the root cause was not immediately obvious. By using a debugger and code search tools, the agent determined the true problem was an incorrect stack management issue with Extensible Markup Language (XML) elements during parsing, located elsewhere in the codebase. In another case, the agent devised a non-trivial patch for a complex object lifetime issue, modifying a custom system for generating C code within the target project.

Beyond simply reacting to existing bugs, CodeMender is designed to proactively harden software against future threats. The team deployed the agent to apply -fbounds-safety annotations to parts of libwebp, a widely used image compression library. These annotations instruct the compiler to add bounds checks to the code, which can prevent an attacker from exploiting a buffer overflow to execute arbitrary code.

This work is particularly relevant given that a heap buffer overflow vulnerability in libwebp, tracked as CVE-2023-4863, was used by a threat actor in a zero-click iOS exploit several years ago. DeepMind notes that with these annotations in place, that specific vulnerability, along with most other buffer overflows in the annotated sections, would have been rendered unexploitable.

The AI agent’s proactive code fixing involves a sophisticated decision-making process. When applying annotations, it can automatically correct new compilation errors and test failures that arise from its own changes. If its validation tools detect that a modification has broken functionality, the agent self-corrects based on the feedback and attempts a different solution.

Despite these promising early results, Google DeepMind is taking a cautious and deliberate approach to deployment, with a strong focus on reliability. At present, every patch generated by CodeMender is reviewed by human researchers before being submitted to an open-source project. The team is gradually increasing its submissions to ensure high quality and to systematically incorporate feedback from the open-source community.

Looking ahead, the researchers plan to reach out to maintainers of critical open-source projects with CodeMender-generated patches. By iterating on community feedback, they hope to eventually release CodeMender as a publicly available tool for all software developers.

The DeepMind team also intends to publish technical papers and reports in the coming months to share their techniques and results. This work represents the first steps in exploring the potential of AI agents to proactively fix code and fundamentally enhance software security for everyone.

See also: CAMIA privacy attack reveals what AI models memorise

Want to learn more about AI and big data from industry leaders? Check out AI & Big Data Expo taking place in Amsterdam, California, and London. The comprehensive event is part of TechEx and is co-located with other leading technology events including the Cyber Security Expo, click here for more information.

AI News is powered by TechForge Media. Explore other upcoming enterprise technology events and webinars here.

The post Google’s new AI agent rewrites code to automate vulnerability fixes appeared first on AI News.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

CodeMender AI 代码安全 漏洞修复 Google DeepMind 开源安全 CodeMender AI Code Security Vulnerability Fixing Google DeepMind Open Source Security
相关文章