]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix invalid file descriptor reuse while sending DNS query (BZ #15946)
authorAndreas Schwab <schwab@suse.de>
Fri, 22 Apr 2016 15:35:41 +0000 (10:35 -0500)
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Fri, 22 Apr 2016 19:53:25 +0000 (14:53 -0500)
(cherry picked from commit 45af2f6fe19b8a776373cac5a2691460179aa1a3)

ChangeLog
NEWS
resolv/res_send.c

index de1bb7ce2479aae87152ca4f94596ef5104f7507..0be4a594d7a89573df6f4282c2178f79ff496895 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-22  Andreas Schwab  <schwab@suse.de>
+
+       [BZ #15946]
+       * resolv/res_send.c (send_dg): Reload file descriptor after
+       calling reopen.
+
 2016-04-22  Carlos O'Donell  <carlos@redhat.com>
 
        [BZ #18665]
diff --git a/NEWS b/NEWS
index 16a8c152c19ecded36fd5a82072f74a2f38a5907..94bcc4e54b3c660c9fcab8e18b1abf4bcabd4231 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,8 +9,8 @@ Version 2.18.1
 
 * The following bugs are resolved with this release:
 
-  15073, 15128, 15909, 15996, 16009, 16150, 16169, 16387, 16510, 16885,
-  16916, 16943, 16958, 17269, 18032, 18665, 18928, 19018.
+  15073, 15128, 15909, 15946, 15996, 16009, 16150, 16169, 16387, 16510,
+  16885, 16916, 16943, 16958, 17269, 18032, 18665, 18928, 19018.
 
 * The LD_POINTER_GUARD environment variable can no longer be used to
   disable the pointer guard feature.  It is always enabled.
index bc98e59cdb50b65609d997511e887a2533475094..e8b1809eab23b11ac9990476b7116ab356388a00 100644 (file)
@@ -1542,6 +1542,7 @@ send_dg(res_state statp,
                                        retval = reopen (statp, terrno, ns);
                                        if (retval <= 0)
                                                return retval;
+                                       pfd[0].fd = EXT(statp).nssocks[ns];
                                }
                        }
                        goto wait;