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

The bug a security tool must never have

Описание и применение

Ошибка в mcp-pin приводила к потере подтверждений при одновременных операциях, что позволяло незаметно менять инструменты. Исправления включают атомарные записи, блокировку лога и строгую проверку состояния.

Задача

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