Skip Menu |
Report information
The Basics
Id: 46729
Status: resolved
Priority: 0/
Queue: bind9-public

People
Owner: Nobody in particular
Requestors: Michał Kępień <michal@isc.org>
Cc: Loganaden Velvindron <logan@hackers.mu>
AdminCc:

Bug Information
Version Fixed: (no value)
Version Found: (no value)
Versions Affected: (no value)
Versions Planned: 9.13
Priority: P3 Low
Severity: S3 Low
CVSS Score: (no value)
CVE ID: (no value)
Component: BIND Server
Area: feature

Dates
Created:Wed, 29 Nov 2017 09:48:40 -0500
Updated:Thu, 22 Feb 2018 07:41:41 -0500
Closed:Thu, 22 Feb 2018 07:41:41 -0500



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

To: bind9-public@isc.org
From: michal@isc.org
Subject: Drop seccomp support
Date: Wed, 29 Nov 2017 15:48:40 +0100
Download (untitled) / with headers
text/plain 2.3KiB
This ticket proposes complete removal of seccomp support from BIND source code due to a number of issues with both seccomp itself and the way it is implemented in BIND. Removal is planned to be announced in BIND 9.12.0 release notes and then performed in the next .0 release. The reasons for suggesting removal of seccomp support from BIND are: - Compiling an exhaustive list of system calls which should be whitelisted is very tricky for a piece of software as complex as BIND; while an application needs to declare a complete whitelist of system calls which need to be allowed, it cannot assume anything about what system calls libc is going to use in response to the standard C library calls issued (see e.g. open() vs. openat(), setrlimit() vs. prlimit()). - Alternative mechanisms for achieving the same kind of protection exist, e.g. SELinux or AppArmor. Fine-tuning policies enforced by those mechanisms does not require any changes to be introduced into BIND's source code. - For threaded builds of BIND, seccomp is implemented in a way which provides virtually no extra protection as the only thread which is protected using seccomp is the main thread which waits for libisc to exit its main loop; worker threads are not protected at all because seccomp is initialized after worker threads are spawned. However, this causes odd system test issues e.g. due to named getting killed by SIGSYS after it logs an "exiting" message, but before it gets a chance to clean up its lock file and PID file. - For non-threaded builds of BIND, we are currently whitelisting over 60 systems calls, including open(), read(), write(), close(), mmap(), chdir() and unlink(). These system calls alone are enough for potential exploits to wreak havoc in the system, so such protection arguably does not limit the attack surface significantly. - Considering planned implementation of hooks and enabling external hook modules to be loaded at runtime, either users will potentially need to locally update the seccomp system call whitelist if their module is going to use anything not currently on the list or we will need to provide hook modules with a way of adding extra system calls to the whitelist. Both of these options would further limit seccomp's usefulness.
I think this is sensible thing to do.
To: "Michał Kępień via RT" <bind9-public@isc.org>
Date: Wed, 29 Nov 2017 20:58:04 +0530
From: "Mukund Sivaraman" <muks@isc.org>
Subject: Re: [ISC-Bugs #46729] Drop seccomp support
Nod, the explanation provided is very supportive of removal. Mukund
I received an email comment from Loganaden Velvindron, who authored the patch adding seccomp support to BIND (see RT #35347): > Thanks for reaching out. Could we look into a solution where seccomp > is still kept but as an experimental feature ? > > If seccomp is too complex (and I understand the concerns there), how > about implementing a privilege separation model, and using seccomp > only for untrusted domains, while avoiding applying it to code paths > which are less likely to have security issues. FYI, OpenBSD had for a > long time been running a privilege separated ISC-BIND in their tree. I > didn't have time to dig into it, but I think that maybe it's time to > review it, and discuss with the ISC team ?
Subject: Re: [ISC-Bugs #46729] Drop seccomp support
From: "Evan Hunt" <each@isc.org>
CC:
Date: Wed, 29 Nov 2017 19:44:45 +0000
To: "Michał Kępień via RT" <bind9-public@isc.org>
> Removal is planned to be announced in > BIND 9.12.0 release notes and then performed in the next .0 release. My only quibble is let's not put the announcement in the 9.12.0 release notes. It's not the sort of thing we've done in release notes before, I think people might find it confusing, and if we remove any other featuers in 9.13 they might start asking why we didn't preannounce our intention to do *that*. If we want to preannounce removal, let's do so on bind-announce like we did with lwresd and XP support. I'm sold on the actual removal. If Logan wants to take a run at his privilege separation idea and send us a patch, we can consider the idea then; I don't see a need to keep the existing code until that happens.
Subject: Re: [ISC-Bugs #46729] Drop seccomp support
From: "Mukund Sivaraman" <muks@isc.org>
Date: Thu, 30 Nov 2017 07:46:15 +0530
To: "Michał Kępień via RT" <bind9-public@isc.org>
Download (untitled) / with headers
text/plain 1.1KiB
On Wed, Nov 29, 2017 at 05:18:40PM +0000, Michał Kępień via RT wrote: > I received an email comment from Loganaden Velvindron, who authored the > patch adding seccomp support to BIND (see RT #35347): > > > Thanks for reaching out. Could we look into a solution where seccomp > > is still kept but as an experimental feature ? > > > > If seccomp is too complex (and I understand the concerns there), how > > about implementing a privilege separation model, and using seccomp > > only for untrusted domains, while avoiding applying it to code paths > > which are less likely to have security issues. FYI, OpenBSD had for a > > long time been running a privilege separated ISC-BIND in their tree. I > > didn't have time to dig into it, but I think that maybe it's time to > > review it, and discuss with the ISC team ? Given the points that were made about (a) syscalls varying depending on underlying library implementation, (b) that we already use syscalls which are bad enough, and (c) there are other ways to achieve similar access control, the feature seems uncontrollable and there doesn't seem to be much advantage in keeping it on as an experimental feature. Mukund