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

Fix stack buffer overflows reported in gentoo bug 543310 #2

Closed
wants to merge 3 commits into from
Closed

Fix stack buffer overflows reported in gentoo bug 543310 #2

wants to merge 3 commits into from

Conversation

zmedico
Copy link

@zmedico zmedico commented Oct 27, 2019

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(-)

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>
@zmedico
Copy link
Author

zmedico commented Oct 27, 2019

Moved to zmedico/diffball#1.

@zmedico zmedico closed this Oct 27, 2019
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant