Skip to content

Conversation

@kjdyck
Copy link
Contributor

@kjdyck kjdyck commented Sep 28, 2022

This PR fixes a few memory issues:

  1. Downcast to unrelated type in lib/ofx_container_account.cpp
  2. Use after free in lib/ofx_container_main.cpp
  3. Heap buffer overflow in lib/ofx_preproc.cpp

Test cases that exercise each are included.

@@ -0,0 +1,7 @@
<OFC>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity: Do those test files actually cause a failed "make check" (autotools) or "make test" (cmake) if the source code fix isn't applied? Because when I quickly checked that, the simple test case refuses to load those files with "unknown format" error and hence doesn't really run into the memory error. Would this need some different calling arguments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They admittedly aren't that great as test cases. I you have compile libofx with -fsanitize=address, running ofxdump on the test cases will result in memory errors being reported. But even then, the test harness considers that a 'failure' same as a format error.

@cstim cstim merged commit d937882 into libofx:master Sep 28, 2022
@kjdyck kjdyck deleted the fix-everything branch September 28, 2022 22:04
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.

2 participants