zhenwei pi
b0365460e9
crypto: virtio/akcipher - Fix stack overflow on memcpy
...
commit c0ec2a712daf133d9996a8a1b7ee2d4996080363 upstream.
sizeof(struct virtio_crypto_akcipher_session_para) is less than
sizeof(struct virtio_crypto_op_ctrl_req::u), copying more bytes from
stack variable leads stack overflow. Clang reports this issue by
commands:
make -j CC=clang-14 mrproper >/dev/null 2>&1
make -j O=/tmp/crypto-build CC=clang-14 allmodconfig >/dev/null 2>&1
make -j O=/tmp/crypto-build W=1 CC=clang-14 drivers/crypto/virtio/
virtio_crypto_akcipher_algs.o
Fixes: 59ca6c93387d ("virtio-crypto: implement RSA algorithm")
Link: https://lore.kernel.org/all/0a194a79-e3a3-45e7-be98-83abd3e1cb7e@roeck-us.net/
Cc: <stable@vger.kernel.org>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-01 13:35:01 +01:00
..
2023-08-23 11:04:23 +08:00
2023-03-24 18:22:28 +08:00
2023-08-23 11:04:23 +08:00
2023-08-23 11:04:23 +08:00
2023-02-13 18:34:49 +08:00
2023-08-23 11:04:23 +08:00
2023-11-20 11:59:19 +01:00
2023-03-17 11:16:43 +08:00
2024-02-23 09:25:11 +01:00
2023-08-23 11:04:23 +08:00
2023-08-25 18:46:55 +08:00
2023-08-23 11:04:23 +08:00
2024-01-25 15:35:17 -08:00
2024-01-25 15:35:16 -08:00
2024-01-10 17:16:55 +01:00
2024-02-05 20:14:16 +00:00
2023-05-24 18:12:33 +08:00
2023-03-14 17:06:44 +08:00
2023-08-23 11:04:23 +08:00
2024-02-05 20:14:16 +00:00
2024-02-05 20:14:16 +00:00
2024-03-01 13:35:01 +01:00
2022-12-08 23:57:47 +11:00
2023-08-23 11:04:23 +08:00
2023-08-23 11:04:23 +08:00
2023-08-23 11:04:23 +08:00
2023-02-21 18:10:50 -08:00
2023-02-21 18:10:50 -08:00
2023-06-02 18:21:32 +08:00
2023-08-23 11:04:23 +08:00
2023-08-23 11:04:23 +08:00
2023-08-23 11:04:23 +08:00
2023-03-24 18:22:28 +08:00
2023-08-23 11:04:23 +08:00
2023-07-24 12:12:22 +02:00
2023-05-19 16:46:22 +08:00
2023-03-31 17:50:09 +08:00
2023-08-23 11:04:23 +08:00
2023-08-18 17:01:11 +08:00
2023-08-23 11:04:23 +08:00
2023-08-18 17:01:11 +08:00
2021-08-21 15:44:53 +08:00
2023-08-23 11:04:23 +08:00
2023-08-23 11:04:23 +08:00
2023-08-18 17:01:09 +08:00
2023-08-23 11:04:23 +08:00
2024-01-25 15:35:16 -08:00
2023-05-19 16:45:43 +08:00
2024-01-25 15:35:18 -08:00
2023-08-23 11:04:23 +08:00
2022-10-21 19:05:24 +08:00