{"id":"CVE-2022-49747","state":"PUBLISHED","title":"erofs/zmap.c: Fix incorrect offset calculation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs/zmap.c: Fix incorrect offset calculation\n\nEffective offset to add to length was being incorrectly calculated,\nwhich resulted in iomap->length being set to 0, triggering a WARN_ON\nin iomap_iter_done().\n\nFix that, and describe it in comments.\n\nThis was reported as a crash by syzbot under an issue about a warning\nencountered in iomap_iter_done(), but unrelated to erofs.\n\nC reproducer: https://syzkaller.appspot.com/text?tag=ReproC&x=1037a6b2880000\nKernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=e2021a61197ebe02\nDashboard link: https://syzkaller.appspot.com/bug?extid=a8e049cd3abd342936b6","publishedAt":"2025-03-27T16:42:57.094Z","updatedAt":"2026-05-11T19:05:58.438Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350","status":"affected","lessThan":"2144859229c1e74f52d3ea067338d314a83a8afb","versionType":"git"},{"version":"eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350","status":"affected","lessThan":"9f31d8c889d9a4e47bfcc6c4537d0c9f89fe582c","versionType":"git"},{"version":"eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350","status":"affected","lessThan":"6acd87d50998ef0afafc441613aeaf5a8f5c9eff","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/zmap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.92","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.10","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/zmap.c"]}],"references":["https://git.kernel.org/stable/c/2144859229c1e74f52d3ea067338d314a83a8afb","https://git.kernel.org/stable/c/9f31d8c889d9a4e47bfcc6c4537d0c9f89fe582c","https://git.kernel.org/stable/c/6acd87d50998ef0afafc441613aeaf5a8f5c9eff"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49747.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49747","state":"PUBLISHED","datePublished":"2025-03-27T16:42:57.094Z","dateUpdated":"2026-05-11T19:05:58.438Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-03-27T16:39:17.987Z"},"containers":{"cna":{"title":"erofs/zmap.c: Fix incorrect offset calculation","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs/zmap.c: Fix incorrect offset calculation\n\nEffective offset to add to length was being incorrectly calculated,\nwhich resulted in iomap->length being set to 0, triggering a WARN_ON\nin iomap_iter_done().\n\nFix that, and describe it in comments.\n\nThis was reported as a crash by syzbot under an issue about a warning\nencountered in iomap_iter_done(), but unrelated to erofs.\n\nC reproducer: https://syzkaller.appspot.com/text?tag=ReproC&x=1037a6b2880000\nKernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=e2021a61197ebe02\nDashboard link: https://syzkaller.appspot.com/bug?extid=a8e049cd3abd342936b6"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350","status":"affected","lessThan":"2144859229c1e74f52d3ea067338d314a83a8afb","versionType":"git"},{"version":"eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350","status":"affected","lessThan":"9f31d8c889d9a4e47bfcc6c4537d0c9f89fe582c","versionType":"git"},{"version":"eadcd6b5a1eb39866ab8d8a3e4f2e51bc51a2350","status":"affected","lessThan":"6acd87d50998ef0afafc441613aeaf5a8f5c9eff","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/zmap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.92","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.10","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/zmap.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2144859229c1e74f52d3ea067338d314a83a8afb"},{"url":"https://git.kernel.org/stable/c/9f31d8c889d9a4e47bfcc6c4537d0c9f89fe582c"},{"url":"https://git.kernel.org/stable/c/6acd87d50998ef0afafc441613aeaf5a8f5c9eff"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:05:58.438Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.92"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}