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
Fix stack buffer overflows reported in gentoo bug 543310 #2
Closed
zmedico
wants to merge
3
commits into
rafaelmartins:master
from
zmedico:bug_543310_stack_buffer_overflows
Closed
Fix stack buffer overflows reported in gentoo bug 543310 #2
zmedico
wants to merge
3
commits into
rafaelmartins:master
from
zmedico:bug_543310_stack_buffer_overflows
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zmedico
added a commit
to zmedico/gentoo
that referenced
this pull request
Oct 27, 2019
Fix stack buffer overflows reported in bug 543310. Bug: https://bugs.gentoo.org/543310 See: rafaelmartins/diffball#2 Reported-by: Aidan Thornton <makosoft@googlemail.com> Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org>
zmedico
added a commit
to zmedico/gentoo
that referenced
this pull request
Oct 27, 2019
Fix stack buffer overflows reported in bug 543310. Bug: https://bugs.gentoo.org/543310 See: rafaelmartins/diffball#2 Reported-by: Aidan Thornton <makosoft@googlemail.com> Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org>
The int_size must be in the range 1 to 4 in order to avoid BUFF_SIZE overflow or a negative left shift. Bug: https://bugs.gentoo.org/543310 Reported-by: Aidan Thornton <makosoft@googlemail.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
The buff_size must be at least 13 in order to accomodate cread and readUBytesBE calls relative to buff + 1 with ob = 8 and lb = 4. Bug: https://bugs.gentoo.org/543310 Reported-by: Aidan Thornton <makosoft@googlemail.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Since buff points to a 32-byte stack buffer, count must not exceed 31. Bug: https://bugs.gentoo.org/543310 Reported-by: Aidan Thornton <makosoft@googlemail.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
zmedico
added a commit
to zmedico/gentoo
that referenced
this pull request
Oct 27, 2019
Fix stack buffer overflows reported in bug 543310. Bug: https://bugs.gentoo.org/543310 See: rafaelmartins/diffball#2 Reported-by: Aidan Thornton <makosoft@googlemail.com> Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Moved to zmedico/diffball#1. |
zmedico
added a commit
to zmedico/gentoo
that referenced
this pull request
Oct 27, 2019
Fix stack buffer overflows reported in bug 543310. Bug: https://bugs.gentoo.org/543310 See: rafaelmartins/diffball#2 Reported-by: Aidan Thornton <makosoft@googlemail.com> Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org>
zmedico
added a commit
to zmedico/gentoo
that referenced
this pull request
Oct 27, 2019
Fix stack buffer overflows reported in bug 543310. Bug: https://bugs.gentoo.org/543310 See: rafaelmartins/diffball#2 Reported-by: Aidan Thornton <makosoft@googlemail.com> Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug: https://bugs.gentoo.org/543310
Reported-by: Aidan Thornton makosoft@googlemail.com
Signed-off-by: Zac Medico zmedico@gentoo.org
Zac Medico (3):
bdeltaReconstructDCBuff: validate int_size
gdiffReconstructDCBuff: increase buff_size from 5 to 13
readXDInt: limit count to 31
libdiffball/bdelta.c | 2 ++
libdiffball/gdiff.c | 2 +-
libdiffball/xdelta1.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)