From d3b2d64576fcc1281841a48740f5f481d1b46a90 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 26 May 2014 18:01:31 +0200 Subject: [PATCH] Fix invalid file descriptor reuse while sending DNS query (BZ #15946) (cherry picked from commit f9d2d03254a58d92635a311a42253eeed5a40a47) Conflicts: NEWS --- ChangeLog | 6 ++++++ NEWS | 3 ++- resolv/res_send.c | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 62beb70792d..a69a26953a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-06-03 Andreas Schwab + + [BZ #15946] + * resolv/res_send.c (send_dg): Reload file descriptor after + calling reopen. + 2014-02-18 Andreas Schwab [BZ #16574] diff --git a/NEWS b/NEWS index d2b3419831d..4eebd676117 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,8 @@ Version 2.19.1 * The following bugs are resolved with this release: - 16545, 16574, 16623, 16882, 16885, 16916, 16932, 16943, 16958, 17048. + 15946, 16545, 16574, 16623, 16882, 16885, 16916, 16932, 16943, 16958, + 17048. * CVE-2014-4043 The posix_spawn_file_actions_addopen implementation did not copy the path argument. This allowed programs to cause posix_spawn to diff --git a/resolv/res_send.c b/resolv/res_send.c index 704542c7307..416da8777eb 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -1410,6 +1410,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; -- 2.47.2