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

Buffer overflow in borg-reducer #4

Closed
prodigysml opened this issue Mar 4, 2018 · 1 comment

Comments

@prodigysml
Copy link

commented Mar 4, 2018

A buffer overflow scenario can be created within borg-reducer. The dir and filepath variables within borg-reducer.h's write_report function is vulnerable to this attack.

The output variable is set without any bounds at:
https://github.com/archivesunleashed/borg-reducer/blob/c6d5240e37f5aa08ab49fca519cfd72098da10fb/borg-reducer.c#L80

This is then later used in the write_report function:
https://github.com/archivesunleashed/borg-reducer/blob/c6d5240e37f5aa08ab49fca519cfd72098da10fb/Include/borg-reducer.h#L58

Both of the above-mentioned variables are of size 150. If we make output have a length > 300, a buffer overflow scenario will be produced and cause a crash.

@greebie

This comment has been minimized.

Copy link
Collaborator

commented Mar 4, 2018

Thanks for the help! Will work that out this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.