# CVE-2022-49785: x86/sgx: Add overflow check in sgx_validate_offset_length()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-05-01T14:09:18.311Z
- Modified: 2026-06-17T05:19:08.540Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

x86/sgx: Add overflow check in sgx_validate_offset_length()

sgx_validate_offset_length() function verifies "offset" and "length"
arguments provided by userspace, but was missing an overflow check on
their addition. Add it.

(As written by CVE List.)

## Affected

- Linux Linux: from c6d26d370767fa227fc44b98a8bdad112efdf563 before 5277e3d633a5d4157987f4aff068caa55e36db19; from c6d26d370767fa227fc44b98a8bdad112efdf563 before 3b1c10fb754b0b67165e3f055a4208e5ba26dc89; from c6d26d370767fa227fc44b98a8bdad112efdf563 before f0861f49bd946ff94fce4f82509c45e167f63690; 5.11 (not affected: before 5.11; from 5.15.81 up to 5.15.*; from 6.0.10 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 5.11 before 5.15.81; from 5.16 before 6.0.10; 6.1

## References

- <https://git.kernel.org/stable/c/5277e3d633a5d4157987f4aff068caa55e36db19> (patch)
- <https://git.kernel.org/stable/c/3b1c10fb754b0b67165e3f055a4208e5ba26dc89> (patch)
- <https://git.kernel.org/stable/c/f0861f49bd946ff94fce4f82509c45e167f63690> (patch)

## Sources

- CVE List: [CVE-2022-49785](https://www.cve.org/CVERecord?id=CVE-2022-49785), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-49785](https://nvd.nist.gov/vuln/detail/CVE-2022-49785), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-49785 · Whole record: https://cve.day/CVE-2022-49785.json · Rebuilt by cve.day 2026-11-25T22:58:20.869Z
