From e9c2f97bf02666b01aa4af63c4e41355396acc3c 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) Conflicts: NEWS --- ChangeLog | 6 ++++++ NEWS | 4 ++-- resolv/res_send.c | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b734230442..246f0a51840 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. + 2015-02-05 Paul Pluzhnikov [BZ #16618] diff --git a/NEWS b/NEWS index b0c3072c45b..6a49b4bdb55 100644 --- a/NEWS +++ b/NEWS @@ -10,8 +10,8 @@ Version 2.16.1 * The following bugs are resolved with this release: 6530, 14195, 14547, 14459, 14476, 14562, 14621, 14648, 14699, 14719, - 14756, 14831, 15014, 15078, 15754, 15755, 16072, 16431, 16617, 16618, - 17048, 17137, 17187, 17325, 17625, 17630. + 14756, 14831, 15014, 15078, 15754, 15755, 15946, 16072, 16431, 16617, + 16618, 17048, 17137, 17187, 17325, 17625, 17630. * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag under certain input conditions resulting in the execution of a shell for diff --git a/resolv/res_send.c b/resolv/res_send.c index 0a28cd784b9..a8d4849f067 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -1402,6 +1402,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