Repository navigation
Expand file tree
/
Copy pathsecurity.sdoc
More file actions
1461 lines (1357 loc) · 51.5 KB
/
Copy pathsecurity.sdoc
File metadata and controls
1461 lines (1357 loc) · 51.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[DOCUMENT]
TITLE: Safe Kiln Controller, Security Concept
UID: SAFEKILN-SECURITY
VERSION: 0.1 (draft)
DATE: 2026-10-09
OPTIONS:
MARKUP: Markdown
VIEW_STYLE: Table
NODE_IN_TOC: True
METADATA:
SPDX-FileCopyrightText: 2026 Bitcrush Testing
SPDX-License-Identifier: GPL-3.0-or-later
Status: For review
Project: Safe Kiln Controller, PID kiln controller
[GRAMMAR]
ELEMENTS:
- TAG: TEXT
FIELDS:
- TITLE: STATEMENT
TYPE: String
REQUIRED: True
- TAG: SECTION
PROPERTIES:
IS_COMPOSITE: True
FIELDS:
- TITLE: UID
TYPE: String
REQUIRED: False
- TITLE: TITLE
TYPE: String
REQUIRED: True
- TAG: ASSET
FIELDS:
- TITLE: UID
TYPE: String
REQUIRED: True
- TITLE: STATEMENT
TYPE: String
REQUIRED: True
- TITLE: WHY_IT_MATTERS
TYPE: String
REQUIRED: False
- TAG: ADVERSARY
FIELDS:
- TITLE: UID
TYPE: String
REQUIRED: True
- TITLE: STATEMENT
TYPE: String
REQUIRED: True
- TITLE: CAPABILITY
TYPE: String
REQUIRED: False
- TITLE: REALISTIC
TYPE: String
REQUIRED: False
- TAG: THREAT
FIELDS:
- TITLE: UID
TYPE: String
REQUIRED: True
- TITLE: STATEMENT
TYPE: String
REQUIRED: True
- TITLE: VIA
TYPE: String
REQUIRED: False
- TITLE: CONSEQUENCE
TYPE: String
REQUIRED: False
- TITLE: SAFETY_RELEVANT
TYPE: SingleChoice(Yes, Indirect, No, Closed)
REQUIRED: True
- TITLE: STATUS
TYPE: SingleChoice(Active, Withdrawn, Superseded, Reversed, Resolved)
REQUIRED: True
- TITLE: COMMENT
TYPE: String
REQUIRED: False
RELATIONS:
- TYPE: Parent
ROLE: Threatens
REVERSE_ROLE: Threatened by
- TYPE: Parent
ROLE: Exploited by
REVERSE_ROLE: Exploits
- TYPE: Parent
ROLE: Reaches
REVERSE_ROLE: Reached by
- TYPE: Child
ROLE: Closed by
REVERSE_ROLE: Closes
- TAG: SECURITY_GOAL
FIELDS:
- TITLE: UID
TYPE: String
REQUIRED: True
- TITLE: STATEMENT
TYPE: String
REQUIRED: True
- TITLE: IMPLEMENTATION
TYPE: SingleChoice(Built, Partial, Spec, Absent, NotNeeded)
REQUIRED: True
- TITLE: STATUS
TYPE: SingleChoice(Active, Withdrawn, Superseded, Reversed, Resolved)
REQUIRED: True
- TITLE: COMMENT
TYPE: String
REQUIRED: False
RELATIONS:
- TYPE: Parent
ROLE: Addresses
REVERSE_ROLE: Addressed by
- TYPE: Child
ROLE: Realised by
REVERSE_ROLE: Realises
- TAG: OPEN_QUESTION
FIELDS:
- TITLE: UID
TYPE: String
REQUIRED: True
- TITLE: STATEMENT
TYPE: String
REQUIRED: True
- TITLE: STATUS
TYPE: SingleChoice(Active, Withdrawn, Superseded, Reversed, Resolved)
REQUIRED: True
- TITLE: COMMENT
TYPE: String
REQUIRED: False
RELATIONS:
- TYPE: Parent
ROLE: Would settle
REVERSE_ROLE: Settled by
- TAG: SECURITY_RESIDUAL_RISK
FIELDS:
- TITLE: UID
TYPE: String
REQUIRED: True
- TITLE: STATEMENT
TYPE: String
REQUIRED: True
- TITLE: WHY_IT_STANDS
TYPE: String
REQUIRED: False
- TITLE: CARRIED_BY
TYPE: String
REQUIRED: False
- TITLE: MITIGATION
TYPE: String
REQUIRED: False
- TITLE: STATUS
TYPE: SingleChoice(Active, Withdrawn, Superseded, Reversed, Resolved)
REQUIRED: True
RELATIONS:
- TYPE: Parent
ROLE: Remains under
REVERSE_ROLE: Leaves residual risk
- TYPE: Parent
ROLE: Remains against
REVERSE_ROLE: Leaves residual risk
[TEXT]
STATEMENT: >>>
The assets worth attacking, who would attack them, how, the goals that answer
each threat, and the risk that remains.
These were five markdown tables in [`security.md`](security.md), promoted here
for the reason the architecture decisions and the hazards went to
[`04_software_arch.sdoc`](04_software_arch.sdoc) and [`safety.sdoc`](safety.sdoc): they
are the part of the concept that has identity. Forty-eight stable IDs with a
chain between them that was previously kept by hand in an appendix.
The chain is now relations the build checks:
- `Threatens` from each threat to the asset it is aimed at, and `Exploited by`
to the adversary who can mount it,
- `Reaches` from a threat to the **safety hazard** it arrives at, which is the
claim this document exists to make and the one that was hardest to see:
[`HZ-12`](safety.sdoc) is a node now, so "a security compromise of this device
is a safety event" is a link rather than a sentence,
- `Addresses` from each security goal to the threats it answers, and
`Realised by` to the requirements behind it,
- `Remains under` from each residual risk to the goal that leaves it.
Two fields carry what the markdown carried as typography, and both are worth
more as fields.
**STATUS** replaces strikethrough. Four threats, two goals and one residual risk
were closed or dissolved by the read-only decision of 2026-10-06, and in the
markdown that was a `~~struck-through heading~~` plus a sentence. It is now
`Resolved` or `Withdrawn`, which can be filtered, counted and reported on. A
closed threat is kept rather than deleted: the reasoning for why it is closed is
the most useful thing about it, and a reader who finds the ID in an old commit
should land on an explanation.
**IMPLEMENTATION** replaces the `[built]` / `[partial]` / `[spec]` / `[absent]`
marks on the goals. `security.md` says the preponderance of `[spec]` is the
single most important fact in it; a typed field makes that countable instead of
a thing a reader has to notice.
Everything else stays in [`security.md`](security.md): the scope, the trust
boundary diagram, section 7 on security as a safety concern, what the
implementation already gets right, the obligations, the verification status and
the open questions. The trust boundaries `B-1` to `B-6` stay there too, and that
is a decision rather than an omission: they are the legend of the diagram
immediately above them, they carry no chain through them, and splitting a legend
from its picture helps nobody.
A reconciliation, stated because it changed what some relations say. The
appendix tables at the end of `security.md` were not updated by the 2026-10-06
read-only change, while sections 5, 6 and 9 were, so the two disagreed. Where
they disagree the body is taken as authoritative. The consequence is visible
and deliberate: with `SEC-01` and `SEC-04` withdrawn, the threats the stale
appendix routed through them ([LINK: TH-08] and [LINK: TH-11]) now have no
security goal at all, and so does [LINK: TH-13], which never had one. That is a
real gap, and naming it is better than inheriting a mapping to a goal that no
longer exists.
<<<
[[SECTION]]
UID: SECURITY-1
TITLE: 1. Assets
[TEXT]
STATEMENT: >>>
What is worth attacking, in the order an attacker would care about.
<<<
[ASSET]
UID: A-1
STATEMENT: >>>
**Control of the heater.**
<<<
WHY_IT_MATTERS: >>>
The kiln is a multi-kilowatt mains heater reaching 1350 °C. This is the asset; everything else is a means to it.
<<<
[ASSET]
UID: A-2
STATEMENT: >>>
**The safety configuration.**
<<<
WHY_IT_MATTERS: >>>
Maximum chamber temperature, runaway thresholds, current limits. Loosening these does not start a fire by itself, but it removes the layer that would stop one.
<<<
[ASSET]
UID: A-3
STATEMENT: >>>
**The latched-fault state.**
<<<
WHY_IT_MATTERS: >>>
A latched fault is the mechanism that keeps a failed kiln off ([LINK: SWR-SAF-17]). Clearing one remotely re-arms a kiln that something has already gone wrong with.
<<<
[ASSET]
UID: A-4
STATEMENT: >>>
**WiFi credentials.**
<<<
WHY_IT_MATTERS: >>>
`net.wifi_pass` is the user's network password, stored on the device. Its loss is a breach of their network, not merely of this device.
<<<
[ASSET]
UID: A-5
STATEMENT: >>>
**The web password.**
<<<
WHY_IT_MATTERS: >>>
`security.web_password`, guarding [LINK: A-1] to [LINK: A-3]. Removed from the configuration schema on 2026-10-06; the asset is kept because the threats against it are part of why it is gone.
<<<
[ASSET]
UID: A-6
STATEMENT: >>>
**The firmware image.**
<<<
WHY_IT_MATTERS: >>>
Write access to it is total and persistent control of [LINK: A-1].
<<<
[ASSET]
UID: A-7
STATEMENT: >>>
**Firing programs and run history.**
<<<
WHY_IT_MATTERS: >>>
Commercially meaningful to a production potter; the lowest-value asset here, and the only one whose loss is purely a privacy matter.
<<<
[[/SECTION]]
[[SECTION]]
UID: SECURITY-2
TITLE: 2. Adversaries
[ADVERSARY]
UID: ADV-1
STATEMENT: >>>
**Another device on the LAN**: a compromised IoT gadget, a guest laptop, malware on a household machine.
<<<
CAPABILITY: >>>
Full IP access to the device; no credentials.
<<<
REALISTIC: >>>
**Yes.** This is the normal case and the one [LINK: SYS-ASM-05] quietly assumes away.
<<<
[ADVERSARY]
UID: ADV-2
STATEMENT: >>>
**A malicious web page** the operator visits while on the same LAN.
<<<
CAPABILITY: >>>
Can make cross-origin requests from the operator's browser; can attempt DNS rebinding to defeat the same-origin policy.
<<<
REALISTIC: >>>
**Yes**, and it needs no LAN foothold at all.
<<<
[ADVERSARY]
UID: ADV-3
STATEMENT: >>>
**Someone with brief physical access**: a shared studio, a classroom, a workshop.
<<<
CAPABILITY: >>>
UART, JTAG, flash readout, reflash.
<<<
REALISTIC: >>>
**Yes**, given where kilns live.
<<<
[ADVERSARY]
UID: ADV-4
STATEMENT: >>>
**A later owner** of a second-hand or disposed device.
<<<
CAPABILITY: >>>
Everything in flash.
<<<
REALISTIC: >>>
**Yes**, and nobody thinks about it.
<<<
[ADVERSARY]
UID: ADV-5
STATEMENT: >>>
**An attacker from the internet.**
<<<
CAPABILITY: >>>
Only if the user port-forwards or the router is compromised.
<<<
REALISTIC: >>>
Only through a user error that the documentation must argue against.
<<<
[ADVERSARY]
UID: ADV-6
STATEMENT: >>>
**A supply-chain attacker** on a dependency.
<<<
CAPABILITY: >>>
Code execution in the image.
<<<
REALISTIC: >>>
Low: dependencies are ESP-IDF itself plus one pinned managed component (`espressif/mdns`, Apache-2.0), with the content hash in a committed `dependencies.lock`; web assets are vendored, not fetched. [LINK: UR-CON-04] holds the conditions. A compromise of the registry therefore has to produce the hash that is already in the repository, and the upstream of the pinned version remains a path in.
<<<
[[/SECTION]]
[[SECTION]]
UID: SECURITY-3
TITLE: 3. Threats
[TEXT]
STATEMENT: >>>
Rated by consequence, not likelihood. A `Reaches` relation to a hazard means the
threat arrives at [`safety.sdoc`](safety.sdoc)'s analysis and therefore at
everything behind it; `SAFETY_RELEVANT` says so in a field as well, because the
distinction between "yes", "indirectly" and "closed" is the one a reader scans
for.
<<<
[THREAT]
UID: TH-01
STATEMENT: >>>
**Unauthenticated command execution.**
<<<
CONSEQUENCE: >>>
Would have been direct control of the heater.
<<<
SAFETY_RELEVANT: Closed
STATUS: Resolved
COMMENT: >>>
**Closed by [LINK: SWR-WEB-26].** No network route can start a firing, abort one or command manual duty; the handlers are deleted, not disabled.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-1
ROLE: Threatens
- TYPE: Parent
VALUE: HZ-12
ROLE: Reaches
- TYPE: Child
VALUE: SWR-WEB-26
ROLE: Closed by
[THREAT]
UID: TH-02
STATEMENT: >>>
**Loosening the safety configuration.**
<<<
CONSEQUENCE: >>>
Would have removed the layer that stops a runaway rather than starting one.
<<<
SAFETY_RELEVANT: Closed
STATUS: Resolved
COMMENT: >>>
**Closed by [LINK: SWR-WEB-26].** `/api/config` is read-only; the maximum temperature and every safety threshold are writable only at the kiln. [LINK: SWR-SAF-22] and [LINK: SWR-SAF-23] bounded the damage even before that, which is the point section 7 of [`security.md`](security.md) makes about bounds doing security work.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-2
ROLE: Threatens
- TYPE: Parent
VALUE: HZ-02
ROLE: Reaches
- TYPE: Parent
VALUE: HZ-10
ROLE: Reaches
- TYPE: Child
VALUE: SWR-WEB-26
ROLE: Closed by
[THREAT]
UID: TH-03
STATEMENT: >>>
**Clearing a latched fault remotely.**
<<<
CONSEQUENCE: >>>
Would have re-armed a kiln that something had already gone wrong with.
<<<
SAFETY_RELEVANT: Closed
STATUS: Resolved
COMMENT: >>>
**Closed by [LINK: SWR-WEB-26].** Acknowledgement happens in front of the kiln. The fault stays readable, which is what the banner needs. [LINK: SWR-SAF-18] blunted it regardless: a fault cannot be cleared while its condition is still observably true, so an attacker could clear a stale fault but not a live one.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-3
ROLE: Threatens
- TYPE: Parent
VALUE: HZ-08
ROLE: Reaches
- TYPE: Child
VALUE: SWR-WEB-26
ROLE: Closed by
[THREAT]
UID: TH-04
STATEMENT: >>>
**Hostile firmware reaching the device.**
<<<
CONSEQUENCE: >>>
Total and persistent control of the heater.
<<<
SAFETY_RELEVANT: Yes
STATUS: Active
COMMENT: >>>
**Closed on 2026-10-06, reopened on 2026-10-09.** [LINK: SWR-UPD-01] used to close this threat absolutely, by accepting no image over the network at all. The Cyber Resilience Act requires that security fixes can reach a unit ([LINK: UR-REG-004]), `OQ-08` answered that with the pull path of [LINK: SWR-UPD-09] onwards, and a threat that is closed by the absence of a feature reopens when the feature arrives. Saying so is the point of keeping the node.
What stands in place of closure is no longer one property but three that have to hold together, and [LINK: SEC-12] is where they are stated: the manifest and the image verify against an **offline** key, nothing on the network can initiate or authorise an install ([LINK: SWR-UPD-08]), and the install waits for a person at the display ([LINK: SWR-UPD-12]). An attacker needs the key **and** somebody at the kiln pressing to confirm.
Kept as one threat rather than split into push and pull, because the asset and the consequence are unchanged and only the route is new.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-6
ROLE: Threatens
- TYPE: Parent
VALUE: HZ-01
ROLE: Reaches
[THREAT]
UID: TH-05
STATEMENT: >>>
**Cross-site request forgery and DNS rebinding.**
<<<
VIA: >>>
[LINK: ADV-2]; the operator's own browser is the confused deputy.
<<<
CONSEQUENCE: >>>
Reduced by [LINK: TH-01] to [LINK: TH-03] being closed, and by [LINK: TH-04] having no inbound route to it: the worst a forged request can now do is **edit a stored firing program**, which takes effect only if an operator starts it at the kiln.
<<<
SAFETY_RELEVANT: Indirect
STATUS: Active
RELATIONS:
- TYPE: Parent
VALUE: A-7
ROLE: Threatens
- TYPE: Parent
VALUE: ADV-2
ROLE: Exploited by
- TYPE: Parent
VALUE: HZ-12
ROLE: Reaches
[THREAT]
UID: TH-06
STATEMENT: >>>
**Credential disclosure from flash.**
<<<
VIA: >>>
[LINK: ADV-3], [LINK: ADV-4], plaintext NVS, no flash encryption.
<<<
CONSEQUENCE: >>>
[LINK: A-4], the user's WiFi password, and [LINK: A-5].
<<<
SAFETY_RELEVANT: No
STATUS: Active
COMMENT: >>>
Not a safety event, but it breaches the user's network rather than only this device.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-4
ROLE: Threatens
- TYPE: Parent
VALUE: A-5
ROLE: Threatens
- TYPE: Parent
VALUE: ADV-3
ROLE: Exploited by
- TYPE: Parent
VALUE: ADV-4
ROLE: Exploited by
[THREAT]
UID: TH-07
STATEMENT: >>>
**Credential disclosure on the wire.**
<<<
VIA: >>>
No TLS; the password crosses the LAN in cleartext on every authenticated request.
<<<
CONSEQUENCE: >>>
[LINK: A-5], observable by [LINK: ADV-1].
<<<
SAFETY_RELEVANT: No
STATUS: Active
RELATIONS:
- TYPE: Parent
VALUE: A-5
ROLE: Threatens
- TYPE: Parent
VALUE: ADV-1
ROLE: Exploited by
[THREAT]
UID: TH-08
STATEMENT: >>>
**Password brute force.**
<<<
VIA: >>>
Repeated requests against the auth check.
<<<
CONSEQUENCE: >>>
[LINK: A-5].
<<<
SAFETY_RELEVANT: No
STATUS: Active
COMMENT: >>>
**Has no security goal.** It was answered by `SEC-04`, which was withdrawn on 2026-10-06 along with the password itself. Arguably it is moot rather than open, since there is nothing left to guess, but it is left Active and unanswered rather than quietly closed: if authentication ever returns, this threat returns with it, and it should be visible when that happens.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-5
ROLE: Threatens
[THREAT]
UID: TH-09
STATEMENT: >>>
**Denial of service**: socket exhaustion, oversized bodies, slow clients.
<<<
VIA: >>>
Boundaries `B-2` and `B-4`; see section 3 of [`security.md`](security.md).
<<<
CONSEQUENCE: >>>
Loss of the web interface. Crucially **not** loss of control: the safety supervisor is a separate task on the other core ([LINK: SWA-15]), and [LINK: SWR-NFR-02] bounds non-safety interference at 50 ms.
<<<
SAFETY_RELEVANT: No
STATUS: Active
COMMENT: >>>
Deliberately carries no `Threatens` relation. The interface is not one of the assets, and the asset an attacker would want, [LINK: A-1], is exactly the one this threat cannot reach.
<<<
[THREAT]
UID: TH-10
STATEMENT: >>>
**Information disclosure through unauthenticated reads.**
<<<
VIA: >>>
Every `GET` is unauthenticated by design.
<<<
CONSEQUENCE: >>>
Telemetry, logs, programs, run history, network status ([LINK: A-7]).
<<<
SAFETY_RELEVANT: No
STATUS: Active
RELATIONS:
- TYPE: Parent
VALUE: A-7
ROLE: Threatens
- TYPE: Parent
VALUE: ADV-1
ROLE: Exploited by
[THREAT]
UID: TH-11
STATEMENT: >>>
**Open provisioning access point.**
<<<
VIA: >>>
The AP fallback of the withdrawn `SWR-NET-02`; if `net.ap_pass` was empty the AP was open.
<<<
CONSEQUENCE: >>>
Anyone in radio range reached the provisioning page and could supply their own credentials.
<<<
SAFETY_RELEVANT: Closed
STATUS: Resolved
COMMENT: >>>
**Closed 2026-10-09 by deleting the access point**, not by giving it a passphrase rule. It never had a security goal: the stale appendix routed it through `SEC-01`, which is withdrawn, and for a while nothing stood against it but [LINK: OQ-S4].
[LINK: SWR-NET-11] and [LINK: SWR-NET-12] move network setup to the local display, so the most security-sensitive surface this device had, a page that exists to accept credentials, reachable by anybody in radio range, is gone rather than guarded. What replaces it needs physical presence, which is the same answer [LINK: SEC-12] gives for firmware and `SEC-00` gives for control.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-4
ROLE: Threatens
- TYPE: Parent
VALUE: HZ-12
ROLE: Reaches
[THREAT]
UID: TH-12
STATEMENT: >>>
**Physical console access.**
<<<
VIA: >>>
UART console.
<<<
CONSEQUENCE: >>>
The simulator build exposes fault injection and direct commands.
<<<
SAFETY_RELEVANT: Yes
STATUS: Active
COMMENT: >>>
On a simulator build only: the console is compile-gated behind `CONFIG_KILN_PLANT_SIM` and is not in a production image. [LINK: SWR-NFR-24] is the requirement behind that.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-1
ROLE: Threatens
- TYPE: Parent
VALUE: ADV-3
ROLE: Exploited by
- TYPE: Parent
VALUE: HZ-12
ROLE: Reaches
[THREAT]
UID: TH-13
STATEMENT: >>>
**mDNS and network reconnaissance.**
<<<
VIA: >>>
`kiln.local` advertised on the LAN ([LINK: SWR-NET-04]).
<<<
CONSEQUENCE: >>>
Makes the device trivially discoverable; a precondition for the rest rather than a threat alone.
<<<
SAFETY_RELEVANT: No
STATUS: Active
COMMENT: >>>
**Has no security goal, and never had one.** Discoverability is accepted: the device is meant to be found by its operator, and `SWR-NET-04` asks for exactly that. Recorded so the acceptance is explicit rather than an omission. Live since 2026-10-09, when mDNS was implemented; the link used to name the withdrawn `SWR-NET-05`, which was the access point's passphrase rule.
<<<
RELATIONS:
- TYPE: Parent
VALUE: ADV-1
ROLE: Exploited by
[THREAT]
UID: TH-14
STATEMENT: >>>
**A hostile or impersonated update service.**
<<<
VIA: >>>
DNS spoofing or interception on the LAN ([LINK: ADV-1]), a compromise of `update.bitcrushtesting.com` or of the release process behind it ([LINK: ADV-6]), or an attacker on the path from the internet ([LINK: ADV-5]).
<<<
CONSEQUENCE: >>>
A manifest or an image of the attacker's choosing, which is [LINK: A-6] and therefore [LINK: A-1]. It fails unless they also hold the offline signing key; with the key, the last obstacle left is the person at the display.
<<<
SAFETY_RELEVANT: Yes
STATUS: Active
COMMENT: >>>
**This is the threat the update path buys, and it is why [LINK: SWR-UPD-11] refuses to lean on TLS.** Certificate validation is required and is not load-bearing: taking over the host, the DNS or the connection gets an attacker as far as *silence*, because what they serve has to verify against a key that is not on the server. Silence is its own problem, a fix that never arrives rather than a hostile one that does, and it is carried as [LINK: SRR-12] rather than pretended away here.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-6
ROLE: Threatens
- TYPE: Parent
VALUE: ADV-5
ROLE: Exploited by
- TYPE: Parent
VALUE: HZ-01
ROLE: Reaches
[THREAT]
UID: TH-15
STATEMENT: >>>
**Downgrade to a release whose vulnerability is published.**
<<<
VIA: >>>
Replaying an older, genuinely signed manifest, or standing up a mirror and getting it into `update.url`.
<<<
CONSEQUENCE: >>>
A unit returned to a version with a known hole, after which the hole is the attack. The signature verifies, because the image is authentic; it is merely old.
<<<
SAFETY_RELEVANT: Indirect
STATUS: Active
COMMENT: >>>
Worth stating separately from [LINK: TH-14] because a signature does not stop a replay, and the usual reflex, "images are signed", does not answer it. [LINK: SWR-UPD-13] does: no image installs unless its version is **strictly greater** than the running one, and the service offers no route to a downgrade. The eFuse anti-rollback counter is deliberately **not** burnt, for the reason `security.md` section 6.2 gives: it would make the counter, rather than the operator, the thing that decides whether a unit can ever be recovered.
<<<
RELATIONS:
- TYPE: Parent
VALUE: A-6
ROLE: Threatens
- TYPE: Parent
VALUE: ADV-1
ROLE: Exploited by
[[/SECTION]]
[[SECTION]]
UID: SECURITY-4
TITLE: 4. Security goals
[TEXT]
STATEMENT: >>>
`IMPLEMENTATION` is what is actually true today, and the marks are not
decoration: most of this is **not built yet**.
- **Built**, implemented and covered by an automated test.
- **Partial**, implemented in the host-testable core, but the piece that would
enforce it on a device does not exist.
- **Spec**, required or designed, no implementation at all.
- **Absent**, not required, not designed, not present. A gap, named as one.
- **NotNeeded**, the threat it would answer cannot occur.
At the time of writing there is **no HTTP transport on the target**. The REST API
is complete and host-tested, but the `esp_http_server` adapter that would
terminate TCP, parse headers, check a password and apply rate limiting is not
started. Nearly every network control here is therefore `Spec`, and that is the
single most important fact in this document.
<<<
[SECURITY_GOAL]
UID: SEC-00
STATEMENT: >>>
**No network request shall change any device state at all.**
<<<
IMPLEMENTATION: Built
STATUS: Active
COMMENT: >>>
Tested: every request other than `GET` returns `403 read_only`, program authoring included since 2026-10-06, and the handlers are **deleted from the image** rather than gated by a flag. This is the strongest control in this document, and the only one that does not depend on the unwritten HTTP transport, because it is enforced in the API layer that *is* written.
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-01
ROLE: Addresses
- TYPE: Parent
VALUE: TH-02
ROLE: Addresses
- TYPE: Parent
VALUE: TH-03
ROLE: Addresses
- TYPE: Parent
VALUE: TH-04
ROLE: Addresses
- TYPE: Parent
VALUE: TH-05
ROLE: Addresses
- TYPE: Child
VALUE: SWR-WEB-26
ROLE: Realised by
[SECURITY_GOAL]
UID: SEC-01
STATEMENT: >>>
Only an authenticated client may change state.
<<<
IMPLEMENTATION: Partial
STATUS: Withdrawn
COMMENT: >>>
**Dissolved 2026-10-06**: no client may change state, authenticated or not, so there is nothing left for authentication to gate. Kept rather than deleted because the route-selection half is still in the code and still worth not losing: `kiln_api_needs_auth` returns true for every non-`GET` method, so a route added later is protected *by default* rather than by somebody remembering to list it. Superseded in substance by [LINK: SEC-00].
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-01
ROLE: Addresses
- TYPE: Parent
VALUE: TH-02
ROLE: Addresses
- TYPE: Parent
VALUE: TH-03
ROLE: Addresses
[SECURITY_GOAL]
UID: SEC-02
STATEMENT: >>>
Credentials are never disclosed through the API.
<<<
IMPLEMENTATION: Built
STATUS: Active
COMMENT: >>>
Tested: `net.wifi_pass`, `net.ap_pass` and `security.web_password` carry `KILN_CFG_F_SECRET`, and the config endpoint returns only whether a secret *is set*, never its value. There is no mode in which it returns one, and the endpoint is generated from the same table that declares the flag, so a new secret field is redacted by construction rather than by a second edit.
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-06
ROLE: Addresses
- TYPE: Child
VALUE: SWR-CFG-07
ROLE: Realised by
[SECURITY_GOAL]
UID: SEC-03
STATEMENT: >>>
Every byte from the network is treated as hostile.
<<<
IMPLEMENTATION: Built
STATUS: Active
COMMENT: >>>
A declared maximum body per handler (2048 B), a bounded token budget (192), a bounded point budget (2000), caller-owned buffers, no allocation proportional to input, and responses streamed in bounded chunks rather than accumulated. Exercised by a fuzz suite and by ASan/UBSan in CI. The firmware contains zero `malloc`/`free`, so an attacker cannot exhaust a heap that does not exist.
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-09
ROLE: Addresses
- TYPE: Child
VALUE: SWR-NFR-19
ROLE: Realised by
[SECURITY_GOAL]
UID: SEC-04
STATEMENT: >>>
Authentication resists guessing and timing analysis.
<<<
IMPLEMENTATION: Spec
STATUS: Withdrawn
COMMENT: >>>
**Dissolved 2026-10-06** with the password itself: there is nothing left to authenticate. This also closed [LINK: SRR-02], which asked whether the password was stored as a salted hash or in plaintext. It leaves [LINK: TH-08] with no goal, which is recorded there rather than hidden here.
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-08
ROLE: Addresses
[SECURITY_GOAL]
UID: SEC-05
STATEMENT: >>>
Only a valid image for this target can be installed, and never mid-firing.
<<<
IMPLEMENTATION: Spec
STATUS: Active
COMMENT: >>>
Note what is *not* required anywhere: a **signature**. See [LINK: SRR-04]. With [LINK: TH-04] closed by removing the network update path entirely, this goal currently has no path to exercise, which is why it remains `Spec` rather than becoming moot: whatever replaces OTA under [LINK: OQ-08] will need it.
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-04
ROLE: Addresses
- TYPE: Child
VALUE: SWR-UPD-02
ROLE: Realised by
- TYPE: Child
VALUE: SWR-UPD-03
ROLE: Realised by
- TYPE: Child
VALUE: SWR-UPD-04
ROLE: Realised by
- TYPE: Child
VALUE: SWR-UPD-08
ROLE: Realised by
[SECURITY_GOAL]
UID: SEC-06
STATEMENT: >>>
The device reveals and transmits nothing to third parties.
<<<
IMPLEMENTATION: Built
STATUS: Active
COMMENT: >>>
Structurally: there is no cloud client, no telemetry and no analytics. This is a property of what was never written, which is why it carries no threat relation: it answers no specific threat and forecloses a category.
**Amended 2026-10-09**, because "no outbound connection in the codebase" stops being true when the update check of [LINK: SWR-UPD-09] is built. The goal survives the change, and it survives on a distinction worth being explicit about rather than comfortable with: the update service is the **manufacturer's own**, not a third party, and the request carries nothing about the device ([LINK: SWR-UPD-10]) because the manifest is static and the version comparison is local. What it unavoidably reveals is an IP address and a time, to the party that sold the unit, and that is carried as [LINK: SRR-13]. The time client is the other outbound connection and the less tidy one, since an NTP server **is** a third party; [LINK: SWR-NFR-21] now says so out loud.
<<<
RELATIONS:
- TYPE: Child
VALUE: SWR-NFR-21
ROLE: Realised by
- TYPE: Child
VALUE: UR-CON-03
ROLE: Realised by
[SECURITY_GOAL]
UID: SEC-07
STATEMENT: >>>
No hidden access.
<<<
IMPLEMENTATION: Built
STATUS: Active
COMMENT: >>>
No hardcoded credentials, no undocumented ports, no default-enabled remote access. Built by inspection; [LINK: SWA-16] reinforces it, because the UI uses only the public API, so there is no privileged back channel to find.
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-10
ROLE: Addresses
- TYPE: Child
VALUE: SWR-NFR-22
ROLE: Realised by
[SECURITY_GOAL]
UID: SEC-08
STATEMENT: >>>
A compromised or overloaded web stack cannot affect control.
<<<
IMPLEMENTATION: Built
STATUS: Active
COMMENT: >>>
[LINK: SWA-15] pins control and safety to core 1 and networking to core 0; [LINK: SWA-13] uses queues and immutable snapshots with no mutex on the control path; [LINK: SWR-NFR-02] bounds interference at 50 ms; [LINK: SWA-04] keeps heat authority in the safety supervisor alone. This is the strongest security property the design has, and it came from the safety work.
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-09
ROLE: Addresses
- TYPE: Child
VALUE: SWR-NFR-02
ROLE: Realised by
- TYPE: Child
VALUE: SWA-13
ROLE: Realised by
- TYPE: Child
VALUE: SWA-15
ROLE: Realised by
- TYPE: Child
VALUE: SWA-04
ROLE: Realised by
[SECURITY_GOAL]
UID: SEC-09
STATEMENT: >>>
Secrets at rest are protected from physical access.
<<<
IMPLEMENTATION: Absent
STATUS: Active
COMMENT: >>>
No flash encryption, no secure boot, neither appears in `sdkconfig.defaults`. Carried as [LINK: SRR-05], and open as [LINK: OQ-S3].
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-06
ROLE: Addresses
- TYPE: Parent
VALUE: TH-12
ROLE: Addresses
[SECURITY_GOAL]
UID: SEC-10
STATEMENT: >>>
Browser-originated requests cannot be forged.
<<<
IMPLEMENTATION: NotNeeded
STATUS: Active
COMMENT: >>>
CSRF matters because a forged request can act; with the interface read-only a forged request can only read, and the reads are public anyway ([LINK: SRR-07]). This is the one gap the read-only decision closed without any code. It is `NotNeeded` rather than `Absent` on that basis, and it reverts to `Absent` the moment any write route returns: [LINK: SRR-06] keeps that visible.
<<<
RELATIONS:
- TYPE: Parent
VALUE: TH-05
ROLE: Addresses
[SECURITY_GOAL]
UID: SEC-11
STATEMENT: >>>