See this PR for more information.
This issue can be used to figure out a way out of this without breakage, while reducing risk of this UB to be exploited at some point.
What we did so far
How to fix Linux
This fix reduces chances of UB to zero and makes the Mutex unnecessary.
How to fix FreeBSD
This fix reduces chances of UB to zero and makes the Mutex unnecessary.
That's all we know.
See this PR for more information.
This issue can be used to figure out a way out of this without breakage, while reducing risk of this UB to be exploited at some point.
What we did so far
libc::getmnt*()from other threads.getmntent()How to fix Linux
This fix reduces chances of UB to zero and makes the Mutex unnecessary.
getmntent_r()instead ofgetmntent()How to fix FreeBSD
This fix reduces chances of UB to zero and makes the Mutex unnecessary.
getfsstatdirectly, which avoids the statically allocated buffers entirely. Thanks, @avitex, for the suggestion.That's all we know.