Gilles Peskine da0913ba6b Call setbuf when reading or writing files: library
After opening a file containing sensitive data, call mbedtls_setbuf() to
disable buffering. This way, we don't expose sensitive data to a memory
disclosure vulnerability in a buffer outside our control.

This commit adds a call to mbedtls_setbuf() after each call to fopen(),
except:
* In ctr_drbg.c, in load_file(), because this is only used for DH parameters
  and they are not confidential data.
* In psa_its_file.c, in psa_its_remove(), because the file is only opened
  to check its existence, we don't read data from it.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-06-30 17:03:40 +02:00
..
2021-03-10 12:52:37 +00:00
2021-06-28 09:24:07 +01:00
2021-08-19 09:55:41 +01:00
2021-10-21 11:33:37 +02:00
2021-06-17 21:46:29 +02:00
2021-09-27 16:22:08 +02:00
2022-04-19 18:31:24 +02:00
2021-08-19 09:31:55 +01:00
2021-06-28 09:24:07 +01:00
2021-04-07 12:45:35 +01:00
2021-03-29 14:20:18 +01:00
2021-03-29 14:20:18 +01:00
2021-04-07 12:45:35 +01:00
2021-06-16 10:34:25 +02:00
2021-03-10 12:52:37 +00:00
2021-06-28 09:24:07 +01:00
2021-06-08 16:45:41 +02:00
2022-04-07 14:51:47 +02:00
2021-04-15 11:19:47 +01:00
2021-12-02 18:03:12 +00:00
2022-06-30 17:01:40 +02:00
2021-09-08 22:04:13 +05:30
2020-11-25 13:10:50 +01:00
2021-12-06 07:50:27 +01:00
2021-08-19 09:31:55 +01:00
2021-08-19 09:31:55 +01:00
2022-05-07 01:37:04 +00:00
2022-04-20 11:05:24 +00:00
2022-05-06 11:16:55 +08:00
2022-05-06 16:40:05 +08:00
2022-05-06 11:16:55 +08:00
2022-03-29 17:43:56 +02:00