Bug 20220

Summary: New recvmsg wrapper in 2.24 missing from libpthread
Product: glibc Reporter: Florian Weimer <fweimer>
Component: nptlAssignee: Not yet assigned to anyone <unassigned>
Severity: normal CC: adhemerval.zanella, drepper.fsp, fweimer, mlichvar
Priority: P2 Flags: fweimer: security-
Version: 2.24   
Target Milestone: 2.34   
See Also: https://sourceware.org/bugzilla/show_bug.cgi?id=16919
Host: Target:
Build: Last reconfirmed:
Bug Depends on: 24741    
Bug Blocks:    

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.