OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../djbdns/AXFR_vulnerability.patch
  5. # Copyright (C) 2009 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Mailing-List: contact dns-help@list.cr.yp.to; run by ezmlm
  17. Date: 4 Mar 2009 01:34:21 -0000
  18. Message-ID: <20090304013421.60368.qmail@cr.yp.to>
  19. Mail-Followup-To: dns@list.cr.yp.to
  20. Automatic-Legal-Notices: See http://cr.yp.to/mailcopyright.html.
  21. From: "D. J. Bernstein" <djb@cr.yp.to>
  22. To: dns@list.cr.yp.to
  23. Subject: djbdns<=1.05 lets AXFRed subdomains overwrite domains
  24. If the administrator of example.com publishes the example.com DNS data
  25. through tinydns and axfrdns, and includes data for sub.example.com
  26. transferred from an untrusted third party, then that third party can
  27. control cache entries for example.com, not just sub.example.com. This is
  28. the result of a bug in djbdns pointed out by Matthew Dempsky. (In short,
  29. axfrdns compresses some outgoing DNS packets incorrectly.)
  30. Even though this bug affects very few users, it is a violation of the
  31. expected security policy in a reasonable situation, so it is a security
  32. hole in djbdns. Third-party DNS service is discouraged in the djbdns
  33. documentation but is nevertheless supported. Dempsky is hereby awarded
  34. $1000.
  35. The next release of djbdns will be backed by a new security guarantee.
  36. In the meantime, if any users are in the situation described above,
  37. those users are advised to apply Dempsky's patch and requested to accept
  38. my apologies. The patch is also recommended for other users; it corrects
  39. the bug without any side effects. A copy of the patch appears below.
  40. ---D. J. Bernstein
  41. Research Professor, Computer Science, University of Illinois at Chicago
  42. --- ./response.c.orig 2009-03-05 22:16:18.000000000 +0200
  43. +++ ./response.c 2009-03-05 22:16:57.000000000 +0200
  44. @@ -34,7 +34,7 @@
  45. uint16_pack_big(buf,49152 + name_ptr[i]);
  46. return response_addbytes(buf,2);
  47. }
  48. - if (dlen <= 128)
  49. + if ((dlen <= 128) && (response_len < 16384))
  50. if (name_num < NAMES) {
  51. byte_copy(name[name_num],dlen,d);
  52. name_ptr[name_num] = response_len;