{"id":"CVE-2026-143379","state":"PUBLISHED","title":"btrfs: scrub: fix lost wakeup and hang when cancelling a scrub that is finishing","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: scrub: fix lost wakeup and hang when cancelling a scrub that is finishing\n\nWhen scrub finishes, it does a wakeup on the fs_info->scrub_pause_wait\nwait queue and then sets dev->scrub_sctx to NULL. On the other hand the\nscrub cancel code (btrfs_scrub_cancel_dev()) waits on that wait queue\nfor dev->scrub_sctx to be NULL. So this means if btrfs_scrub_cancel_dev()\nis called right when scrub is finishing and sees the wakeup before the\nNULL is assigned to dev->scrub_sctx by btrfs_scrub_dev(), it hangs.\n\nFix this by doing the wakeup in btrfs_scrub_dev() after setting\ndev->scrub_sctx to NULL.","publishedAt":"2026-12-03T09:22:26.452Z","updatedAt":"2026-12-03T09:22:26.452Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"298319ceee5ce66191b311b6b6d02c2fa0f6502a","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"8690b22c1cdb1d8656f1aee14025b642c93bd522","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"d2b84032dddadbfcaf6818bfc890e7064c2ba692","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"93099408648282c4e0bc4f8b7311215a15e7e3b4","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"679600b3b1460aa715ffbe0c7570bdd5f7b4fde9","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"bda65e5115fe66ee0d8cf4ade11807f9fca4f0e1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/scrub.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.0","versionType":"semver"},{"version":"5.10.276","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/scrub.c"]}],"references":["https://git.kernel.org/stable/c/298319ceee5ce66191b311b6b6d02c2fa0f6502a","https://git.kernel.org/stable/c/8690b22c1cdb1d8656f1aee14025b642c93bd522","https://git.kernel.org/stable/c/d2b84032dddadbfcaf6818bfc890e7064c2ba692","https://git.kernel.org/stable/c/93099408648282c4e0bc4f8b7311215a15e7e3b4","https://git.kernel.org/stable/c/679600b3b1460aa715ffbe0c7570bdd5f7b4fde9","https://git.kernel.org/stable/c/bda65e5115fe66ee0d8cf4ade11807f9fca4f0e1"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143379.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143379","state":"PUBLISHED","datePublished":"2026-12-03T09:22:26.452Z","dateUpdated":"2026-12-03T09:22:26.452Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.372Z"},"containers":{"cna":{"title":"btrfs: scrub: fix lost wakeup and hang when cancelling a scrub that is finishing","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: scrub: fix lost wakeup and hang when cancelling a scrub that is finishing\n\nWhen scrub finishes, it does a wakeup on the fs_info->scrub_pause_wait\nwait queue and then sets dev->scrub_sctx to NULL. On the other hand the\nscrub cancel code (btrfs_scrub_cancel_dev()) waits on that wait queue\nfor dev->scrub_sctx to be NULL. So this means if btrfs_scrub_cancel_dev()\nis called right when scrub is finishing and sees the wakeup before the\nNULL is assigned to dev->scrub_sctx by btrfs_scrub_dev(), it hangs.\n\nFix this by doing the wakeup in btrfs_scrub_dev() after setting\ndev->scrub_sctx to NULL."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"298319ceee5ce66191b311b6b6d02c2fa0f6502a","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"8690b22c1cdb1d8656f1aee14025b642c93bd522","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"d2b84032dddadbfcaf6818bfc890e7064c2ba692","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"93099408648282c4e0bc4f8b7311215a15e7e3b4","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"679600b3b1460aa715ffbe0c7570bdd5f7b4fde9","versionType":"git"},{"version":"a2de733c78fa7af51ba9670482fa7d392aa67c57","status":"affected","lessThan":"bda65e5115fe66ee0d8cf4ade11807f9fca4f0e1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/scrub.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.0","versionType":"semver"},{"version":"5.10.276","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/scrub.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/298319ceee5ce66191b311b6b6d02c2fa0f6502a"},{"url":"https://git.kernel.org/stable/c/8690b22c1cdb1d8656f1aee14025b642c93bd522"},{"url":"https://git.kernel.org/stable/c/d2b84032dddadbfcaf6818bfc890e7064c2ba692"},{"url":"https://git.kernel.org/stable/c/93099408648282c4e0bc4f8b7311215a15e7e3b4"},{"url":"https://git.kernel.org/stable/c/679600b3b1460aa715ffbe0c7570bdd5f7b4fde9"},{"url":"https://git.kernel.org/stable/c/bda65e5115fe66ee0d8cf4ade11807f9fca4f0e1"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:22:26.452Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0","versionEndExcluding":"5.10.276"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0","versionEndExcluding":"5.15.227"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}