{"id":"CVE-2022-50746","state":"PUBLISHED","title":"erofs: validate the extent length for uncompressed pclusters","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: validate the extent length for uncompressed pclusters\n\nsyzkaller reported a KASAN use-after-free:\nhttps://syzkaller.appspot.com/bug?extid=2ae90e873e97f1faf6f2\n\nThe referenced fuzzed image actually has two issues:\n - m_pa == 0 as a non-inlined pcluster;\n - The logical length is longer than its physical length.\n\nThe first issue has already been addressed.  This patch addresses\nthe second issue by checking the extent length validity.","publishedAt":"2025-12-24T13:05:42.628Z","updatedAt":"2026-10-15T21:41:23.468Z","severity":{"score":8.4,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"02827e1796b33f1794966f5c3101f8da2dfa9c1d","status":"affected","lessThan":"dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e","versionType":"git"},{"version":"02827e1796b33f1794966f5c3101f8da2dfa9c1d","status":"affected","lessThan":"40c73b2ea9611b5388807be406f30f5e4e1162da","versionType":"git"},{"version":"02827e1796b33f1794966f5c3101f8da2dfa9c1d","status":"affected","lessThan":"c505feba4c0d76084e56ec498ce819f02a7043ae","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":"4.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.19","versionType":"semver"},{"version":"6.0.16","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1.2","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/dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e","https://git.kernel.org/stable/c/40c73b2ea9611b5388807be406f30f5e4e1162da","https://git.kernel.org/stable/c/c505feba4c0d76084e56ec498ce819f02a7043ae"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50746.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50746","state":"PUBLISHED","datePublished":"2025-12-24T13:05:42.628Z","dateUpdated":"2026-10-15T21:41:23.468Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-24T13:02:21.543Z"},"containers":{"cna":{"title":"erofs: validate the extent length for uncompressed pclusters","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: validate the extent length for uncompressed pclusters\n\nsyzkaller reported a KASAN use-after-free:\nhttps://syzkaller.appspot.com/bug?extid=2ae90e873e97f1faf6f2\n\nThe referenced fuzzed image actually has two issues:\n - m_pa == 0 as a non-inlined pcluster;\n - The logical length is longer than its physical length.\n\nThe first issue has already been addressed.  This patch addresses\nthe second issue by checking the extent length validity."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"02827e1796b33f1794966f5c3101f8da2dfa9c1d","status":"affected","lessThan":"dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e","versionType":"git"},{"version":"02827e1796b33f1794966f5c3101f8da2dfa9c1d","status":"affected","lessThan":"40c73b2ea9611b5388807be406f30f5e4e1162da","versionType":"git"},{"version":"02827e1796b33f1794966f5c3101f8da2dfa9c1d","status":"affected","lessThan":"c505feba4c0d76084e56ec498ce819f02a7043ae","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":"4.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.19","versionType":"semver"},{"version":"6.0.16","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1.2","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/dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e"},{"url":"https://git.kernel.org/stable/c/40c73b2ea9611b5388807be406f30f5e4e1162da"},{"url":"https://git.kernel.org/stable/c/c505feba4c0d76084e56ec498ce819f02a7043ae"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.4,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is reached only after a local EROFS mount and read/mmap/open (z_erofs_read_folio → z_erofs_do_map_blocks → z_erofs_transform_plain); erofs has FS_REQUIRES_DEV and no network-protocol entry into the decompressor.\nAC:L - A crafted image with a PLAIN pcluster whose logical extent length exceeds its physical length deterministically drives outpages > inpages and the oversized memcpy on ordinary file open/read, with no race or attacker-uncontrollable condition.\nPR:N - The attacker only needs to supply the malicious image; mounting is performed by an automated consumer (container/composefs/APEX/OTA image runtime or removable-media automounter) and requires no account or capability on the target.\nUI:N - In those deployments the mount and subsequent open/read (including IMA measurement on open as in the syzbot crash) happen as part of image pull/run or media insertion, with no separate interactive victim step required.\nS:U - The OOB/UAF copy and resulting kernel memory corruption stay within the host kernel's security authority; no VM escape, IOMMU bypass, or other cross-boundary impact occurs.\nC:H - KASAN reports a use-after-free read of 4096 bytes where memcpy copies adjacent/freed kernel memory into the file's page cache, which userspace can then read—an arbitrary kernel-memory disclosure.\nI:H - The same path is a UAF/OOB memory-corruption class bug (and can take the memmove path that writes past the source page), which per kernel guidance enables heap corruption and control-flow hijacking primitives.\nA:H - The demonstrated KASAN use-after-free/out-of-bounds access can oops or panic the kernel even when not fully exploited, which is Availability High under kernel CVSS guidance."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:59:35.903Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.0.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.1.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-50746","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:32:20.485898Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:41:23.468Z"}}]}}}