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

an heapoverflow bug which could lead to execute code in libbpg #2

Open
ghost opened this issue Jun 15, 2018 · 0 comments
Open

an heapoverflow bug which could lead to execute code in libbpg #2

ghost opened this issue Jun 15, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 15, 2018

an heapoverflow bug which could lead to execute code in libbpg
interger overflow at hevc_filter.c:225

uint8_t *src = src1 + (((y - y0) << s->sps->log2_min_pu_size) >> vshift) * stride_src + ((((x - x0) << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift);

after adding a negative number the src will be somewhere before the mmaped area, therefore we can write anything before the mmaped area, there are libc before it, so if we can designed the added value, we can gain a code execution.

summary:

interger overflow at the function restore_tqb_pixels of hevc_filter.c

execute method:

./bpgdec poc -o /dev/null

asan
https://drive.google.com/open?id=1J3hTt8XHz7u7QDSNYxEuwFZTO6Baggl0

poc
https://drive.google.com/open?id=1bBD0fwywFycp3BbvA0XjcKw4P5pjdd23

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

No branches or pull requests

0 participants