{"schema":"threatline.record/2","record":{"id":"CVE-2026-97902","aliases":[],"summary":"fs: don't return -EINVAL for successful nested thaw","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs: don't return -EINVAL for successful nested thaw\n\nCommit 7366f8b6fc6a (\"fs: handle freezing from multiple devices\")\nreplaced the freeze_holders bitmask with per-holder counters to allow\nnested freezes. In the bitmask version, a thaw that released a shared\nhold while another holder remained returned 0. Since the rework,\nthaw_super_locked() drops the freeze reference via freeze_dec() but\nthen returns -EINVAL when other freezers remain, misinforming the\ncaller: the thaw did succeed, the superblock just stays frozen for the\nremaining holders.\n\nThis breaks bdev-initiated freezing. When a filesystem is frozen with\nFIFREEZE and additionally frozen via bdev_freeze() -- which nests by\ndesign, see fs_bdev_freeze() -- the subsequent bdev_thaw() receives\n-EINVAL from the holder op although its freeze reference was dropped,\nand therefore keeps bd_fsfreeze_count elevated. Then device-mapper's\nunlock_fs() ignores bdev_thaw()'s return value, so nothing rebalances\nthe count. After the user's FITHAW and umount, the block device can\nnever be mounted again:\n\n    dm-1: Can't mount, blockdev is frozen\n\nThere is no way for userspace to drop the leaked count; only\ndestroying the block device (or a reboot) recovers the device.\n\nReproducer (any kernel since v6.8):\n\n    dmsetup create dut --table \"0 $(blockdev --getsz \"$DEV\") linear $DEV 0\"\n    mkfs.ext4 /dev/mapper/dut\n    mount /dev/mapper/dut /mnt\n    fsfreeze --freeze /mnt      # freeze_ucount == 1\n    dmsetup suspend dut         # bd_fsfreeze_count == 1, ucount == 2\n    dmsetup resume dut          # ucount 2 -> 1, but thaw_super()\n                                # returns -EINVAL, so bdev_thaw()\n                                # keeps bd_fsfreeze_count at 1\n    fsfreeze --unfreeze /mnt    # filesystem thaws fine\n    umount /mnt\n    mount /dev/mapper/dut /mnt  # EBUSY, forever\n\nThe same happens with fsfreeze held across an LVM snapshot of the\norigin volume.\n\nfs_bdev_thaw()'s documentation already describes the intended\nsemantics: \"If this function returns zero it doesn't mean that the\nfilesystem is unfrozen as it may have been frozen multiple times\".\nRestore them by returning 0 when a nested thaw drops its hold while\nother freezers remain. Thawing without holding a freeze still fails\nwith -EINVAL as may_unfreeze() rejects that case before the reference\ncount is touched.","categories":["Operating systems"],"product":"Linux","vendor":"Linux","ecosystem":null,"affected_ranges":[{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-97902","source_modified_at":"2026-10-19T09:10:28.572Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"Linux","vendor":"Linux","versions":[{"version":"7366f8b6fc6aa21c4199cb5d337b023df69745b0","lessThan":"111339816138f042a59778322f941edc26903484","status":"affected","versionType":"git"},{"version":"7366f8b6fc6aa21c4199cb5d337b023df69745b0","lessThan":"76e478499913dc1f368aebe85b28b7d1265985ff","status":"affected","versionType":"git"},{"version":"7366f8b6fc6aa21c4199cb5d337b023df69745b0","lessThan":"ff2a694f6613d54ebd77ba72583d4d94446f55bd","status":"affected","versionType":"git"},{"version":"7366f8b6fc6aa21c4199cb5d337b023df69745b0","lessThan":"fe967191e5851ea79818c5fe4e781c3882139218","status":"affected","versionType":"git"}],"defaultStatus":"unaffected"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-97902","source_modified_at":"2026-10-19T09:10:28.572Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"Linux","vendor":"Linux","versions":[{"version":"6.8","status":"affected"},{"version":"0","lessThan":"6.8","status":"unaffected","versionType":"semver"},{"version":"6.12.111","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.53","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.2.7","lessThanOrEqual":"7.2.*","status":"unaffected","versionType":"semver"},{"version":"7.3","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"defaultStatus":"affected"}],"fixed_versions":[{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-97902","source_modified_at":"2026-10-19T09:10:28.572Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"Linux","ecosystem":null},"version":"111339816138f042a59778322f941edc26903484","basis":"first unaffected version stated in the CVE record"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-97902","source_modified_at":"2026-10-19T09:10:28.572Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"Linux","ecosystem":null},"version":"76e478499913dc1f368aebe85b28b7d1265985ff","basis":"first unaffected version stated in the CVE record"}],"cvss":null,"severity":null,"kev":{"listed":false},"epss":{"probability":0.002,"percentile":0.0933,"score_date":"2026-10-23"},"published_at":"2026-09-25T10:22:29.259Z","modified_at":"2026-10-19T09:10:28.572Z","provenance":[{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-97902","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-19T09:10:28.572Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-97902","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["CVE List","EPSS"],"references":[{"source":"CVE List","url":"https://git.kernel.org/stable/c/111339816138f042a59778322f941edc26903484"},{"source":"CVE List","url":"https://git.kernel.org/stable/c/76e478499913dc1f368aebe85b28b7d1265985ff"},{"source":"CVE List","url":"https://git.kernel.org/stable/c/ff2a694f6613d54ebd77ba72583d4d94446f55bd"},{"source":"CVE List","url":"https://git.kernel.org/stable/c/fe967191e5851ea79818c5fe4e781c3882139218"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"product","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-19T09:10:28.572Z","content_hash":"94155068e85d9f4d89a60d54077b734d210a8691a4690f600601651059bc6cd7"}}
