blob: 4ed9d3807cc4ec7e4a8629e83d903c9e7a65f685 [file] [log] [blame] [view]
Tom Cosgrove0b86ac12022-07-29 13:44:01 +01001## Reporting Vulnerabilities
Manuel Pégourié-Gonnarda21abf22021-02-25 11:41:38 +01002
3If you think you have found an Mbed TLS security vulnerability, then please
4send an email to the security team at
5<mbed-tls-security@lists.trustedfirmware.org>.
6
7## Security Incident Handling Process
8
Shaun Case8b0ecbc2021-12-20 21:14:10 -08009Our security process is detailed in our
Gilles Peskinea23df132021-03-16 12:04:44 +010010[security
Manuel Pégourié-Gonnarda21abf22021-02-25 11:41:38 +010011center](https://developer.trustedfirmware.org/w/mbed-tls/security-center/).
12
13Its primary goal is to ensure fixes are ready to be deployed when the issue
14goes public.
15
16## Maintained branches
17
Gilles Peskinea23df132021-03-16 12:04:44 +010018Only the maintained branches, as listed in [`BRANCHES.md`](BRANCHES.md),
19get security fixes.
Manuel Pégourié-Gonnarda21abf22021-02-25 11:41:38 +010020Users are urged to always use the latest version of a maintained branch.
Janos Follath18d41732023-02-24 16:00:21 +000021
22## Threat model
23
24We use the following classification of attacks:
25
26- **Remote Attacks:** The attacker can observe and modify data sent over the
Janos Follath144dd7d2023-03-03 14:56:38 +000027 network. This includes observing the content and timing of individual packets,
28 as well as suppressing or delaying legitimate messages, and injecting messages.
Janos Follath24792d02023-03-03 14:16:12 +000029- **Timing Attacks:** The attacker can gain information about the time taken
30 by certain sets of instructions in Mbed TLS operations.
Janos Follath18d41732023-02-24 16:00:21 +000031- **Physical Attacks:** The attacker has access to physical information about
32 the hardware Mbed TLS is running on and/or can alter the physical state of
33 the hardware.
34
35### Remote attacks
36
Janos Follath144dd7d2023-03-03 14:56:38 +000037Mbed TLS aims to fully protect against remote attacks and to enable the user
38application in providing full protection against remote attacks. Said
39protection is limited to providing security guarantees offered by the protocol
40in question. (For example Mbed TLS alone won't guarantee that the messages will
41arrive without delay, as the TLS protocol doesn't guarantee that either.)
Janos Follath18d41732023-02-24 16:00:21 +000042
43### Timing attacks
44
Janos Follath144dd7d2023-03-03 14:56:38 +000045Mbed TLS provides limited protection against timing attacks. The cost of
46protecting against timing attacks widely varies depending on the granularity of
47the measurements and the noise present. Therefore the protection in Mbed TLS is
48limited. We are only aiming to provide protection against publicly documented
49attacks, and this protection is not currently complete.
Janos Follath18d41732023-02-24 16:00:21 +000050
Janos Follath24792d02023-03-03 14:16:12 +000051**Warning!** Block ciphers do not yet achieve full protection. For
Janos Follath18d41732023-02-24 16:00:21 +000052details and workarounds see the section below.
53
54#### Block Ciphers
55
Janos Follath24792d02023-03-03 14:16:12 +000056Currently there are four block ciphers in Mbed TLS: AES, CAMELLIA, ARIA and DES.
Janos Follath144dd7d2023-03-03 14:56:38 +000057The pure software implementation in Mbed TLS implementation uses lookup tables,
58which are vulnerable to timing attacks.
Janos Follath18d41732023-02-24 16:00:21 +000059
60**Workarounds:**
61
62- Turn on hardware acceleration for AES. This is supported only on selected
63 architectures and currently only available for AES. See configuration options
64 `MBEDTLS_AESCE_C`, `MBEDTLS_AESNI_C` and `MBEDTLS_PADLOCK_C` for details.
Janos Follath144dd7d2023-03-03 14:56:38 +000065- Add a secure alternative implementation (typically hardware acceleration) for
66 the vulnerable cipher. See the [Alternative Implementations
67Guide](docs/architecture/alternative-implementations.md) for more information.
68- Use cryptographic mechanisms that are not based on block ciphers. In
69 particular, for authenticated encryption, use ChaCha20/Poly1305 instead of
70 block cipher modes. For random generation, use HMAC\_DRBG instead of CTR\_DRBG.
Janos Follath18d41732023-02-24 16:00:21 +000071
72### Physical attacks
73
Janos Follath144dd7d2023-03-03 14:56:38 +000074Physical attacks are out of scope (eg. power analysis or radio emissions). Any
75attack using information about or influencing the physical state of the
76hardware is considered physical, independently of the attack vector. (For
77example Row Hammer and Screaming Channels are considered physical attacks.) If
78physical attacks are present in a use case or a user application's threat
79model, it needs to be mitigated by physical countermeasures.