{
  "id": "CVE-2025-38415",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38415",
  "published_at": "2025-07-25T13:32:09.711Z",
  "title": "Squashfs: check return result of sb_min_blocksize",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nSquashfs: check return result of sb_min_blocksize\n\nSyzkaller reports an \"UBSAN: shift-out-of-bounds in squashfs_bio_read\" bug.\n\nSyzkaller forks multiple processes which after mounting the Squashfs\nfilesystem, issues an ioctl(\"/dev/loop0\", LOOP_SET_BLOCK_SIZE, 0x8000). \nNow if this ioctl occurs at the same time another process is in the\nprocess of mounting a Squashfs filesystem on /dev/loop0, the failure\noccurs.  When this happens the following code in squashfs_fill_super()\nfails.\n\n----\nmsblk-\u003edevblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE);\nmsblk-\u003edevblksize_log2 = ffz(~msblk-\u003edevblksize);\n----\n\nsb_min_blocksize() returns 0, which means msblk-\u003edevblksize is set to 0.\n\nAs a result, ffz(~msblk-\u003edevblksize) returns 64, and msblk-\u003edevblksize_log2\nis set to 64.\n\nThis subsequently causes the\n\nUBSAN: shift-out-of-bounds in fs/squashfs/block.c:195:36\nshift exponent 64 is too large for 64-bit type 'u64' (aka\n'unsigned long long')\n\nThis commit adds a check for a 0 return by sb_min_blocksize().",
  "cwe": "CWE-787",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 0aa666190509ffab81c202c5095a166be23961ac, \u003c db7096ea160e40d78c67fce52e7cc51bde049497",
          "\u003e= 0aa666190509ffab81c202c5095a166be23961ac, \u003c 549f9e3d7b60d53808c98b9fde49b4f46d0524a5",
          "\u003e= 0aa666190509ffab81c202c5095a166be23961ac, \u003c 5c51aa862cbeed2f3887f0382a2708956710bd68",
          "\u003e= 0aa666190509ffab81c202c5095a166be23961ac, \u003c 6abf6b78c6fb112eee495f5636ffcc350dd2ce25",
          "\u003e= 0aa666190509ffab81c202c5095a166be23961ac, \u003c 4f99357dadbf9c979ad737156ad4c37fadf7c56b",
          "\u003e= 0aa666190509ffab81c202c5095a166be23961ac, \u003c 0aff95d9bc7fb5400ca8af507429c4b067bdb425",
          "\u003e= 0aa666190509ffab81c202c5095a166be23961ac, \u003c 295ab18c2dbce8d0ac6ecf7c5187e16e1ac8b282",
          "\u003e= 0aa666190509ffab81c202c5095a166be23961ac, \u003c 734aa85390ea693bb7eaf2240623d41b03705c84"
        ],
        "fixed_in": [
          "db7096ea160e40d78c67fce52e7cc51bde049497",
          "549f9e3d7b60d53808c98b9fde49b4f46d0524a5",
          "5c51aa862cbeed2f3887f0382a2708956710bd68",
          "6abf6b78c6fb112eee495f5636ffcc350dd2ce25",
          "4f99357dadbf9c979ad737156ad4c37fadf7c56b",
          "0aff95d9bc7fb5400ca8af507429c4b067bdb425",
          "295ab18c2dbce8d0ac6ecf7c5187e16e1ac8b282",
          "734aa85390ea693bb7eaf2240623d41b03705c84"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.29"
        ],
        "fixed_in": [
          "0",
          "5.4.295",
          "5.10.239",
          "5.15.186",
          "6.1.142",
          "6.6.94",
          "6.12.34",
          "6.15.3",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to db7096ea160e40d78c67fce52e7cc51bde049497 or 549f9e3d7b60d53808c98b9fde49b4f46d0524a5 or 5c51aa862cbeed2f3887f0382a2708956710bd68 or 6abf6b78c6fb112eee495f5636ffcc350dd2ce25 or 4f99357dadbf9c979ad737156ad4c37fadf7c56b or 0aff95d9bc7fb5400ca8af507429c4b067bdb425 or 295ab18c2dbce8d0ac6ecf7c5187e16e1ac8b282 or 734aa85390ea693bb7eaf2240623d41b03705c84 or later.",
      "Upgrade Linux to 0 or 5.4.295 or 5.10.239 or 5.15.186 or 6.1.142 or 6.6.94 or 6.12.34 or 6.15.3 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
