Glibc Patch for getaddrinfo() vulnerability












3















I have been seeing a lot about the newly discovered vulnerability in the glibc library which can be exploited (albeit with difficulty) by attackers.



Here is a (fire and brimstone) article on the subject:
http://arstechnica.com/security/2016/02/extremely-severe-bug-leaves-dizzying-number-of-apps-and-devices-vulnerable/



I understand the nature of the vulnerability, but I have to admit I get a bit lost when reading the patch solution. It seems that several steps need to be taken on the machine, but it says a "patch" is attached to the email.



Where is the patch exactly?



https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html



I apologize, but I am not a Linux system engineer (aptitude and yum are my homeboys).



Unfortunately, I manage a few sites for clients mostly on Amazon linux which I have read may be susceptible as well - let's assume they are.



I just want to make sure I secure the boxes, I am probably capable of applying the patch, but I think i get confused by the glibc mail archive.



Can anyone shed some light on it - ie put it in a language us lowly front-end web devs can understand?



I know this is new/evolving I'm sure better docs will be available in the coming days.



Thanks in advance.










share|improve this question





























    3















    I have been seeing a lot about the newly discovered vulnerability in the glibc library which can be exploited (albeit with difficulty) by attackers.



    Here is a (fire and brimstone) article on the subject:
    http://arstechnica.com/security/2016/02/extremely-severe-bug-leaves-dizzying-number-of-apps-and-devices-vulnerable/



    I understand the nature of the vulnerability, but I have to admit I get a bit lost when reading the patch solution. It seems that several steps need to be taken on the machine, but it says a "patch" is attached to the email.



    Where is the patch exactly?



    https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html



    I apologize, but I am not a Linux system engineer (aptitude and yum are my homeboys).



    Unfortunately, I manage a few sites for clients mostly on Amazon linux which I have read may be susceptible as well - let's assume they are.



    I just want to make sure I secure the boxes, I am probably capable of applying the patch, but I think i get confused by the glibc mail archive.



    Can anyone shed some light on it - ie put it in a language us lowly front-end web devs can understand?



    I know this is new/evolving I'm sure better docs will be available in the coming days.



    Thanks in advance.










    share|improve this question



























      3












      3








      3


      2






      I have been seeing a lot about the newly discovered vulnerability in the glibc library which can be exploited (albeit with difficulty) by attackers.



      Here is a (fire and brimstone) article on the subject:
      http://arstechnica.com/security/2016/02/extremely-severe-bug-leaves-dizzying-number-of-apps-and-devices-vulnerable/



      I understand the nature of the vulnerability, but I have to admit I get a bit lost when reading the patch solution. It seems that several steps need to be taken on the machine, but it says a "patch" is attached to the email.



      Where is the patch exactly?



      https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html



      I apologize, but I am not a Linux system engineer (aptitude and yum are my homeboys).



      Unfortunately, I manage a few sites for clients mostly on Amazon linux which I have read may be susceptible as well - let's assume they are.



      I just want to make sure I secure the boxes, I am probably capable of applying the patch, but I think i get confused by the glibc mail archive.



      Can anyone shed some light on it - ie put it in a language us lowly front-end web devs can understand?



      I know this is new/evolving I'm sure better docs will be available in the coming days.



      Thanks in advance.










      share|improve this question
















      I have been seeing a lot about the newly discovered vulnerability in the glibc library which can be exploited (albeit with difficulty) by attackers.



      Here is a (fire and brimstone) article on the subject:
      http://arstechnica.com/security/2016/02/extremely-severe-bug-leaves-dizzying-number-of-apps-and-devices-vulnerable/



      I understand the nature of the vulnerability, but I have to admit I get a bit lost when reading the patch solution. It seems that several steps need to be taken on the machine, but it says a "patch" is attached to the email.



      Where is the patch exactly?



      https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html



      I apologize, but I am not a Linux system engineer (aptitude and yum are my homeboys).



      Unfortunately, I manage a few sites for clients mostly on Amazon linux which I have read may be susceptible as well - let's assume they are.



      I just want to make sure I secure the boxes, I am probably capable of applying the patch, but I think i get confused by the glibc mail archive.



      Can anyone shed some light on it - ie put it in a language us lowly front-end web devs can understand?



      I know this is new/evolving I'm sure better docs will be available in the coming days.



      Thanks in advance.







      security glibc






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 58 mins ago









      Rui F Ribeiro

      39.6k1479132




      39.6k1479132










      asked Feb 18 '16 at 2:34









      7Elm7Elm

      183




      183






















          1 Answer
          1






          active

          oldest

          votes


















          4














          If you're using any reasonably well-supported distribution, you don't need the original patch itself. Most distributions would have updated libc by now, and pushed it to their repositories, and all you need to do is use the package manager to upgrade libc. (If they haven't done so by now, seriously consider switching distributions.) And this is indeed the case with Amazon Linux. From their security bulletins:




          [C]ustomers using Amazon EC2 who’ve modified their configurations to
          use non-AWS DNS infrastructure should update their Linux environments
          immediately following directions provided by their Linux distribution.
          EC2 customers using the AWS DNS infrastructure are unaffected and
          don’t need to take any action.



          For Amazon EC2 customers using Amazon Linux and who’ve modified their
          configuration to use non-AWS DNS infrastructure:



          A fix for CVE-2015-7547 has been pushed to the Amazon Linux AMI
          repositories, with a severity rating of Critical. Instances launched
          with the default Amazon Linux configuration on or after 2016/02/16
          will automatically include the required fix for this CVE.




          The patch if you want to look at it, is the part that begins with diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c in the email:



          CVE-2015-7547

          2016-02-15 Carlos O'Donell

          [BZ #18665]
          * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
          *herrno_p.
          (gaih_getanswer): Document functional behviour. Return tryagain
          if any result is tryagain.
          * resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
          when freed.
          * resolv/res_send.c: Add copyright text.
          (__libc_res_nsend): Document that MAXPACKET is expected.
          (send_vc): Document. Remove buffer reuse.
          (send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
          size of the buffer. Add Dprint for truncated UDP buffer.

          diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
          index a255d5e..47cfe27 100644
          --- a/resolv/nss_dns/dns-host.c
          +++ b/resolv/nss_dns/dns-host.c
          @@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
          int h_namelen = 0;

          if (ancount == 0)
          - return NSS_STATUS_NOTFOUND;
          + {
          + *h_errnop = HOST_NOT_FOUND;
          + return NSS_STATUS_NOTFOUND;
          + }

          ...





          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f263993%2fglibc-patch-for-getaddrinfo-vulnerability%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            If you're using any reasonably well-supported distribution, you don't need the original patch itself. Most distributions would have updated libc by now, and pushed it to their repositories, and all you need to do is use the package manager to upgrade libc. (If they haven't done so by now, seriously consider switching distributions.) And this is indeed the case with Amazon Linux. From their security bulletins:




            [C]ustomers using Amazon EC2 who’ve modified their configurations to
            use non-AWS DNS infrastructure should update their Linux environments
            immediately following directions provided by their Linux distribution.
            EC2 customers using the AWS DNS infrastructure are unaffected and
            don’t need to take any action.



            For Amazon EC2 customers using Amazon Linux and who’ve modified their
            configuration to use non-AWS DNS infrastructure:



            A fix for CVE-2015-7547 has been pushed to the Amazon Linux AMI
            repositories, with a severity rating of Critical. Instances launched
            with the default Amazon Linux configuration on or after 2016/02/16
            will automatically include the required fix for this CVE.




            The patch if you want to look at it, is the part that begins with diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c in the email:



            CVE-2015-7547

            2016-02-15 Carlos O'Donell

            [BZ #18665]
            * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
            *herrno_p.
            (gaih_getanswer): Document functional behviour. Return tryagain
            if any result is tryagain.
            * resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
            when freed.
            * resolv/res_send.c: Add copyright text.
            (__libc_res_nsend): Document that MAXPACKET is expected.
            (send_vc): Document. Remove buffer reuse.
            (send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
            size of the buffer. Add Dprint for truncated UDP buffer.

            diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
            index a255d5e..47cfe27 100644
            --- a/resolv/nss_dns/dns-host.c
            +++ b/resolv/nss_dns/dns-host.c
            @@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
            int h_namelen = 0;

            if (ancount == 0)
            - return NSS_STATUS_NOTFOUND;
            + {
            + *h_errnop = HOST_NOT_FOUND;
            + return NSS_STATUS_NOTFOUND;
            + }

            ...





            share|improve this answer




























              4














              If you're using any reasonably well-supported distribution, you don't need the original patch itself. Most distributions would have updated libc by now, and pushed it to their repositories, and all you need to do is use the package manager to upgrade libc. (If they haven't done so by now, seriously consider switching distributions.) And this is indeed the case with Amazon Linux. From their security bulletins:




              [C]ustomers using Amazon EC2 who’ve modified their configurations to
              use non-AWS DNS infrastructure should update their Linux environments
              immediately following directions provided by their Linux distribution.
              EC2 customers using the AWS DNS infrastructure are unaffected and
              don’t need to take any action.



              For Amazon EC2 customers using Amazon Linux and who’ve modified their
              configuration to use non-AWS DNS infrastructure:



              A fix for CVE-2015-7547 has been pushed to the Amazon Linux AMI
              repositories, with a severity rating of Critical. Instances launched
              with the default Amazon Linux configuration on or after 2016/02/16
              will automatically include the required fix for this CVE.




              The patch if you want to look at it, is the part that begins with diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c in the email:



              CVE-2015-7547

              2016-02-15 Carlos O'Donell

              [BZ #18665]
              * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
              *herrno_p.
              (gaih_getanswer): Document functional behviour. Return tryagain
              if any result is tryagain.
              * resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
              when freed.
              * resolv/res_send.c: Add copyright text.
              (__libc_res_nsend): Document that MAXPACKET is expected.
              (send_vc): Document. Remove buffer reuse.
              (send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
              size of the buffer. Add Dprint for truncated UDP buffer.

              diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
              index a255d5e..47cfe27 100644
              --- a/resolv/nss_dns/dns-host.c
              +++ b/resolv/nss_dns/dns-host.c
              @@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
              int h_namelen = 0;

              if (ancount == 0)
              - return NSS_STATUS_NOTFOUND;
              + {
              + *h_errnop = HOST_NOT_FOUND;
              + return NSS_STATUS_NOTFOUND;
              + }

              ...





              share|improve this answer


























                4












                4








                4







                If you're using any reasonably well-supported distribution, you don't need the original patch itself. Most distributions would have updated libc by now, and pushed it to their repositories, and all you need to do is use the package manager to upgrade libc. (If they haven't done so by now, seriously consider switching distributions.) And this is indeed the case with Amazon Linux. From their security bulletins:




                [C]ustomers using Amazon EC2 who’ve modified their configurations to
                use non-AWS DNS infrastructure should update their Linux environments
                immediately following directions provided by their Linux distribution.
                EC2 customers using the AWS DNS infrastructure are unaffected and
                don’t need to take any action.



                For Amazon EC2 customers using Amazon Linux and who’ve modified their
                configuration to use non-AWS DNS infrastructure:



                A fix for CVE-2015-7547 has been pushed to the Amazon Linux AMI
                repositories, with a severity rating of Critical. Instances launched
                with the default Amazon Linux configuration on or after 2016/02/16
                will automatically include the required fix for this CVE.




                The patch if you want to look at it, is the part that begins with diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c in the email:



                CVE-2015-7547

                2016-02-15 Carlos O'Donell

                [BZ #18665]
                * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
                *herrno_p.
                (gaih_getanswer): Document functional behviour. Return tryagain
                if any result is tryagain.
                * resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
                when freed.
                * resolv/res_send.c: Add copyright text.
                (__libc_res_nsend): Document that MAXPACKET is expected.
                (send_vc): Document. Remove buffer reuse.
                (send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
                size of the buffer. Add Dprint for truncated UDP buffer.

                diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
                index a255d5e..47cfe27 100644
                --- a/resolv/nss_dns/dns-host.c
                +++ b/resolv/nss_dns/dns-host.c
                @@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
                int h_namelen = 0;

                if (ancount == 0)
                - return NSS_STATUS_NOTFOUND;
                + {
                + *h_errnop = HOST_NOT_FOUND;
                + return NSS_STATUS_NOTFOUND;
                + }

                ...





                share|improve this answer













                If you're using any reasonably well-supported distribution, you don't need the original patch itself. Most distributions would have updated libc by now, and pushed it to their repositories, and all you need to do is use the package manager to upgrade libc. (If they haven't done so by now, seriously consider switching distributions.) And this is indeed the case with Amazon Linux. From their security bulletins:




                [C]ustomers using Amazon EC2 who’ve modified their configurations to
                use non-AWS DNS infrastructure should update their Linux environments
                immediately following directions provided by their Linux distribution.
                EC2 customers using the AWS DNS infrastructure are unaffected and
                don’t need to take any action.



                For Amazon EC2 customers using Amazon Linux and who’ve modified their
                configuration to use non-AWS DNS infrastructure:



                A fix for CVE-2015-7547 has been pushed to the Amazon Linux AMI
                repositories, with a severity rating of Critical. Instances launched
                with the default Amazon Linux configuration on or after 2016/02/16
                will automatically include the required fix for this CVE.




                The patch if you want to look at it, is the part that begins with diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c in the email:



                CVE-2015-7547

                2016-02-15 Carlos O'Donell

                [BZ #18665]
                * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
                *herrno_p.
                (gaih_getanswer): Document functional behviour. Return tryagain
                if any result is tryagain.
                * resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
                when freed.
                * resolv/res_send.c: Add copyright text.
                (__libc_res_nsend): Document that MAXPACKET is expected.
                (send_vc): Document. Remove buffer reuse.
                (send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
                size of the buffer. Add Dprint for truncated UDP buffer.

                diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
                index a255d5e..47cfe27 100644
                --- a/resolv/nss_dns/dns-host.c
                +++ b/resolv/nss_dns/dns-host.c
                @@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
                int h_namelen = 0;

                if (ancount == 0)
                - return NSS_STATUS_NOTFOUND;
                + {
                + *h_errnop = HOST_NOT_FOUND;
                + return NSS_STATUS_NOTFOUND;
                + }

                ...






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 18 '16 at 3:02









                murumuru

                1




                1






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f263993%2fglibc-patch-for-getaddrinfo-vulnerability%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Histoire des bourses de valeurs

                    Why is there Russian traffic in my log files?

                    Rename multiple files to decrement number in file name?