CVE-2026-42485

Stack Buffer Overflow in AGL agl-service-can-low-level UDS Library Enables Remote Code Execution on 32-bit Automotive ECUs

Published May 1, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
AGL agl-service-can-low-level contains a stack buffer overflow in the uds-c library. The send_diagnostic_request function in uds.c allocates a 6-byte stack buffer (MAX_DIAGNOSTIC_PAYLOAD_SIZE=6) but copies up to 7 bytes (MAX_UDS_REQUEST_PAYLOAD_LENGTH=7) via memcpy at an offset of 1+pid_length (2-3 bytes), resulting in 1-4 bytes of controlled stack overflow. The payload_length field (uint8_t) has no bounds check against the destination buffer. On 32-bit ARM automotive ECUs without stack canaries, this can lead to return address overwrite and RCE.

Analysis

AI-generated

Technical impact

The vulnerability is a stack buffer overflow in the uds-c library used by AGL agl-service-can-low-level. During a diagnostic request, the send_diagnostic_request function allocates a 6‑byte stack buffer but copies up to seven bytes without verifying the destination size, allowing 1–4 bytes to overflow into the stack. The unchecked payload_length field permits an attacker to control the overflow. On 32‑bit ARM automotive ECUs that have no stack canaries, the overflow can overwrite a return address and execute arbitrary code. The impact is a remote code execution capability on the affected ECU.

Affected Systems

The flaw resides in the AGL agl-service-can-low-level component of Automotive Grade Linux. No specific product version information is provided; however, any installation of AGL that includes the uds-c library without the bounds check is susceptible. The issue affects 32‑bit ARM automotive ECUs running the AGL stack.

Risk and Exploitability

Because the vulnerability requires a crafted CAN diagnostic message, the likely attack vector is through the CAN bus interface, which typically requires local or proximate access to the vehicle network. The EPSS score is not available and the vulnerability is not listed in CISA’s KEV catalog, but the CVSS score of 7.5 and the ability to overwrite a return address imply high severity. If an attacker can send a malicious message, the overflow can lead to full control of the ECU’s firmware, enabling the execution of arbitrary code and disabling or modifying vehicle functions.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply any AGL or firmware update that addresses the uds-c overflow
  • If no update is available, rebuild the affected component with stack protection and an address space layout randomizer to harden the stack
  • Modify the uds-c implementation to enforce an upper bound on payload_length before copying, rejecting any oversized requests
  • Consider disabling the UDS diagnostic service or isolating it in a restricted environment if the functionality is not required

Generated by OpenCVE AI on May 2, 2026 at 07:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Automotivelinux
Automotivelinux agl-service-can-low-level
Vendors & Products Automotivelinux
Automotivelinux agl-service-can-low-level
Type Values Removed Values Added
Title Stack Buffer Overflow in AGL agl-service-can-low-level UDS Library Enables Remote Code Execution on 32-bit Automotive ECUs
Type Values Removed Values Added
Weaknesses CWE-121
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description AGL agl-service-can-low-level contains a stack buffer overflow in the uds-c library. The send_diagnostic_request function in uds.c allocates a 6-byte stack buffer (MAX_DIAGNOSTIC_PAYLOAD_SIZE=6) but copies up to 7 bytes (MAX_UDS_REQUEST_PAYLOAD_LENGTH=7) via memcpy at an offset of 1+pid_length (2-3 bytes), resulting in 1-4 bytes of controlled stack overflow. The payload_length field (uint8_t) has no bounds check against the destination buffer. On 32-bit ARM automotive ECUs without stack canaries, this can lead to return address overwrite and RCE.
References
Weaknesses
  • CWE-121

    Stack-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
May 1, 2026, 6:40 PM
Reserved
Apr 27, 2026, 12:00 AM
Status
Deferred
Published
May 1, 2026, 5:16 PM
Modified
Jun 17, 2026, 10:47 AM