)]}'
{
  "commit": "ef4d4b5eb1c59a7fd5d68a8da70462bace5ed0e7",
  "tree": "00c8dbf9676c961c8aad8ca09a2e525ea186edb5",
  "parents": [
    "731c76c1ce0c8b502dff88e72dfff51ba15cec80"
  ],
  "author": {
    "name": "Stefan Berger",
    "email": "stefanb@linux.ibm.com",
    "time": "Mon Oct 02 08:57:33 2023 -0400"
  },
  "committer": {
    "name": "COS Cherry Picker",
    "email": "cloud-image-release@prod.google.com",
    "time": "Mon Dec 18 19:34:00 2023 -0800"
  },
  "message": "fs: Pass AT_GETATTR_NOSEC flag to getattr interface function\n\nCommit 8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf upstream.\n\nWhen vfs_getattr_nosec() calls a filesystem\u0027s getattr interface function\nthen the \u0027nosec\u0027 should propagate into this function so that\nvfs_getattr_nosec() can again be called from the filesystem\u0027s gettattr\nrather than vfs_getattr(). The latter would add unnecessary security\nchecks that the initial vfs_getattr_nosec() call wanted to avoid.\nTherefore, introduce the getattr flag GETATTR_NOSEC and allow to pass\nwith the new getattr_flags parameter to the getattr interface function.\nIn overlayfs and ecryptfs use this flag to determine which one of the\ntwo functions to call.\n\nIn a recent code change introduced to IMA vfs_getattr_nosec() ended up\ncalling vfs_getattr() in overlayfs, which in turn called\nsecurity_inode_getattr() on an exiting process that did not have\ncurrent-\u003efs set anymore, which then caused a kernel NULL pointer\ndereference. With this change the call to security_inode_getattr() can\nbe avoided, thus avoiding the NULL pointer dereference.\n\nBUG\u003db/314212897\nTEST\u003dpresubmit\nRELEASE_NOTE\u003dNone\n\ncos-patch: bug\nReported-by: \u003csyzbot+a67fc5321ffb4b311c98@syzkaller.appspotmail.com\u003e\nFixes: db1d1e8b9867 (\"IMA: use vfs_getattr_nosec to get the i_version\")\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: \u003clinux-fsdevel@vger.kernel.org\u003e\nCc: Miklos Szeredi \u003cmiklos@szeredi.hu\u003e\nCc: Amir Goldstein \u003camir73il@gmail.com\u003e\nCc: Tyler Hicks \u003ccode@tyhicks.com\u003e\nCc: Mimi Zohar \u003czohar@linux.ibm.com\u003e\nSuggested-by: Christian Brauner \u003cbrauner@kernel.org\u003e\nCo-developed-by: Amir Goldstein \u003camir73il@gmail.com\u003e\nSigned-off-by: Stefan Berger \u003cstefanb@linux.ibm.com\u003e\nLink: https://lore.kernel.org/r/20231002125733.1251467-1-stefanb@linux.vnet.ibm.com\nReviewed-by: Amir Goldstein \u003camir73il@gmail.com\u003e\nSigned-off-by: Christian Brauner \u003cbrauner@kernel.org\u003e\n(cherry picked from commit 8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf)\nSigned-off-by: Robert Kolchmeyer \u003crkolchmeyer@google.com\u003e\nChange-Id: I83a788b630f6ad5d49de03cf4614ffa6ccf55355\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/62555\nReviewed-by: Oleksandr Tymoshenko \u003covt@google.com\u003e\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nMain-Branch-Verified: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "16d50dface59abfc03ed0899f91a1b40ac8dd5d2",
      "old_mode": 33188,
      "old_path": "fs/ecryptfs/inode.c",
      "new_id": "437cad7380f7abcda42a56a405e2432550bd6c7d",
      "new_mode": 33188,
      "new_path": "fs/ecryptfs/inode.c"
    },
    {
      "type": "modify",
      "old_id": "65e5e6eb761a9de14bb37606a9ae83eb97447c37",
      "old_mode": 33188,
      "old_path": "fs/overlayfs/inode.c",
      "new_id": "8206eb4e1f7fe414eeb4299a04828c74a5fb8a46",
      "new_mode": 33188,
      "new_path": "fs/overlayfs/inode.c"
    },
    {
      "type": "modify",
      "old_id": "a96b67586f817d9b1943ea1b16699c4221098d58",
      "old_mode": 33188,
      "old_path": "fs/overlayfs/overlayfs.h",
      "new_id": "d06a664d0d70752e74ea2c995d9e6589362233ff",
      "new_mode": 33188,
      "new_path": "fs/overlayfs/overlayfs.h"
    },
    {
      "type": "modify",
      "old_id": "e868e6382b709c7357bb6be78e9fb15bc72d3c00",
      "old_mode": 33188,
      "old_path": "fs/stat.c",
      "new_id": "216dc64a0fb10e3cc34a1853d24ecd4ebd8bbfff",
      "new_mode": 33188,
      "new_path": "fs/stat.c"
    },
    {
      "type": "modify",
      "old_id": "2f86b2ad6d7e9d6bd7478c369dc301899a37a791",
      "old_mode": 33188,
      "old_path": "include/uapi/linux/fcntl.h",
      "new_id": "6b82ad25e3454273c902117209e70670ba2eaa13",
      "new_mode": 33188,
      "new_path": "include/uapi/linux/fcntl.h"
    }
  ]
}
