Bug #54771 getpwnam used in a threaded code
Submitted: 24 Jun 2010 11:40 Modified: 26 Mar 2019 0:05
Reporter: Georgi Kodinov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1+, 5.0, 5.1, 5.6.99 OS:Any
Assigned to: CPU Architecture:Any

[24 Jun 2010 11:40] Georgi Kodinov
Description:
the function getpwnam() is used in multithreaded code without being protected by any synchronization mechanism. In some OSes this function is known not to be threadsafe (e.g. Linux).
This may cause wrong results in places like INFORMATION_SCHEMA, NDB, MyISAM and opening FRM files in general.

How to repeat:
Seen through code analysis. Probably can be triggered by running a heavy information schema queries load on linux and mix it with normal activity.

Suggested fix:
Use getpwnam_r() instead
[24 Jun 2010 12:03] Sveta Smirnova
Thank you for the report.

Verified as described using code analysis.
[26 Mar 2019 0:05] Paul DuBois
Posted by developer:
 
Fixed in 8.0.17.

Looks like no actual issue was ever observed, so:

Code cleanup. No changelog entry needed.
[2 Apr 2019 14:14] Paul DuBois
Posted by developer:
 
Fixed in 8.0.18.

Looks like no actual issue was ever observed, so:

Code cleanup. No changelog entry needed.