Skip to content

Commit 3b2ec90

Browse files
committed
Updating proposal based on Sep 4th OCP discussion
Signed-off-by: Alex Tzonkov <4975715+attzonko@users.noreply.github.com>
1 parent bc795a6 commit 3b2ec90

File tree

2 files changed

+44
-53
lines changed

2 files changed

+44
-53
lines changed

Documentation/corim_profile/examples/ocp-safe-sfr-fw-example.diag

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,42 +55,32 @@
5555
/ comid.mval / 1 : { / measurement-values-map /
5656
/ ocp-safe-sfr / 1029 : {
5757
/ 0: review-framework-version / 0: "1.1",
58-
/ 1: methodology / 1: 0, / 0: whitebox, 1: blackbox /
58+
/ 1: report-version / 1: "1.2",
5959
/ 2: completion-date / 2: 1(1687651200),
6060
/ 3: scope-number / 3: 1,
61-
/ 4: device-category / 4: 0, / 0: storage, 1: network, 2: gpu, 3: cpu, 4: apu, 5: bmc /
62-
/ 5: repo-tag / 5: "release_v1_2_3",
63-
/ 6: fw-version / 6: {
61+
/ 4: fw-version / 4: [{
6462
/ version / 0: "1.2.3",
6563
/ version-scheme / 1: "semver"
66-
},
67-
/ 7: fw-file-digests / 7: [ [
68-
/ hash-alg-id / -43, / sha384 /
69-
/ hash-value / h'cd484defa77e8c3e4a8dd73926e32365ea0dbd01e4eff017f211d4629cfcd8e4890dd66ab1bded9be865cd1c849800d4'
70-
],
71-
[
72-
/ hash-alg-id / -44, / sha512 /
73-
/ hash-value / h'84635baabc039a8c74aed163a8deceab8777fed32dc925a4a8dacfd478729a7b6ab1cb91d7d35b49e2bd007a80ae16f292be3ea2b9d9a88cb3cc8dff6a216988'
74-
]
75-
],
76-
/ 10: report-version / 10: "1.2",
77-
/ 11: cvss-version / 11: "3.1",
78-
/ 12: issues / 12: [
64+
}],
65+
/ 5: device-category / 5: 0, / 0: storage, 1: network, 2: gpu, 3: cpu, 4: apu, 5: bmc /
66+
/ 6: issues / 6: [
7967
/ issue-entry / {
8068
/ 0: title / 0: "Memory corruption when reading record from SPI flash",
8169
/ 1: cvss-score / 1: "7.9",
8270
/ 2: cvss-vector / 2: "AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:L",
8371
/ 3: cwe / 3: "CWE-111",
84-
/ 4: description / 4: "Due to insufficient input validation in the firmware, a local attacker who tampers with a configuration structure in SPI flash, can cause stack-based memory corruption."
72+
/ 4: description / 4: "Due to insufficient input validation in the firmware, a local attacker who tampers with a configuration structure in SPI flash, can cause stack-based memory corruption.",
73+
/ 5: cvss-version / 5: "3.1"
8574
},
8675
/ issue-entry / {
8776
/ 0: title / 0: "Debug commands enable arbitrary memory read/write",
8877
/ 1: cvss-score / 1: "8.7",
8978
/ 2: cvss-vector / 2: "AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L",
9079
/ 3: cwe / 3: "CWE-222",
9180
/ 4: description / 4: "The firmware exposes debug command handlers that enable host-side drivers to read and write arbitrary regions of the device's SRAM.",
92-
/ 5: cve / 5: "CVE-2014-10000"
93-
}
81+
/ 5: cvss-version / 5: "3.1",
82+
/ 6: cve / 6: "CVE-2014-10000"
83+
}
9484
]
9585
}
9686
}

Documentation/corim_profile/ocp-safe-sfr-profile.cddl

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,46 @@
1-
; Auditor CoRIM – Corim which embeds the SFR fields
2-
; TODO: Register this extension with IANA
1+
; Auditor CoRIM – Corim whch embeds the SFR fields
2+
; TODO: Register this extension with IANA
33

44
$$measurement-values-map-extension //= (
5-
&(ocp-safe-sfr: 1029) => ocp-safe-sfr-map
5+
&(ocp-safe-sfr: 1029) => ocp-safe-sfr-map ; FIXME: Using 1029 below as placeholder
66
)
77

88
ocp-safe-sfr-map = {
9-
&(review-framework-version: 0) => tstr
10-
&(methodology: 1) => $methodology
11-
&(completion-date: 2) => time
12-
&(scope-number: 3) => integer
13-
? &(device-category: 4) => $device-category
14-
? &(repo-tag: 5) => tstr
15-
? &(fw-version: 6) => version-map
16-
? &(fw-file-digests: 7) => digests-type
17-
? &(manifest-digest: 8) => digest
18-
? &(manifest: 9) => [ + manifest-entry ]
19-
? &(report-version: 10) => tstr
20-
? &(cvss-version: 11) => tstr
21-
? &(issues: 12) => [ + issue-entry ]
9+
&(review-framework-version: 0) => tstr
10+
&(report-version: 1) => tstr
11+
&(completion-date: 2) => time
12+
&(scope-number: 3) => integer
13+
&(fw-identifiers: 4) => [ + $fw-identifier ]
14+
? &(device-category: 5) => $device-category
15+
? &(issues: 6) => [ + issue-entry ]
2216
* $$ocp-safe-sfr-ext
2317
}
2418

25-
$methodology /= whitebox
26-
$methodology /= blackbox
19+
; TODO: Extend with additional schemes
20+
issue-entry = {
21+
&(title: 0) => tstr
22+
&(cvss-score: 1) => tstr
23+
&(cvss-vector: 2) => tstr
24+
&(cwe: 3) => tstr
25+
&(description: 4) => tstr
26+
? &(cvss-version: 5) => tstr
27+
? &(cve: 6) => tstr
28+
}
29+
30+
$fw-identifier /= version-map
31+
$fw-identifier /= digests-type
32+
$fw-identifier /= tstr
33+
$fw-identifier /= src-manifest
2734

28-
whitebox = 0
29-
blackbox = 1
35+
manifest-entry = {
36+
&(filename: 0) => tstr
37+
&(file-hash: 1) => digest
38+
}
39+
40+
src-manifest = {
41+
&(manifest-digest: 0) => digest
42+
&(manifest: 1) => [ + manifest-entry ]
43+
}
3044

3145
$device-category /= storage
3246
$device-category /= network
@@ -42,16 +56,3 @@ cpu = 3
4256
apu = 4
4357
bmc = 5
4458

45-
issue-entry = {
46-
&(title: 0) => tstr
47-
&(cvss-score: 1) => tstr
48-
&(cvss-vector: 2) => tstr
49-
&(cwe: 3) => tstr
50-
&(description: 4) => tstr
51-
? &(cve: 5) => tstr
52-
}
53-
54-
manifest-entry = {
55-
&(filename: 0) => tstr,
56-
&(file-hash: 1) => digest
57-
}

0 commit comments

Comments
 (0)