# CVE-2024-1298: Integer Overflow caused by divide by zero during S3 suspension

> A local attacker can cause a denial of service in EDK2 UEFI firmware by triggering an integer overflow leading to division by zero during S3 sleep.

- **Severity:** Medium 6.0 (`CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 May 2024
- **Updated:** 3 Nov 2025
- **Also known as:** AZL-42336, AZL-42337, AZL-42346, BELL-CVE-2024-1298, DEBIAN-CVE-2024-1298, GHSA-xvcj-qw55-xx42, OESA-2024-1752, RHSA-2024:4747, RHSA-2024:5623, SUSE-SU-2024:4088-1, SUSE-SU-2024:4357-1, SUSE-SU-2025:02516-1, UBUNTU-CVE-2024-1298

## What is CVE-2024-1298?

CVE-2024-1298 is a medium-severity vulnerability in TianoCore edk2, published on 30 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

EDK2 contains a vulnerability when S3 sleep is activated where an Attacker may cause a Division-By-Zero due to a UNIT32 overflow via local access. A successful exploit of this vulnerability may lead to a loss of Availability.

Weakness: CWE-369 (Divide By Zero)

## Which versions are affected by CVE-2024-1298?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `edk2` | Red Hat:rhel_aus:8.6::appstream | All versions | 0:20220126gitbb1bba3d77-2.el8_6.5 |
| `edk2-ovmf` | Red Hat:rhel_aus:8.6::appstream | All versions | 0:20220126gitbb1bba3d77-2.el8_6.5 |
| `edk2` | Red Hat:rhel_e4s:8.6::appstream | All versions | 0:20220126gitbb1bba3d77-2.el8_6.5 |
| `edk2-aarch64` | Red Hat:rhel_e4s:8.6::appstream | All versions | 0:20220126gitbb1bba3d77-2.el8_6.5 |
| `edk2-ovmf` | Red Hat:rhel_e4s:8.6::appstream | All versions | 0:20220126gitbb1bba3d77-2.el8_6.5 |
| `edk2` | Red Hat:rhel_eus:8.8::appstream | All versions | 0:20220126gitbb1bba3d77-4.el8_8.4 |
| `edk2-aarch64` | Red Hat:rhel_eus:8.8::appstream | All versions | 0:20220126gitbb1bba3d77-4.el8_8.4 |
| `edk2-ovmf` | Red Hat:rhel_eus:8.8::appstream | All versions | 0:20220126gitbb1bba3d77-4.el8_8.4 |
| `edk2` | Red Hat:rhel_tus:8.6::appstream | All versions | 0:20220126gitbb1bba3d77-2.el8_6.5 |
| `edk2-ovmf` | Red Hat:rhel_tus:8.6::appstream | All versions | 0:20220126gitbb1bba3d77-2.el8_6.5 |
| `ovmf` | SUSE:Linux Enterprise Micro 5.1 | All versions | 202008-150300.10.23.1 |
| `ovmf` | SUSE:Linux Enterprise Micro 5.2 | All versions | 202008-150300.10.23.1 |
| `ovmf` | SUSE:Linux Enterprise Micro 5.5 | All versions | 202208-150500.6.3.1 |
| `ovmf` | SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 202208-150500.6.3.1 |
| `ovmf` | SUSE:Linux Enterprise Module for Package Hub 15 SP6 | All versions | 202308-150600.5.19.1 |
| `ovmf` | SUSE:Linux Enterprise Module for Server Applications 15 SP5 | All versions | 202208-150500.6.3.1 |
| `ovmf` | SUSE:Linux Enterprise Module for Server Applications 15 SP6 | All versions | 202308-150600.5.19.1 |
| `ovmf` | openSUSE:Leap 15.5 | All versions | 202208-150500.6.3.1 |
| `ovmf` | openSUSE:Leap 15.6 | All versions | 202308-150600.5.19.1 |
| `ovmf` | openSUSE:Leap Micro 5.5 | All versions | 202208-150500.6.3.1 |

## How do I fix CVE-2024-1298?

Apply the vendor's patch.

## Is CVE-2024-1298 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1298 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-1298 and fix it if it is affected.

What it is: CVE-2024-1298 is a medium-severity vulnerability in TianoCore edk2, published on 30 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1298 exists.

Affected product: TianoCore edk2. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-1298/ (Markdown: https://insights.sbomify.com/CVE-2024-1298/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-1298
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-1298
- OSV: https://osv.dev/vulnerability/CVE-2024-1298

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-1298/
Summaries are generated and may contain mistakes; the official description above is the record.
