-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link-layer validations #11
Comments
Cf. comments on commit 470c196, including the following pathological case of overlapping frames:
|
It turns out AN2013-004b almost clears the above up. It states that "discarded" (i.e. invalid) data should be consumed. Unfortunately it says not how much data that is.
|
Open question: In secondary frames, FCB should be 0 - is a secondary frame with FCB=1 invalid or is the bit ignored? |
Some sections of the spec:
To me all of this means that FCB should be zero UNLESS it is PRI_TO_SEC function w/ FCV=1, in which case it could be 0 or 1. |
I agree, it should be 0. But I'm not sure that PRM=0,FCB=1 should be discarded. For instance, the table in AN2013-004b that I'm looking at (page 5) does not list it. |
Apart from the above, 5e2cf2b implements the validations and adds an |
Cool. I'll try this out in the proxy later this afternoon. AN2013-004b isn't normative. It was a reaction to the 30 or so ICS-CERT advisories that we reported. I'm sure that it has inconsistencies or there are nuances it fails to capture. In the grand scheme of things, how aggressively the proxy validates the FCB bit is fairly immaterial. It's unlikely to trigger any bugs in real word implementations, as they too will simply ignore the bit if it isn't relevant. |
Adam Crain [email protected] writes:
Oh? I thought it was. At least in the sense that it clears up things Anyway...
That's what I think as well. So I'd say let the parser ignore the bit |
Opening a proper issue to track this topic.
The main issue is that the link layer must consume invalid data so it can continue. Therefore, unlike the transport and application layer parsers,
dnp3_p_link_frame
always yields aDNP3_Frame
structure if start bytes and header crc are valid.A separate function
dnp3_link_validate_frame
is exported and used by thednp3_dissector
to determine whether to process or ignore the frame.The text was updated successfully, but these errors were encountered: