Skip to content
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

Wrong IDi key and length reported #88

Open
bramton opened this issue Oct 8, 2022 · 1 comment
Open

Wrong IDi key and length reported #88

bramton opened this issue Oct 8, 2022 · 1 comment
Labels
bug Something isn't working easy fix

Comments

@bramton
Copy link

bramton commented Oct 8, 2022

I think there might be a bug in the parsing of the Identification payload. Here is my investigation:

From the logs:

ikev2_msg_decrypt: decrypted payload length 1644/1644 padding 0
2500000c 0b000000 6272616d 2600042a 04308204 21308202 ... etc

The relevant IDi payload has been summarised below:

2500000c # 25 = next payload (cert), 00 = reserved, 00 0c = length in octets (12 in this case)
0b000000 # 0b = ID_KEY_ID type, 00 00 00 = reserved
6272616d # bram in ASCII (data of the payload)

Furthermore, from the logs:

ikev2_pld_payloads: decrypted payload IDi nextpayload CERT critical 0x00 length 12
ikev2_pld_id: id KEY_ID/6766d length 8

What I would have expected:

ikev2_pld_id: id KEY_ID/6272616d length 4
@tobhe tobhe added the bug Something isn't working label Oct 9, 2022
@tobhe
Copy link
Member

tobhe commented Oct 10, 2022

Looking into the code this isn't really a serious bug. The printed length count includes the ID specific header part (0b000000 in this case). I suppose changing the code to print the actual ID value length still makes sense, the header has a fixed size anyway.

@tobhe tobhe added the easy fix label Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy fix
Projects
None yet
Development

No branches or pull requests

2 participants