Skip to content

Out-of-bounds Read in Crypto_AOS_ProcessSecurity

High
Donnie-Ice published GHSA-7ch6-2pmg-m853 Jan 9, 2026

Package

CryptoLib

Affected versions

<= v1.4.2

Patched versions

v1.4.3

Description

Vulnerability Type

Out-of-Bounds Read

Location

src/core/crypto_aos.c

Description

The Crypto_AOS_ProcessSecurity function reads memory without valid bounds checking when parsing AOS frame hashes.

Proof of Concept (PoC) and Verification

The frame length was set to the minimum (6 bytes), and the function's internal logic was induced to read beyond that (7th, 8th bytes).

PoC Code (Core Logic)

// Frame with only 6 bytes allocated
uint16_t len_ingest = 6;
uint8_t *p_ingest = (uint8_t*)malloc(len_ingest);

// Logic attempts to read SPI (2 bytes) past the header (6)
// Accesses p_ingest[6], p_ingest[7] when byte_idx = 6
uint8_t spi_msb = p_ingest[byte_idx]; // OOB access

Verification Results (ASAN Log)

[*] Starting AOS OOB Read PoC
[*] len_ingest: 6, byte_idx: 6
[!] Attempting to read SPI at index 6 and 7
==3663==ERROR: AddressSanitizer: heap-buffer-overflow on address ...
READ of size 1 at 0x602000000016 thread T0
...
==3663==ABORTING

ASAN detected the attempt to read memory outside the allocated region and aborted the process.

Severity

High

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
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
High

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:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H

CVE ID

CVE-2026-21898

Weaknesses

Out-of-bounds Read

The product reads data past the end, or before the beginning, of the intended buffer. Learn more on MITRE.

Credits