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

ipp: nameLength should be uint16, not int16 #350

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

codyprime
Copy link
Member

nameLength is used for slice allocation. If the value is unmarshaled
as a negative value, then a runtime error will occur:

runtime error: makeslice: len out of range

(this commit also includes some minor formatting cleanup)

How to Test

I have been unable to reproduce the incident I encountered again, but you can attempt scanning an IPP service found on Censys to verify there has not been a regression:
https://search.censys.io/search?resource=hosts&sort=RELEVANCE&per_page=25&virtual_hosts=EXCLUDE&q=services.service_name%3A+IPP

Notes & Caveats

Issue Tracking

nameLength is used for slice allocation.  If the value is unmarshaled
as a negative value, then a runtime error will occur:

   runtime error: makeslice: len out of range

(this commit also includes some minor formatting cleanup)
@elliotcubit
Copy link
Member

Looks good to me, formatting changes only whitespace and this should be unsigned

@codyprime codyprime merged commit 3fc8248 into zmap:master Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants