AGL agl-service-can-low-level Stack Buffer Overflow Vulnerability in uds-c Library

Vulnerability

A stack buffer overflow vulnerability has been identified in the AGL agl-service-can-low-level component, specifically within the uds-c library. The issue arises in the send_diagnostic_request function, which allocates a 6-byte stack buffer but inadvertently allows the copying of up to 7 bytes via memcpy. This overflow occurs at an offset determined by the payload's PID length, leading to a controlled stack overflow of 1 to 4 bytes. The vulnerability is present in AGL versions through 17.1.12.

Impact

Exploitation of this vulnerability can overwrite the return address on 32-bit ARM automotive ECUs that lack stack canaries, potentially leading to remote code execution.

Reproduction

The vulnerability can be reproduced by sending a UDS request payload that exceeds 6 bytes, with the excess data offset by the PID length. This can be done through the AGL CAN service API, which will trigger the buffer overflow in the uds-c library.

Added: May 1, 2026, 5:33 PM
Updated: May 1, 2026, 5:33 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
6.0
remediation
0.0
relevance
7.2
threat
1.6
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.