)]}'
{
  "commit": "7af1b41f1f32166259c40a13c0aeebe5c1a8d11c",
  "tree": "11378d14e0944899dac209839d7ec47dae7ef420",
  "parents": [
    "61a1aa72eee09e975f57eea28e1ad3608d6b2024"
  ],
  "author": {
    "name": "Phillip Lougher",
    "email": "phillip@squashfs.org.uk",
    "time": "Mon Apr 08 23:02:06 2024 +0100"
  },
  "committer": {
    "name": "COS Cherry Picker",
    "email": "cloud-image-release@prod.google.com",
    "time": "Fri Mar 14 17:31:59 2025 -0700"
  },
  "message": "Squashfs: check the inode number is not the invalid value of zero\n\ncommit 9253c54e01b6505d348afbc02abaa4d9f8a01395 upstream.\n\nSyskiller has produced an out of bounds access in fill_meta_index().\n\nThat out of bounds access is ultimately caused because the inode\nhas an inode number with the invalid value of zero, which was not checked.\n\nThe reason this causes the out of bounds access is due to following\nsequence of events:\n\n1. Fill_meta_index() is called to allocate (via empty_meta_index())\n   and fill a metadata index.  It however suffers a data read error\n   and aborts, invalidating the newly returned empty metadata index.\n   It does this by setting the inode number of the index to zero,\n   which means unused (zero is not a valid inode number).\n\n2. When fill_meta_index() is subsequently called again on another\n   read operation, locate_meta_index() returns the previous index\n   because it matches the inode number of 0.  Because this index\n   has been returned it is expected to have been filled, and because\n   it hasn\u0027t been, an out of bounds access is performed.\n\nThis patch adds a sanity check which checks that the inode number\nis not zero when the inode is created and returns -EINVAL if it is.\n\nBUG\u003db/401712064\nTEST\u003dpresubmit\nRELEASE_NOTE\u003dFixed CVE-2024-26982 in the Linux kernel.\n\ncos-patch: security-high\n[phillip@squashfs.org.uk: whitespace fix]\n  Link: https://lkml.kernel.org/r/20240409204723.446925-1-phillip@squashfs.org.uk\nLink: https://lkml.kernel.org/r/20240408220206.435788-1-phillip@squashfs.org.uk\nChange-Id: I5192eb9ced052343a296bdc30c0b34e3161681a2\nSigned-off-by: Phillip Lougher \u003cphillip@squashfs.org.uk\u003e\nReported-by: \"Ubisectech Sirius\" \u003cbugreport@ubisectech.com\u003e\nCloses: https://lore.kernel.org/lkml/87f5c007-b8a5-41ae-8b57-431e924c5915.bugreport@ubisectech.com/\nCc: Christian Brauner \u003cbrauner@kernel.org\u003e\nCc: \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Xiangyu Chen \u003cxiangyu.chen@windriver.com\u003e\nSigned-off-by: He Zhe \u003czhe.he@windriver.com\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/95940\nMain-Branch-Verified: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nReviewed-by: Shuo Yang \u003cgshuoy@google.com\u003e\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f31649080a881cf9e33ed055b6f59454fd464ba9",
      "old_mode": 33188,
      "old_path": "fs/squashfs/inode.c",
      "new_id": "95a9ff9e23997569d4f53810cc977764bfa46e24",
      "new_mode": 33188,
      "new_path": "fs/squashfs/inode.c"
    }
  ]
}
