)]}'
{
  "commit": "a3c812f7cfd80cf51e8f5b7034f7418f6beb56c1",
  "tree": "a242e63ebea632ce64f1745703f43c0357b0c594",
  "parents": [
    "3239b6f29bdfb4b0a2ba59df995fc9e6f4df7f1f"
  ],
  "author": {
    "name": "Eric Biggers",
    "email": "ebiggers@google.com",
    "time": "Thu Nov 02 00:47:12 2017 +0000"
  },
  "committer": {
    "name": "James Morris",
    "email": "james.l.morris@oracle.com",
    "time": "Thu Nov 02 20:58:07 2017 +1100"
  },
  "message": "KEYS: trusted: fix writing past end of buffer in trusted_read()\n\nWhen calling keyctl_read() on a key of type \"trusted\", if the\nuser-supplied buffer was too small, the kernel ignored the buffer length\nand just wrote past the end of the buffer, potentially corrupting\nuserspace memory.  Fix it by instead returning the size required, as per\nthe documentation for keyctl_read().\n\nWe also don\u0027t even fill the buffer at all in this case, as this is\nslightly easier to implement than doing a short read, and either\nbehavior appears to be permitted.  It also makes it match the behavior\nof the \"encrypted\" key type.\n\nFixes: d00a1c72f7f4 (\"keys: add new trusted key-type\")\nReported-by: Ben Hutchings \u003cben@decadent.org.uk\u003e\nCc: \u003cstable@vger.kernel.org\u003e # v2.6.38+\nSigned-off-by: Eric Biggers \u003cebiggers@google.com\u003e\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nReviewed-by: Mimi Zohar \u003czohar@linux.vnet.ibm.com\u003e\nReviewed-by: James Morris \u003cjames.l.morris@oracle.com\u003e\nSigned-off-by: James Morris \u003cjames.l.morris@oracle.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bd85315cbfeb3e1bad3b01e7d9a6538bbb5d3577",
      "old_mode": 33188,
      "old_path": "security/keys/trusted.c",
      "new_id": "98aa89ff7bfd9ed57662116ca455f3a5628ec380",
      "new_mode": 33188,
      "new_path": "security/keys/trusted.c"
    }
  ]
}
