Fix race condition in arc4random (#1166878)
Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
6cdcf55a00
commit
3249758581
30
unbound-1.5.0-arc4random-race-condition.patch
Normal file
30
unbound-1.5.0-arc4random-race-condition.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From b4200f7e7ac1ca4a315df84e92cd31d8ba423cee Mon Sep 17 00:00:00 2001
|
||||||
|
From: wouter <wouter@be551aaa-1e26-0410-a405-d3ace91eadb9>
|
||||||
|
Date: Fri, 21 Nov 2014 08:22:18 +0000
|
||||||
|
Subject: [PATCH] - Fix crash on multiple thread random usage on systems
|
||||||
|
without arc4random.
|
||||||
|
|
||||||
|
git-svn-id: http://unbound.nlnetlabs.nl/svn/trunk@3277 be551aaa-1e26-0410-a405-d3ace91eadb9
|
||||||
|
---
|
||||||
|
compat/arc4_lock.c | 4 +++-
|
||||||
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/compat/arc4_lock.c b/compat/arc4_lock.c
|
||||||
|
index ce8bb41..faa743d 100644
|
||||||
|
--- a/compat/arc4_lock.c
|
||||||
|
+++ b/compat/arc4_lock.c
|
||||||
|
@@ -53,8 +53,10 @@ static int arc4lockinit = 0;
|
||||||
|
|
||||||
|
void _ARC4_LOCK(void)
|
||||||
|
{
|
||||||
|
- if(!arc4lockinit)
|
||||||
|
+ if(!arc4lockinit) {
|
||||||
|
+ arc4lockinit = 1;
|
||||||
|
lock_quick_init(&arc4lock);
|
||||||
|
+ }
|
||||||
|
lock_quick_lock(&arc4lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
@ -19,7 +19,7 @@
|
|||||||
Summary: Validating, recursive, and caching DNS(SEC) resolver
|
Summary: Validating, recursive, and caching DNS(SEC) resolver
|
||||||
Name: unbound
|
Name: unbound
|
||||||
Version: 1.5.0
|
Version: 1.5.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Url: http://www.nlnetlabs.nl/unbound/
|
Url: http://www.nlnetlabs.nl/unbound/
|
||||||
Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
|
Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
|
||||||
@ -41,6 +41,8 @@ Source14: unbound.sysconfig
|
|||||||
Source15: unbound.cron
|
Source15: unbound.cron
|
||||||
Source16: unbound-munin.README
|
Source16: unbound-munin.README
|
||||||
|
|
||||||
|
Patch0: unbound-1.5.0-arc4random-race-condition.patch
|
||||||
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
BuildRequires: flex, openssl-devel
|
BuildRequires: flex, openssl-devel
|
||||||
BuildRequires: libevent-devel expat-devel
|
BuildRequires: libevent-devel expat-devel
|
||||||
@ -113,6 +115,8 @@ Python modules and extensions for unbound
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1 -b .arc4random_fix
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# This is needed to rebuild the configure script to support Python 3.x
|
# This is needed to rebuild the configure script to support Python 3.x
|
||||||
@ -290,6 +294,9 @@ exit 0
|
|||||||
/bin/systemctl try-restart unbound-keygen.service >/dev/null 2>&1 || :
|
/bin/systemctl try-restart unbound-keygen.service >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 26 2014 Tomas Hozza <thozza@redhat.com> - 1.5.0-2
|
||||||
|
- Fix race condition in arc4random (#1166878)
|
||||||
|
|
||||||
* Wed Nov 19 2014 Tomas Hozza <thozza@redhat.com> - 1.5.0-1
|
* Wed Nov 19 2014 Tomas Hozza <thozza@redhat.com> - 1.5.0-1
|
||||||
- update to 1.5.0
|
- update to 1.5.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user