Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

The bug a security tool must never have

说明与用途

mcp-pin 中的并发错误导致在同时进行 pinning 时丢失批准,允许工具被悄悄更改。修复包括原子写入、日志锁定和更严格的状态检查。

问题

mcp-pin reported success for 100 concurrent pinning operations while only 12 pins were actually persisted, causing lost approvals and silent acceptance of changed tools.

结果

The bug caused silent loss of approvals, enabling undetected tool changes. The fix introduced per-server files, atomic writes, log locking, comprehensive error handling, and client request queuing, eliminating lost updates and ensuring reliable pinning.

工作流

  • Run 100 concurrent pinning requests to different servers
  • Each process reads pins.json, adds its entry, writes back
  • All processes report success
  • Only 12 pins persist, log hash chain breaks

证据

I ran one hundred pins at the same time, for one hundred different servers. Every single one reported success.

来源

pins.json had 12 keys.

来源

The log takes a lock. Appending to the log means taking an exclusive lock, reading the tail, appending, fsyncing, and unlocking.

来源

The record comes first. The first pin used to write the pin file and then the log entry. If the append failed, you had a trusted pin with no public record of it.

来源

  • 记录日期: 2026-10-05T18:41:13.427Z