541_0001-Fix-a-problem-with-select-and-high-fds.patch
AbandonedPublic

Authored by werner on Jan 19 2015, 4:51 PM.

Details

Reviewers
None
Summary

From 8adb5ff26062f717619aa816de8b27aa7d40d6c8 Mon Sep 17 00:00:00 2001
From: Werner Koch <wk@gnupg.org>
Date: Mon, 19 Jan 2015 16:46:05 +0100
Subject: [PATCH] Fix a problem with select and high fds.

  • cipher/rndlinux.c (rndlinux_gather_random): Check fd before using

FD_SET.

If on systems where the maximum number of fds may be dynamically
configured to a value of FD_MAXSIZE or higher and the RNG is first
used after more than FD_SETSIZE-1 descriptors are in use, we disable
the progress messages from the RNG. A better solution would be too
use poll but that requires more tests.

The same problem exists in rndunix.c - however this rng is only used
on old Unices and I assume that they don't feature dynamically
configured maximum fd sizes.

(from Libgcrypt commit 9487099071af4478d2882e633a0ade805801d6fa)

This may fix

GnuPG-bug-id: 1818

cipher/rndlinux.c | 29 +++++++++++++++++------------
cipher/rndunix.c | 8 +++++---
2 files changed, 22 insertions(+), 15 deletions(-)

2.1.4

Test Plan

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped