{"id":"CVE-2022-49785","state":"PUBLISHED","title":"x86/sgx: Add overflow check in sgx_validate_offset_length()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/sgx: Add overflow check in sgx_validate_offset_length()\n\nsgx_validate_offset_length() function verifies \"offset\" and \"length\"\narguments provided by userspace, but was missing an overflow check on\ntheir addition. Add it.","publishedAt":"2025-05-01T14:09:18.311Z","updatedAt":"2026-05-11T19:06:44.075Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c6d26d370767fa227fc44b98a8bdad112efdf563","status":"affected","lessThan":"5277e3d633a5d4157987f4aff068caa55e36db19","versionType":"git"},{"version":"c6d26d370767fa227fc44b98a8bdad112efdf563","status":"affected","lessThan":"3b1c10fb754b0b67165e3f055a4208e5ba26dc89","versionType":"git"},{"version":"c6d26d370767fa227fc44b98a8bdad112efdf563","status":"affected","lessThan":"f0861f49bd946ff94fce4f82509c45e167f63690","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kernel/cpu/sgx/ioctl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.81","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.10","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kernel/cpu/sgx/ioctl.c"]}],"references":["https://git.kernel.org/stable/c/5277e3d633a5d4157987f4aff068caa55e36db19","https://git.kernel.org/stable/c/3b1c10fb754b0b67165e3f055a4208e5ba26dc89","https://git.kernel.org/stable/c/f0861f49bd946ff94fce4f82509c45e167f63690"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49785.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49785","state":"PUBLISHED","datePublished":"2025-05-01T14:09:18.311Z","dateUpdated":"2026-05-11T19:06:44.075Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-05-01T14:05:17.223Z"},"containers":{"cna":{"title":"x86/sgx: Add overflow check in sgx_validate_offset_length()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/sgx: Add overflow check in sgx_validate_offset_length()\n\nsgx_validate_offset_length() function verifies \"offset\" and \"length\"\narguments provided by userspace, but was missing an overflow check on\ntheir addition. Add it."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c6d26d370767fa227fc44b98a8bdad112efdf563","status":"affected","lessThan":"5277e3d633a5d4157987f4aff068caa55e36db19","versionType":"git"},{"version":"c6d26d370767fa227fc44b98a8bdad112efdf563","status":"affected","lessThan":"3b1c10fb754b0b67165e3f055a4208e5ba26dc89","versionType":"git"},{"version":"c6d26d370767fa227fc44b98a8bdad112efdf563","status":"affected","lessThan":"f0861f49bd946ff94fce4f82509c45e167f63690","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kernel/cpu/sgx/ioctl.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.81","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.10","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/kernel/cpu/sgx/ioctl.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5277e3d633a5d4157987f4aff068caa55e36db19"},{"url":"https://git.kernel.org/stable/c/3b1c10fb754b0b67165e3f055a4208e5ba26dc89"},{"url":"https://git.kernel.org/stable/c/f0861f49bd946ff94fce4f82509c45e167f63690"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:06:44.075Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.81"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.0.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}