Skip to content

Commit e697be3

Browse files
joeyhfrasertweedale
authored andcommitted
HSEC-2025-0006: [crypton-]x509-store private key leak
1 parent fb4be11 commit e697be3

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
published/2025/0006.md
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
published/2025/0006.md

advisories/published/2025/0006.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
```toml
2+
[advisory]
3+
id = "HSEC-2025-0006"
4+
keywords = ["crypto"]
5+
cwe = [403]
6+
7+
[[references]]
8+
type = "FIX"
9+
url = "https://github.com/kazu-yamamoto/crypton-certificate/commit/e353d450c381c9d6b903c4257927e0c89c97acb1"
10+
11+
[[affected]]
12+
package = "x509-store"
13+
cvss = "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N"
14+
[[affected.versions]]
15+
introduced = "0.1"
16+
17+
[[affected]]
18+
package = "crypton-x509-store"
19+
cvss = "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N"
20+
[[affected.versions]]
21+
introduced = "1.6.9"
22+
fixed = "1.6.12"
23+
```
24+
25+
# Private key leak via inherited file descriptor
26+
27+
The X.509 key reading function `readKeyFile` opened a file
28+
descriptor to the private key without setting the *close-on-exec*
29+
flag. If a child process is `exec`ed at the same time, it would
30+
inherit that file descriptor and could read the private key
31+
material.
32+
33+
Impact is limited to child processes that run untrusted code, but
34+
that do not close inherited file descriptors. (For example, the
35+
`su(1)` command.)
36+
37+
This leak was fixed by setting the *close-on-exec* flag on
38+
unix-based systems.

0 commit comments

Comments
 (0)