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

Always check mdb_read_table() return value #377

Merged

Conversation

jwrdegoede
Copy link
Contributor

A couple of places were missing NULL return value checks for mdb_read_table()'s return value. Add these.

This fixes a NULL pointer deref while running ./test_script.sh on the test mdb file from oss-fuzz/35972 .

Note this does NOT fix the original problem reported in oss-fuzz/35972 which reports a "Dynamic-stack-buffer-overflow WRITE 16" issue, which I've been unable to reproduce.

Note the NULL pointer deref I saw is the one from src/libmdb/backend.c, but while at it I've audited the entire code base for similar cases.

A couple of places were missing NULL return value checks for
mdb_read_table()'s return value. Add these.

This fixes a NULL pointer deref while running ./test_script.sh
on the test mdb file from oss-fuzz/35972 .

Note this does NOT fix the original problem reported in oss-fuzz/35972
which reports a "Dynamic-stack-buffer-overflow WRITE 16" issue,
which I've been unable to reproduce.
@evanmiller
Copy link
Contributor

Thanks!

@evanmiller evanmiller merged commit ff08581 into mdbtools:dev Jan 25, 2022
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

2 participants