Skip to content

crypto: ATAES132A response length allows stack buffer overflow

Low
ceolin published GHSA-ff4p-3ggg-prp6 Mar 14, 2026

Package

zephyr (zephyr)

Affected versions

v4.3.x

Patched versions

None

Description

Summary

Malformed ATAES132A responses with an oversized length field overflow a 52-byte stack buffer in the Zephyr crypto driver, allowing a compromised device or bus attacker to corrupt kernel memory and potentially hijack execution

Details

  • ataes132a_send_command reads a device response and copies count - 3 bytes into a caller buffer without bounding the copy (drivers/crypto/crypto_ataes132a.c:140-166).
  • During CCM decrypt, the destination is param_buffer[52] on the stack (drivers/crypto/crypto_ataes132a.c:208-357). A forged response with count up to 64 (max read) overflows param_buffer, overwriting adjacent stack data before returning to the caller.
  • Attackers controlling the ATAES132A device or the I²C bus can trigger the overflow by returning a valid-CRC packet with an inflated count, leading to kernel-level memory corruption.

PoC

ataes132a-response-overflow-poc.tar.gz

  1. Build and run the provided ASAN harness that includes the unmodified driver and stubs a malicious device response:
cd ataes132a-response-overflow-poc
make clean && make run
  1. The run prints ASAN output reporting a stack-buffer-overflow in ataes132a_send_command when copying the forged 64-byte response into the 52-byte buffer.

Impact

Type: stack-based buffer overflow (CWE-120).
Who is impacted: any Zephyr build using the ATAES132A crypto driver; a malicious or faulty ATAES132A device, or an attacker with I²C bus access, can corrupt kernel stack memory, causing DoS or potential code execution in kernel context.

Acknowledgments

Patches

main: #103163

For more information

If you have any questions or comments about this advisory:

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Physical
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:P/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

CVE ID

CVE-2026-0849

Weaknesses

Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer. Learn more on MITRE.

Credits