CaringCaribou / caringcaribou

A friendly car security exploration tool for the CAN bus
GNU General Public License v3.0
751 stars 197 forks source link

Padding Support for UDS and UDS_Fuzz modules #87

Closed Cr0wTom closed 1 year ago

Cr0wTom commented 1 year ago

Adding support for different (or no) padding to UDS and UDS_Fuzz modules with changes to the iso15765 library.

kasperkarlsson commented 1 year ago

This PR seems to break the separation of ISO 14229 protocol implementation and the modules using this protocol. Re-implementing every needed service of the protocol in each module (possibly even multiple times) may lead to differing implementations and thus inconsistency, as well as harder-to-read code.

If the goal is to make optional padding of SF messages or the last CF frame in multi-frame messages in the transport layer possible, this should rather be added on the transport level (ISO-15765-2 / ISO-TP) and utilized as the user the desires by the ISO 14229 protocol. I do not have the specifics of this implementation in my mind right now (and limited time to put into this during the next days), but I am of course open to a discussion regarding pros and cons of different approaches 🙂

kasperkarlsson commented 1 year ago

Time for a small update!

I like your idea, and I have attempted to implement a clean method of optional, caller-controlled padding for ISO-TP (which you can see in its current state in #91). I also plan to expose this (as described in my previous comment) via the UDS and UDS Fuzz modules as a next step.

This is just to let you know that I aim to get your feature idea up and running, even if it will be through a separate PR 🙂

kasperkarlsson commented 1 year ago

Hi there,

Are all new commits part of the PR, or is this PR your new main branch?

Cr0wTom commented 1 year ago

Sorry for this, personal branch :)

kasperkarlsson commented 1 year ago

No worries! Keep on hacking 🤘