GNOME Bugzilla – Bug 674476
libxml2 security update fails to address problem and breaks thread-safety
Last modified: 2018-06-15 18:52:46 UTC
This is forwarded from: https://bugs.launchpad.net/ubuntu/+source/libxml2/+bug/983810 "In an attempt to address oCERT 2011-003, libxml2 now seeds its hash table with using rand(). This is broken and lame: Firstly, srand() and rand() are not thread-safe, even though libxml2 is supposed to be thread-safe (when adequately initialized by the program). The fix is easy: replace srand() with a variable assignment, and replace rand() with rand_r(). Secondly, using time(NULL) as a seed totally misses the point. It is trivial for a potential attacker to guess the value of time(NULL). That's the current UTC current time rounded to the second."
For better understanding, this refers to http://git.gnome.org/browse/libxml2/commit/?id=8973d58b7498fa5100a876815476b81fd1a2412a
According to the bugs.launchpad.net link, this was fixed by these two commits: <https://git.gnome.org/browse/libxml2/commit?id=379ebc1d774865fa92f2a8d80cc4da65cbe19998> Fixed by Bug 683933: <https://git.gnome.org/browse/libxml2/commit?id=e7715a5963afebfb027120db6914926ec9a7373d> I think this bug can be closed.
Closing per last comment.