Daniele Alessandrelli
db5d0634e2
crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key()
...
[ Upstream commit a53ab94eb6850c3657392e2d2ce9b38c387a2633 ]
The length ('len' parameter) passed to crypto_ecdh_decode_key() is never
checked against the length encoded in the passed buffer ('buf'
parameter). This could lead to an out-of-bounds access when the passed
length is less than the encoded length.
Add a check to prevent that.
Fixes: 3c4b23901a0c7 ("crypto: ecdh - Add ECDH software support")
Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-03 17:44:36 +01:00
..
2019-08-04 09:33:23 +02:00
2018-04-13 19:47:58 +02:00
2015-06-25 23:29:24 +08:00
2015-05-11 15:06:43 +08:00
2016-06-23 18:29:53 +08:00
2018-10-03 17:01:41 -07:00
2016-07-18 17:35:43 +08:00
2015-01-13 22:29:11 +11:00
2020-07-09 09:35:55 +02:00
2019-03-23 13:19:45 +01:00
2015-12-09 20:03:57 +08:00
2020-02-14 16:31:02 -05:00
2020-06-30 15:38:32 -04:00
2020-10-29 09:05:32 +01:00
2020-07-09 09:35:55 +02:00
2015-04-22 09:30:21 +08:00
2020-07-09 09:35:55 +02:00
2015-04-22 09:30:18 +08:00
2014-11-24 22:43:57 +08:00
2020-02-14 16:31:02 -05:00
2014-11-24 22:43:57 +08:00
2019-01-23 08:10:54 +01:00
2019-01-23 08:10:54 +01:00
2018-10-03 17:01:41 -07:00
2011-09-22 21:25:25 +10:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2013-08-14 20:42:03 +10:00
2014-11-26 20:06:30 +08:00
2017-11-15 15:53:18 +01:00
2016-07-03 00:57:23 -04:00
2019-08-04 09:33:26 +02:00
2010-02-16 20:31:37 +08:00
2014-11-26 20:06:30 +08:00
2010-02-16 20:31:04 +08:00
2018-02-25 11:05:43 +01:00
2018-02-25 11:05:43 +01:00
2013-09-12 15:31:34 +10:00
2019-05-21 18:48:57 +02:00
2018-02-25 11:05:43 +01:00
2016-10-11 15:06:33 -07:00
2016-07-18 17:35:44 +08:00
2019-12-21 10:41:41 +01:00
2014-03-21 21:54:28 +08:00
2016-07-18 17:35:39 +08:00
2016-07-18 17:35:44 +08:00
2014-11-24 22:43:57 +08:00
2015-01-13 22:29:11 +11:00
2017-11-21 09:23:29 +01:00
2017-11-24 08:33:41 +01:00
2018-05-01 15:13:08 -07:00
2014-11-26 20:06:30 +08:00
2016-06-23 18:29:57 +08:00
2019-12-21 10:41:40 +01:00
2016-06-24 21:24:59 +08:00
2021-03-03 17:44:36 +01:00
2016-06-24 21:24:59 +08:00
2016-09-13 18:44:57 +08:00
2014-11-24 22:43:57 +08:00
2015-04-23 14:18:09 +08:00
2019-05-21 18:49:00 +02:00
2011-07-08 17:21:21 +08:00
2019-08-04 09:33:25 +02:00
2015-12-20 15:27:12 +02:00
2017-12-20 10:07:15 +01:00
2020-02-14 16:31:02 -05:00
2016-06-24 21:24:58 +08:00
2015-06-25 23:18:33 +08:00
2018-02-03 17:05:34 +01:00
2016-02-01 22:27:05 +08:00
2014-11-24 22:43:57 +08:00
2016-06-23 18:29:56 +08:00
2020-05-20 08:15:37 +02:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2016-04-15 22:36:36 +08:00
2017-03-18 19:14:26 +08:00
2018-02-25 11:05:43 +01:00
2014-11-24 22:43:57 +08:00
2015-12-22 20:43:35 +08:00
2013-12-09 20:09:12 +08:00
2014-11-24 22:43:57 +08:00
2019-03-23 13:19:47 +01:00
2020-02-14 16:31:01 -05:00
2018-02-17 13:21:15 +01:00
2015-04-23 14:18:09 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2015-06-22 15:49:18 +08:00
2017-12-20 10:07:15 +01:00
2019-11-25 09:53:02 +01:00
2016-07-01 23:45:18 +08:00
2016-07-05 23:05:26 +08:00
2015-10-14 22:23:16 +08:00
2019-05-21 18:49:00 +02:00
2016-11-22 15:02:25 +08:00
2014-11-24 22:43:57 +08:00
2016-07-18 17:35:46 +08:00
2015-01-13 22:29:11 +11:00
2015-12-22 20:43:35 +08:00
2018-02-03 17:05:34 +01:00
2015-12-22 20:43:35 +08:00
2015-04-10 21:39:41 +08:00
2019-03-23 13:19:45 +01:00
2017-06-07 12:07:46 +02:00
2018-11-13 11:16:57 -08:00
2015-07-17 21:20:20 +08:00
2015-01-13 22:29:11 +11:00
2016-10-02 22:33:43 +08:00
2019-04-27 09:34:43 +02:00
2020-01-29 10:24:12 +01:00
2011-11-09 11:53:32 +08:00
2015-01-13 22:29:11 +11:00
2018-08-17 20:59:29 +02:00
2015-01-13 22:29:11 +11:00
2014-11-26 20:06:30 +08:00
2016-08-31 23:00:48 +08:00
2020-05-20 08:15:37 +02:00