blob: 7981a44b6454b18d7c426d89a5fdae0684dd0d87 [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
Janos Follath18d41732023-02-24 16:00:21 +000026### Remote attacks
27
Janos Follath9ec195c2023-03-06 14:54:59 +000028The attacker can observe and modify data sent over the network. This includes
29observing the content and timing of individual packets, as well as suppressing
30or delaying legitimate messages, and injecting messages.
31
Janos Follath144dd7d2023-03-03 14:56:38 +000032Mbed TLS aims to fully protect against remote attacks and to enable the user
33application in providing full protection against remote attacks. Said
34protection is limited to providing security guarantees offered by the protocol
35in question. (For example Mbed TLS alone won't guarantee that the messages will
36arrive without delay, as the TLS protocol doesn't guarantee that either.)
Janos Follath18d41732023-02-24 16:00:21 +000037
38### Timing attacks
39
Janos Follath9ec195c2023-03-06 14:54:59 +000040The attacker can gain information about the time taken by certain sets of
41instructions in Mbed TLS operations.
42
Janos Follath144dd7d2023-03-03 14:56:38 +000043Mbed TLS provides limited protection against timing attacks. The cost of
44protecting against timing attacks widely varies depending on the granularity of
45the measurements and the noise present. Therefore the protection in Mbed TLS is
46limited. We are only aiming to provide protection against publicly documented
47attacks, and this protection is not currently complete.
Janos Follath18d41732023-02-24 16:00:21 +000048
Janos Follath24792d02023-03-03 14:16:12 +000049**Warning!** Block ciphers do not yet achieve full protection. For
Janos Follath18d41732023-02-24 16:00:21 +000050details and workarounds see the section below.
51
52#### Block Ciphers
53
Janos Follath24792d02023-03-03 14:16:12 +000054Currently there are four block ciphers in Mbed TLS: AES, CAMELLIA, ARIA and DES.
Janos Follath144dd7d2023-03-03 14:56:38 +000055The pure software implementation in Mbed TLS implementation uses lookup tables,
56which are vulnerable to timing attacks.
Janos Follath18d41732023-02-24 16:00:21 +000057
58**Workarounds:**
59
60- Turn on hardware acceleration for AES. This is supported only on selected
61 architectures and currently only available for AES. See configuration options
62 `MBEDTLS_AESCE_C`, `MBEDTLS_AESNI_C` and `MBEDTLS_PADLOCK_C` for details.
Janos Follath144dd7d2023-03-03 14:56:38 +000063- Add a secure alternative implementation (typically hardware acceleration) for
64 the vulnerable cipher. See the [Alternative Implementations
65Guide](docs/architecture/alternative-implementations.md) for more information.
66- Use cryptographic mechanisms that are not based on block ciphers. In
67 particular, for authenticated encryption, use ChaCha20/Poly1305 instead of
68 block cipher modes. For random generation, use HMAC\_DRBG instead of CTR\_DRBG.
Janos Follath18d41732023-02-24 16:00:21 +000069
70### Physical attacks
71
Janos Follath9ec195c2023-03-06 14:54:59 +000072The attacker has access to physical information about the hardware Mbed TLS is
73running on and/or can alter the physical state of the hardware.
74
Janos Follath144dd7d2023-03-03 14:56:38 +000075Physical attacks are out of scope (eg. power analysis or radio emissions). Any
76attack using information about or influencing the physical state of the
77hardware is considered physical, independently of the attack vector. (For
78example Row Hammer and Screaming Channels are considered physical attacks.) If
79physical attacks are present in a use case or a user application's threat
80model, it needs to be mitigated by physical countermeasures.