Safeguard
Application Security•

CWE-515 Covert Storage Channel: Data Hidden in Bits and Names

A covert storage channel passes information by setting bits one program writes and another reads. Examples, impact and the fix MITRE gives.

Safeguard Security Team
2 min read

CWE-515 is a covert storage channel: information moves through bits that one program sets and another reads. What separates it from normal operation is that the bits carry encoded information.

How it happens

MITRE says these channels occur when out-of-band data is stored in messages for the purpose of memory reuse. Covert channels are usually classed as storage or timing channels. A file meant to hold only audit information that is used to carry passwords is one example, using the file name or status bits that all users can read. Steganography, hiding a message so only the recipient knows it exists, is another.

Sloppy messages cause an accidental version. Reserved fields and padding sent with leftover data can reveal details about the process that sent them.

What an attacker gains

Per MITRE, a covert storage channel can give attackers important information about the system. Extra data in messages may tip off listeners about the process and hardware platform behind them.

How to fix it

MITRE's mitigation is to set all reserved fields to zero before messages are sent and to include no unnecessary information.

struct msg m;
memset(&m, 0, sizeof m);   /* clears reserved fields and padding */
m.type = MSG_PING;
send(sock, &m, sizeof m, 0);

Quick check

What simple coding habit reduces accidental covert storage channels?

Zero reserved fields and send only the data the message needs.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.