)]}'
{
  "commit": "6931dfc9f3f81d148b7ed0ab3fd796f8b986a995",
  "tree": "8c7251413b1243e29dc155fd9590931b423c5e31",
  "parents": [
    "9a936eb928c1a253c2e5d66b947688bdc55094a6"
  ],
  "author": {
    "name": "Eric Paris",
    "email": "eparis@parisplace.org",
    "time": "Thu Jun 30 02:58:51 2005 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@ppc970.osdl.org",
    "time": "Thu Jun 30 08:45:09 2005 -0700"
  },
  "message": "[PATCH] selinux_sb_copy_data() should not require a whole page\n\nCurrently selinux_sb_copy_data requires an entire page be allocated to\n*orig when the function is called.  This \"requirement\" is based on the fact\nthat we call copy_page(in_save, nosec_save) and in_save \u003d orig when the\ndata is not FS_BINARY_MOUNTDATA.  This means that if a caller were to call\ndo_kern_mount with only about 10 bytes of options, they would get passed\nhere and then we would corrupt PAGE_SIZE - 10 bytes of memory (with all\nzeros.)\n\nCurrently it appears all in kernel FS\u0027s use one page of data so this has\nnot been a problem.  An out of kernel FS did just what is described above\nand it would almost always panic shortly after they tried to mount.  From\nlooking else where in the kernel it is obvious that this string of data\nmust always be null terminated.  (See example in do_mount where it always\nzeros the last byte.) Thus I suggest we use strcpy in place of copy_page.\nIn this way we make sure the amount we copy is always less than or equal to\nthe amount we received and since do_mount is zeroing the last byte this\nshould be safe for all.\n\nSigned-off-by: Eric Paris \u003ceparis@parisplace.org\u003e\nCc: Stephen Smalley \u003csds@epoch.ncsc.mil\u003e\nAcked-by: James Morris \u003cjmorris@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "17a1189f1ff81c4a1e9f8686ba4f493cb6c96939",
      "old_mode": 33188,
      "old_path": "security/selinux/hooks.c",
      "new_id": "6be273851144b0840c79f7a100cc53f269a6390d",
      "new_mode": 33188,
      "new_path": "security/selinux/hooks.c"
    }
  ]
}
