freebsd-dev/usr.bin/kdump
Pawel Jakub Dawidek f9b20fc804 MFp4 @229086:
Make use of Capsicum to protect kdump(1), as it might be used to parse data
from untrusted sources:

- Sandbox kdump(1) using capability mode.
- Limit stdin descriptor (where opened file is moved to) to only
  CAP_READ and CAP_FSTAT rights.
- Limit stdout descriptor to only CAP_WRITE, CAP_FSTAT and CAP_IOCTL.
  Plus limit allowed ioctls to TIOCGETA only, which is needed for
  isatty() to work.
- Limit stderr descriptor to only CAP_WRITE and CAP_FSTAT. In addition
  if the -s option is not given, grant CAP_IOCTL right, but allow for
  TIOCGWINSZ ioctl only, as we need screen width to dump the data.
- Before entering capability mode call catopen("libc", NL_CAT_LOCALE),
  which opens message catalogs and caches data, so that strerror(3)
  and strsignal(3) can work in a sandbox.

Sponsored by:	The FreeBSD Foundation
Discussed with:	rwatson
2013-05-28 21:25:28 +00:00
..
kdump.1 Allow the -p argument to kdump to accept either a PID or a thread ID. 2012-06-04 19:09:14 +00:00
kdump.c MFp4 @229086: 2013-05-28 21:25:28 +00:00
linux_syscalls.conf Teach kdump to decode linux syscalls names too. 2011-03-01 16:42:28 +00:00
Makefile In kdump's mkioctls script, use '${CPP}' instead of hardcodedly using 2012-04-09 14:47:18 +00:00
mkioctls MFprojects/zfsd: 2012-05-24 14:07:44 +00:00
mksubr Merge Capsicum overhaul: 2013-03-02 00:53:12 +00:00