Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add advisories for numeric bugs in GHC #214

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions advisories/ghc/ghc/HSEC-2024-0007.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
```toml
[advisory]
id = "HSEC-2024-0007"
cwe = [194]
keywords = ["integrity", "dos", "historical"]

[[affected]]
ghc-component = "ghc"
cvss = "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H"

[[affected.versions]]
introduced = "9.2.4"
fixed = "9.2.5"

[[affected.versions]]
introduced = "9.4.2"
fixed = "9.4.3"

[[references]]
type = "REPORT"
url = "https://gitlab.haskell.org/ghc/ghc/-/issues/22282"

[[references]]
type = "FIX"
url = "https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9152"

[[references]]
type = "FIX"
url = "https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9139"
```

# Sign extension error in the AArch64 NCG

Arithmetic operations may result in incorrect runtime results on the native aarch64 backend.
For the most part, this bug only causes availability and data integrity issues.
However, in some circumstances, it may result in other, more complicated security related flaws, such as buffer overflow conditions.
35 changes: 35 additions & 0 deletions advisories/ghc/ghc/HSEC-2024-0008.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
```toml
[advisory]
id = "HSEC-2024-0008"
cwe = [194]
keywords = ["integrity", "dos"]

[[affected]]
ghc-component = "ghc"
cvss = "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H"

[[affected.versions]]
introduced = "9.2.1"
fixed = "9.6.6"

[[affected.versions]]
introduced = "9.8.1"
fixed = "9.8.3"

[[affected.versions]]
introduced = "9.10.1"

[[references]]
type = "REPORT"
url = "https://gitlab.haskell.org/ghc/ghc/-/issues/23034"

[[references]]
type = "FIX"
url = "https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12885"
```

# Sign extension error in the PPC64le FFI

Numeric arguments of FFI call on the PPC64le backend may result in incorrect runtime values.
For the most part, this bug only causes availability and data integrity issues.
However, in some circumstances, it may result in other, more complicated security related flaws, such as buffer overflow conditions.
41 changes: 41 additions & 0 deletions advisories/hackage/base/HSEC-2024-0006.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
```toml
[advisory]
id = "HSEC-2024-0006"
cwe = [192]
keywords = ["integrity", "dos", "historical"]

[[affected]]
package = "base"
cvss = "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H"

[[affected.versions]]
introduced = "4.15.0.0"
fixed = "4.15.1.0"

[[references]]
type = "REPORT"
url = "https://gitlab.haskell.org/ghc/ghc/-/issues/19345"

[[references]]
type = "REPORT"
url = "https://gitlab.haskell.org/ghc/ghc/-/issues/20066"

[[references]]
type = "FIX"
url = "https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4980"

[[references]]
type = "FIX"
url = "https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6109"
```

# `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.