This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/12926] getaddrinfo()/make_request() may spin forever


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

--- Comment #17 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  2eecc8afd02d8c65cf098cbae4de87f332dc21bd (commit)
      from  f3d18efb8a720121066dc3401e822043beb98cde (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2eecc8afd02d8c65cf098cbae4de87f332dc21bd

commit 2eecc8afd02d8c65cf098cbae4de87f332dc21bd
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Nov 9 12:48:41 2015 +0100

    Terminate process on invalid netlink response from kernel [BZ #12926]

    The recvmsg system calls for netlink sockets have been particularly
    prone to picking up unrelated data after a file descriptor race
    (where the descriptor is closed and reopened concurrently in a
    multi-threaded process, as the result of a file descriptor
    management issue elsewhere).  This commit adds additional error
    checking and aborts the process if a datagram of unexpected length
    (without the netlink header) is received, or an error code which
    cannot happen due to the way the netlink socket is used.

        [BZ #12926]
        Terminate process on invalid netlink response.
        * sysdeps/unix/sysv/linux/netlinkaccess.h
        (__netlink_assert_response): Declare.
        * sysdeps/unix/sysv/linux/netlink_assert_response.c: New file.
        * sysdeps/unix/sysv/linux/Makefile [$(subdir) == inet]
        (sysdep_routines): Add netlink_assert_response.
        * sysdeps/unix/sysv/linux/check_native.c (__check_native): Call
        __netlink_assert_response.
        * sysdeps/unix/sysv/linux/check_pf.c (make_request): Likewise.
        * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Likewise.
        * sysdeps/unix/sysv/linux/Versions (GLIBC_PRIVATE): Add
        __netlink_assert_response.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                         |   16 +++
 NEWS                                              |    8 ++
 sysdeps/unix/sysv/linux/Makefile                  |    1 +
 sysdeps/unix/sysv/linux/Versions                  |    2 +
 sysdeps/unix/sysv/linux/check_native.c            |    2 +
 sysdeps/unix/sysv/linux/check_pf.c                |    4 +-
 sysdeps/unix/sysv/linux/ifaddrs.c                 |    1 +
 sysdeps/unix/sysv/linux/netlink_assert_response.c |  106 +++++++++++++++++++++
 sysdeps/unix/sysv/linux/netlinkaccess.h           |    6 +
 9 files changed, 145 insertions(+), 1 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/netlink_assert_response.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]