)]}'
{
  "commit": "d9e127ebae508635fed5f76fbc4cb7bad714a758",
  "tree": "54b1523fd7efc9ccca0661803dd129d3143d350e",
  "parents": [
    "70610db043b050d7eca233b51a15e9ff98360100"
  ],
  "author": {
    "name": "Miklos Szeredi",
    "email": "mszeredi@redhat.com",
    "time": "Tue Jan 24 16:41:18 2023 +0100"
  },
  "committer": {
    "name": "Nobel Barakat",
    "email": "nobelbarakat@google.com",
    "time": "Wed Mar 29 17:00:25 2023 +0000"
  },
  "message": "ovl: fail on invalid uid/gid mapping at copy up\n\ncommit 4f11ada10d0ad3fd53e2bd67806351de63a4f9c3 upstream.\n\nIf st_uid/st_gid doesn\u0027t have a mapping in the mounter\u0027s user_ns, then\ncopy-up should fail, just like it would fail if the mounter task was doing\nthe copy using \"cp -a\".\n\nThere\u0027s a corner case where the \"cp -a\" would succeed but copy up fail: if\nthere\u0027s a mapping of the invalid uid/gid (65534 by default) in the user\nnamespace.  This is because stat(2) will return this value if the mapping\ndoesn\u0027t exist in the current user_ns and \"cp -a\" will in turn be able to\ncreate a file with this uid/gid.\n\nThis behavior would be inconsistent with POSIX ACL\u0027s, which return -1 for\ninvalid uid/gid which result in a failed copy.\n\nFor consistency and simplicity fail the copy of the st_uid/st_gid are\ninvalid.\n\nFixes: 459c7c565ac3 (\"ovl: unprivieged mounts\")\nCc: \u003cstable@vger.kernel.org\u003e # v5.11\nSigned-off-by: Miklos Szeredi \u003cmszeredi@redhat.com\u003e\nReviewed-by: Christian Brauner \u003cbrauner@kernel.org\u003e\nReviewed-by: Seth Forshee \u003csforshee@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n\nBUG\u003db/275533776\nTEST\u003dpresubmit\nRELEASE_NOTE\u003dFixed CVE-2023-0386 in overlayfs.\n\ncos-patch: security-high\nChange-Id: I874cda187136a876d7158d412b933769dde6644b\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/45667\nReviewed-by: Vaibhav Rustagi \u003cvaibhavrustagi@google.com\u003e\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e040970408d4ff2b57c3e64518961eacbf66113a",
      "old_mode": 33188,
      "old_path": "fs/overlayfs/copy_up.c",
      "new_id": "ef0bf98b620d725c999e051d1a402200a330d08f",
      "new_mode": 33188,
      "new_path": "fs/overlayfs/copy_up.c"
    }
  ]
}
