|
|
Log in / Subscribe / Register

Please fix the buggy rwlock!

Please fix the buggy rwlock!

Posted May 29, 2025 5:00 UTC (Thu) by PengZheng (subscriber, #108006)
Parent article: Glibc project revisits infrastructure security

Once again, I call for glibc developers take time to fix the buggy rwlock implementation introduced by Torvald Riegel, which make glibc's rwlock completely unusable with realtime tasks.

https://sourceware.org/bugzilla/show_bug.cgi?id=31477

This issue has extensive impact because OpenSSL use wrlock as ordinary mutex by default.

https://github.com/openssl/openssl/blob/3cb07553232812672...

And it impacts nearly all subsystems of OpenSSL.

https://github.com/openssl/openssl/blob/b372b1f76450acdfe...

I can safely tell that nearly all linux running real-time task using OpenSSL might be affected by this issue (like real-time video streaming over TLS connection).


to post comments

Please fix the buggy rwlock!

Posted May 29, 2025 5:02 UTC (Thu) by PengZheng (subscriber, #108006) [Link]

I should have mentioned that both musl and uclibc(-ng) do not have this issue.

Please fix the buggy rwlock!

Posted May 29, 2025 10:26 UTC (Thu) by ballombe (subscriber, #9523) [Link] (1 responses)

My experience is that glibc test-suite does not cover pthread well.

Please fix the buggy rwlock!

Posted May 29, 2025 10:50 UTC (Thu) by PengZheng (subscriber, #108006) [Link]

This issue is relatively trivial to reproduce and the impact is HUGE: billions of embedded multimedia devices might be affected.

"Fortunately", there is an easy way out: revert to the good old implementation by Ulrich Drepper.
I have done that 5-6 times in the past year for glibc toolchains from various SOC vendors.

To be honest, I really missed Ulrich Drepper.

Please fix the buggy rwlock!

Posted Jun 3, 2025 8:25 UTC (Tue) by jwakely (subscriber, #60262) [Link] (2 responses)

This is completely off topic on an lwn article about the project infrastructure.

Please fix the buggy rwlock!

Posted Jun 3, 2025 8:43 UTC (Tue) by PengZheng (subscriber, #108006) [Link] (1 responses)

I'm afraid that it is not, just as another commenter has already pointed out:

> glibc test-suite does not cover pthread well.

Please fix the buggy rwlock!

Posted Jun 3, 2025 9:15 UTC (Tue) by PengZheng (subscriber, #108006) [Link]

Anyone follow my explanation in the bugzilla thread [0] will agree that this is obviously a severe bug.
It is common sense that infinite user space spin should almost NEVER be allowed.

This just illustrates the lack of testing infrastructure of glibc.

[0] https://sourceware.org/bugzilla/show_bug.cgi?id=31477#c9


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds