thom311 / libnl

Netlink Library Suite
GNU Lesser General Public License v2.1
419 stars 311 forks source link

InvalidFree and InvalidRead in Valgrind when linked against libnl #358

Closed Cach30verfl0w closed 1 year ago

Cach30verfl0w commented 1 year ago

While testing our new networking implementation, which is based on libnl on Linux, i discovered that there seems to be an invalid free and an invalid read somewhere in libnl. I didn't debug it any further yet because libnl is quite large but i figured the stack traces from Valgrind would be pretty helpful for now. Built with GCC 11.4 on Linux x86_64. Tested with and without sanitizers, as well as release- and debug-builds, all yielding the same result(s). 1 2

KitsuneAlex commented 1 year ago

Can reproduce and confirm that there's something weird going on here.

thom311 commented 1 year ago

which version are you using?

the backtrace in the screenshot doesn't have all debug symbols enabled. It's not sufficent to understand (or reproduce) the problem. A reproducer would be good. git-bisect could find whether this was broken recently.

Cach30verfl0w commented 1 year ago

After some further debugging i found the issue in our codebase, sorry for any inconveniences.