)]}'
{
  "commit": "3af7a2f6102338563cec384e4f80b4bcb81d16ca",
  "tree": "1974ce980a2986c297b63ff1ed35724bb2bbd448",
  "parents": [
    "d492977395503ab74263affc531509f2865b681a"
  ],
  "author": {
    "name": "Todd Kjos",
    "email": "tkjos@google.com",
    "time": "Tue Oct 12 09:56:13 2021 -0700"
  },
  "committer": {
    "name": "Todd Kjos",
    "email": "tkjos@google.com",
    "time": "Thu Nov 11 19:18:33 2021 +0000"
  },
  "message": "BACKPORT: binder: use cred instead of task for selinux checks\n\nSince binder was integrated with selinux, it has passed\n\u0027struct task_struct\u0027 associated with the binder_proc\nto represent the source and target of transactions.\nThe conversion of task to SID was then done in the hook\nimplementations. It turns out that there are race conditions\nwhich can result in an incorrect security context being used.\n\nFix by using the \u0027struct cred\u0027 saved during binder_open and pass\nit to the selinux subsystem.\n\nCc: stable@vger.kernel.org # 5.14 (need backport for earlier stables)\nFixes: 79af73079d75 (\"Add security hooks to binder and implement the hooks for SELinux.\")\nSuggested-by: Jann Horn \u003cjannh@google.com\u003e\nSigned-off-by: Todd Kjos \u003ctkjos@google.com\u003e\nAcked-by: Casey Schaufler \u003ccasey@schaufler-ca.com\u003e\nSigned-off-by: Paul Moore \u003cpaul@paul-moore.com\u003e\nBug: 200688826\n(cherry picked from commit 52f88693378a58094c538662ba652aff0253c4fe)\n[ refactored to avoid changing KMI: struct binder_proc ]\nChange-Id: I1664c1f0c2142c17e9ca0d6790bb94de79f531e3\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2d2457cc07521d67bbfeb6c9364f0565d4842d39",
      "old_mode": 33188,
      "old_path": "drivers/android/binder.c",
      "new_id": "39778af28b2520b9a7c14e1b982d1ddba2031ce7",
      "new_mode": 33188,
      "new_path": "drivers/android/binder.c"
    },
    {
      "type": "modify",
      "old_id": "435a2e22ff95a28e826bb6109729c92c008561f9",
      "old_mode": 33188,
      "old_path": "include/linux/lsm_hook_defs.h",
      "new_id": "37dc5594081d1f93ebd26084a31918acd39eb0db",
      "new_mode": 33188,
      "new_path": "include/linux/lsm_hook_defs.h"
    },
    {
      "type": "modify",
      "old_id": "3af055b7ee1f07b387c976c52e383d358c70cf75",
      "old_mode": 33188,
      "old_path": "include/linux/lsm_hooks.h",
      "new_id": "0ad8aa6579145dfc44504e71dd9d93b2734242c3",
      "new_mode": 33188,
      "new_path": "include/linux/lsm_hooks.h"
    },
    {
      "type": "modify",
      "old_id": "48c6ed9ba086795395f8f7e17f2ed8bb87ca0f61",
      "old_mode": 33188,
      "old_path": "include/linux/security.h",
      "new_id": "9af6bc48c751b9c78fffd5620721c7bcd2deec21",
      "new_mode": 33188,
      "new_path": "include/linux/security.h"
    },
    {
      "type": "modify",
      "old_id": "cf8ddcae1c6b5baeb5e6f44d77eb7094274f9919",
      "old_mode": 33188,
      "old_path": "security/security.c",
      "new_id": "1e0f79c665a34478f301bffa48d6dd9e81139802",
      "new_mode": 33188,
      "new_path": "security/security.c"
    },
    {
      "type": "modify",
      "old_id": "a490c8449cacf9e99920bcb817bf236e3c99f291",
      "old_mode": 33188,
      "old_path": "security/selinux/hooks.c",
      "new_id": "0a18cbc641e3e82e6eb4bbda0622482cf07264a3",
      "new_mode": 33188,
      "new_path": "security/selinux/hooks.c"
    }
  ]
}
