)]}'
{
  "commit": "38a72e91f4eb0abe9b3c9f5f47a908d7f46681f6",
  "tree": "a30c3a29a99426ee6ce03523f4c1967671286f5c",
  "parents": [
    "9b914de6d97f3b45aed3c8b749dd45b77196e2b7"
  ],
  "author": {
    "name": "Roman Arutyunyan",
    "email": "arut@nginx.com",
    "time": "Tue Jan 26 16:46:59 2016 +0300"
  },
  "committer": {
    "name": "Roman Arutyunyan",
    "email": "arut@nginx.com",
    "time": "Tue Jan 26 16:46:59 2016 +0300"
  },
  "message": "Resolver: fixed use-after-free memory accesses with CNAME.\n\nWhen several requests were waiting for a response, then after getting\na CNAME response only the last request\u0027s context had the name updated.\nContexts of other requests had the wrong name.  This name was used by\nngx_resolve_name_done() to find the node to remove the request context\nfrom.  When the name was wrong, the request could not be properly\ncancelled, its context was freed but stayed linked to the node\u0027s waiting\nlist.  This happened e.g. when the first request was aborted or timed\nout before the resolving completed.  When it completed, this triggered\na use-after-free memory access by calling ctx-\u003ehandler of already freed\nrequest context.  The bug manifests itself by\n\"could not cancel \u003cname\u003e resolving\" alerts in error_log.\n\nWhen a request was responded with a CNAME, the request context kept\nthe pointer to the original node\u0027s rn-\u003eu.cname.  If the original node\nexpired before the resolving timed out or completed with an error,\nthis would trigger a use-after-free memory access via ctx-\u003ename in\nctx-\u003ehandler().\n\nThe fix is to keep ctx-\u003ename unmodified.  The name from context\nis no longer used by ngx_resolve_name_done().  Instead, we now keep\nthe pointer to resolver node to which this request is linked.\nKeeping the original name intact also improves logging.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "54ae2fc0eaa4167f7a2270303935bc41c44376e0",
      "old_mode": 33188,
      "old_path": "src/core/ngx_resolver.c",
      "new_id": "d1beb5812bdbf49847d8f3307777674315300e04",
      "new_mode": 33188,
      "new_path": "src/core/ngx_resolver.c"
    },
    {
      "type": "modify",
      "old_id": "22f249595bf309ef6a16ba71a985c2ebce08635a",
      "old_mode": 33188,
      "old_path": "src/core/ngx_resolver.h",
      "new_id": "07fa25785b5854b9b6db8e2ce2c8baf25d515633",
      "new_mode": 33188,
      "new_path": "src/core/ngx_resolver.h"
    }
  ]
}
