-
-
Notifications
You must be signed in to change notification settings - Fork 958
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
Heap overflow leading to crash #6842
Comments
I don't know the details of how the canaries option works, I wonder if it just doesn't like the The xdg stuff itself looks fine to me.. https://github.com/OpenTTD/OpenTTD/blob/release/1.8/src/fileio.cpp#L1070-L1073 |
The xdgDataHome function had exactly this type of bug in 2013/2014: |
@bentley friendly poke; can you check if OpenBSD has the libxdg fix, that could potentially solve the crash? |
Thanks for the reminder. We have libxdg-basedir-1.2.0 already. |
This issue has been automatically marked as stale because it has not had any activity in the last two months. |
This crash is still present in 1.9.0-RC1. |
We cannot reproduce this, nor find any sign that any actual memory leakage occurs. I'm afraid the ball is now in your court to debug further - be it through valgrind or gdb |
I’ll see what I can figure out, although I freely admit my unfamiliarity with OpenTTD code. In the meantime, if you have the opportunity to install OpenBSD in a VM, the issue will be trivially reproducible: `sysctl vm.malloc_conf=S; pkg_add openttd; openttd`.
|
Okay, this is indeed the libxdg-basedir bug, which was not fixed in 1.2.0 (the latest release, nearly eight years ago). Sorry for taking your time on this. |
Thanks very much for confirming that. Presumably a bug report in libxdg-basedir is required? :) |
Minor update - seems the fix was only included as a debian patch, not actually upstream as we originally thought - https://sources.debian.org/patches/libxdg-basedir/1.2.0-2/ Hope that helps (Realistically we probably want to move away from this library given how unmaintained it is) |
OpenBSD’s malloc implementation has the ability to detect heap overflows. With the ‘Canaries’ option in malloc.conf, OpenTTD crashes:
The text was updated successfully, but these errors were encountered: