Re: [Freeipa-devel] [PATCH 0432] Prevent crash while reloading an invalid DNS zone

2016-07-22 Thread Martin Basti



On 22.07.2016 16:50, Petr Spacek wrote:

Hello,

Prevent crash while reloading an invalid DNS zone.

The crash happened under these circumstances:
- create a DNS zone (test.) with NS record relative to this zone (ns.test.)
- make sure that name pointed to by NS record does not have any A/ records
- restart BIND
- add missing A/ record to ns.test.
-> CRASH!

https://fedorahosted.org/bind-dyndb-ldap/ticket/166


ACK

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


[Freeipa-devel] [PATCH 0432] Prevent crash while reloading an invalid DNS zone

2016-07-22 Thread Petr Spacek
Hello,

Prevent crash while reloading an invalid DNS zone.

The crash happened under these circumstances:
- create a DNS zone (test.) with NS record relative to this zone (ns.test.)
- make sure that name pointed to by NS record does not have any A/ records
- restart BIND
- add missing A/ record to ns.test.
-> CRASH!

https://fedorahosted.org/bind-dyndb-ldap/ticket/166

-- 
Petr^2 Spacek
From 97897d97c68f34d35b95aaf05bb0d2e2da727932 Mon Sep 17 00:00:00 2001
From: Petr Spacek 
Date: Fri, 22 Jul 2016 16:44:17 +0200
Subject: [PATCH] Prevent crash while reloading an invalid DNS zone.

The crash happened under these circumstance:
- create a DNS zone (test.) with NS record relative to this zone (ns.test.)
- make sure that name pointed to by NS record does not have any A/ records
- restart BIND
- add missing A/ record to ns.test.
-> CRASH!

https://fedorahosted.org/bind-dyndb-ldap/ticket/166
---
 src/ldap_helper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index 681661b8910c8213030f38aa9ba38eee748d3109..12a743b095ba400373cb87653d26af82cc95c2ea 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -3824,6 +3824,7 @@ update_record(isc_task_t *task, isc_event_t *event)
 update_restart:
 	rbtdb = NULL;
 	ldapdb = NULL;
+	zone_settings = NULL;
 	ldapdb_rdatalist_destroy(mctx, &rdatalist);
 	CHECK(zr_get_zone_dbs(inst->zone_register, &entry->zone_name, &ldapdb, &rbtdb));
 	CHECK(dns_db_newversion(ldapdb, &version));
-- 
2.7.4

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code