HSEC-2024-0006 json
fromIntegral: conversion error
published 2025-11-14 11 mo ago modified 2025-11-14 11 mo ago
- cvss
- 6.8
- version 3.1, OSV
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
# `fromIntegral`: conversion error
`fromIntegral` may result in coercion errors when used with optimization flags `-O1` or `-O2` in the following situation:
- Converting negative `Int` to `Natural` does not throw an arithmetic underflow error - Converting large `Integer` greater than 2^64 to `Natural` overflow.
For the most part, these errors in and of themselves result only in availability and data integrity issues. However, in some circumstances, they may result in other, more complicated security related flaws, such as buffer overflow conditions.
Patch / fix
- hackage base 4.15.1.0
- gitlab.haskell.org/ghc/ghc#4980 pull request
- gitlab.haskell.org/ghc/ghc#6109 pull request
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| OSV | 3.1 | 6.8 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| hackage | base | >=4.15.0.0, <4.15.1.0 |
4.15.1.0 |
References
Sources
- OSV HSEC-2024-0006
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.