AGL agl-service-can-low-level thru 17.1.12 contains a stack buffer overflow in the uds-c library. The senddiagnosticrequest function in uds.c allocates a 6-byte stack buffer (MAXDIAGNOSTICPAYLOADSIZE=6) but copies up to 7 bytes (MAXUDSREQUESTPAYLOADLENGTH=7) via memcpy at an offset of 1+pidlength (2-3 bytes), resulting in 1-4 bytes of controlled stack overflow. The payloadlength field (uint8t) 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.
AGL agl-service-can-low-level thru 17.1.12 contains a heap buffer over-read in the isotp-c library. In isotpcontinuereceive (receive.c:87-89), the payloadlength for a Single Frame is extracted from a 4-bit nibble in the CAN frame data, yielding values 0-15. However, a standard CAN frame is only 8 bytes, with payload starting at data[1] (7 bytes available). When payloadlength exceeds the available data (e.g., nibble=15 but only 7 payload bytes exist), memcpy(message.payload, &data[1], payloadlength) reads up to 8 bytes past the end of the data buffer.