the development of bind, tracking the growth of the dns ... · brian reid isc 13 july 2018. musty...

18
The development of BIND, tracking the growth of the DNS and DNS standards over 30 years Brian Reid ISC 13 July 2018

Upload: others

Post on 19-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

The development of BIND, tracking the growth of the DNS and DNS standards over 30 years

Brian ReidISC

13 July 2018

Page 2: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

Musty old software?

• BIND 9 first released October 2000• Linux first released September 1991

Think about the evolution of the requirements for those systems. And the concerns that implementing some new requirement might add complexity

Page 3: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

BIND implemented DNS

• BIND implemented DNS. That was its identity. UC Berkeley

• BIND ended up in the custody of my laboratory at DEC (long boring story)

• P.Vixie insisted that it be the “reference implementation” (never mind that it was the only)

• He took BIND with him when he left.

Page 4: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

”Plan to throw one away, because you will anyhow”• At Berkeley, BIND was BIND 4. • Vixie realized need to start over.• BIND 8 followed BIND 4 to mimic

Sendmail, whose v8 followed v4• BIND 8 accumulated many CVEs.• Maybe Fred meant “Plan to throw

two away...”

Page 5: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

Requirement changes forced re-architecting BIND• DNSSEC• IPv6• Multiprocessor support• Remote management• TSIG • Dynamic update (DDNS)• etc

Page 6: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

RFC pages vs BIND code size

0

500

1000

1500

2000

2500

3000

3500

0

50000

100000

150000

200000

250000

300000

350000

400000

1983

1984

1985

1986

1987

1988

1989

1990

1991

1992

1993

1994

1995

1996

1997

1998

1999

2000

2001

2002

2003

2004

2005

2006

2007

2008

2009

2010

2011

2012

2013

2014

2015

2016

2017

RFC page countPer Bert Hubert

Lines of codeIn BIND 9

Page 7: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

One feature over the line?

• Views• DNSSEC• Universality (auth and recursive)• DNAME• Views• NSEC3• Did I say Views?

We asked people what they wished we had never put into BIND

Page 8: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

All power tools can kill

• Sometimes an RFC defines something that seems useful

• If standards-track, we put it into BIND• Later, bad people discover how to

abuse it or attack with it• RFCs don’t advise how to control the

monster, just how to hatch it• My favorite example is IPv6

Page 9: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

filter-aaaa-on-v4 filter-aaaa-on-v6• BIND 9.12 option documentation:

This option is intended to help the transition from IPv4 to IPv6 by not giving IPv6 addresses to DNS clients unless they have connections to the IPv6 Internet. This is not recommended unless absolutely necessary. The default is no. The filter-aaaa-on-v4 option may also be specified in view statements to override the global filter-aaaa-on-v4 option.

Page 10: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

IPv6-related interactions

• CVE-2017-3135:

Under some conditions when using both DNS64 and RPZ to rewrite query responses, query processing can resume in an inconsistent state leading to either an INSIST assertion failure or an attempt to read through a NULL pointer.

Page 11: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

Accommodating operations

• From BIND 9.12 release notes:When acting as a recursive resolver, named can now continue returning answers whose TTLs have expired when the authoritative server is under attack…. This is controlled by the stale-answer-enable, stale-answer-ttl and max-stale-ttl options

• From BIND 9.11 release notesnamed will no longer start or accept reconfiguration if managed-keys or dnssec-validation auto are in use and the managed-keys directory … is not writable by the effective user ID

Page 12: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

Between stasis and rewrite• BIND has been rewritten twice• 2500 pages of RFC since last rewrite

(data from Bert Hubert’s Camel)• Current practice is to refactor, not

necessarily rewrite• Refactoring is a partial rewriting of

parts that need it most• Remove complexity when you can• Remove code when you can

Page 13: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

Complexity and metrics

• For decades, “McCabe Cyclomatic Complexity Index” has been a metric

• Just as with College admission test scores: not the whole story

• ISC’s Witold Kręcicki devised a maintainability index by combining metrics (including that one)

• See https://www.isc.org/blogs/bind-9-refactoring/

Page 14: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

Witold’s maintenance index

Simple

Complex

Page 15: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

The challenge is simpleAccomplishing it is not

• Implement and test changes required by new RFCs

• Complexity will increase• Can reset baseline with full re-

implementation• Or can identify problem spots and try

to refactor

Page 16: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

Growing complexity hurts

• More complex code is more likely to have problems

• Especially when changed• Table of CVE vs code complexity is in

Witold Kręcicki’s aforementioned blog • Old quote from US TV advert: “You

can pay me now, or you can pay me later”

Page 17: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how
Page 18: The development of BIND, tracking the growth of the DNS ... · Brian Reid ISC 13 July 2018. Musty old software? •BIND 9 first released October 2000 ... •RFCs don’t advise how

BIND 9.0 BIND 9.13