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

Use dynamic instead of fixed buffers #199

Merged
merged 1 commit into from
Jan 12, 2018
Merged

Use dynamic instead of fixed buffers #199

merged 1 commit into from
Jan 12, 2018

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jan 12, 2018

By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


This is a security fix, cherry-picking 19c54b0 from branch new/API. Originally I thought this could go to development much earlier, but now the new/API branch is still in progress.

Short summary of what this PR achieves: We currently use fixed buffers of length 1024 in the request.c results. It may happen that unexceptionally long result lines /which are not expected to happen, but may appear when e.g. the DNS resolver is malfunctioning (there are always many ways things can go wrong). So, theoretically, the present code can corrupt the stack frame and trigger the Stack Smashing Protector (SSP) I added to FTL several months ago.
This PR changes the behavior drastically in removing all fixed buffers and using only dynamic buffers everywhere.

This may fix #198 but further details are still needed there.

This template was created based on the work of udemy-dl.

…ment removes the fixed buffer we used before and allows for responses having arbitraty lengths

Signed-off-by: DL6ER <dl6er@dl6er.de>

Conflicts:
	request.c
	routines.h
Copy link
Contributor

@AzureMarker AzureMarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, as in, it looks good, works on new/API, and I can't wait to see the merge conflicts 😨

@DL6ER DL6ER merged commit cdf71ec into development Jan 12, 2018
@DL6ER DL6ER deleted the new/ssend branch January 12, 2018 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants