Bug 20220 - New recvmsg wrapper in 2.24 missing from libpthread
Summary: New recvmsg wrapper in 2.24 missing from libpthread
Alias: None
Product: glibc
Classification: Unclassified
Component: nptl (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: 2.34
Assignee: Not yet assigned to anyone
Depends on: 24741
  Show dependency treegraph
Reported: 2016-06-08 07:15 UTC by Florian Weimer
Modified: 2021-08-10 10:04 UTC (History)
4 users (show)

See Also:
Last reconfirmed:
fweimer: security-


Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2016-06-08 07:15:19 UTC
Currently, libpthread only export recvmsg@GLIBC_2.0, not recvmsg@GLIBC_2.24.  It seems that dlsym can pick this symbol, and applications can call the function with the wrong struct definition as a result.

I suspect a 2.24 version needs to be added to nptl/Versions as well.
Comment 1 Adhemerval Zanella 2016-06-08 14:30:44 UTC
As Joseph pointed out, this seems likely BZ#14932.  My understanding is libpthread provided old {recv,send}msg only for compatibility reasons, new programs should link against newer one on libc and dlsym should return the new version as well.
Comment 2 Florian Weimer 2016-06-08 19:42:15 UTC
Okay, let's treat it as a duplicate.

*** This bug has been marked as a duplicate of bug 14932 ***
Comment 3 Florian Weimer 2019-07-12 13:18:56 UTC
I think we should fix this bug (in recvmsg) by removing the forwarder in libpthread.  The fix for bug 24741 enables that.
Comment 4 Florian Weimer 2021-08-10 10:04:54 UTC
Fixed in glibc 2.34 via:

commit 0cf67de81650dee7ccd72b43b9405842d3509fbe
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Sat Mar 13 20:15:55 2021 -0300

    nptl: Remove recvmsg from libpthread
    The libc version is identical and built with same flags.
    Checked on x86_64-linux-gnu.