[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACGkMEsrMcAbrsfupDJ_fK_RTA8zRtGh77UBHeXZMiRxCaWypg@mail.gmail.com>
Date: Thu, 1 Feb 2024 13:49:11 +0800
From: Jason Wang <jasowang@...hat.com>
To: zhenwei pi <pizhenwei@...edance.com>
Cc: arei.gonglei@...wei.com, mst@...hat.com, herbert@...dor.apana.org.au,
xuanzhuo@...ux.alibaba.com, virtualization@...ts.linux.dev, nathan@...nel.org,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
davem@...emloft.net
Subject: Re: [PATCH] crypto: virtio/akcipher - Fix stack overflow on memcpy
On Tue, Jan 30, 2024 at 7:28 PM zhenwei pi <pizhenwei@...edance.com> wrote:
>
> 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/
> Signed-off-by: zhenwei pi <pizhenwei@...edance.com>
Acked-by: Jason Wang <jasowang@...hat.com>
Thanks
Powered by blists - more mailing lists