Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-06-01 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
On 2020/5/31 17:21, Michael S. Tsirkin wrote: > On Tue, May 26, 2020 at 02:11:37PM +, Sasha Levin wrote: >> <20200123101000.GB24255@Red> >> References: <20200526031956.1897-3-longpe...@huawei.com> >> <20200123101000.GB24255@Red> >> >> Hi >> >> [This is an automated email] >> >> This commit

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-31 Thread Michael S. Tsirkin
On Tue, May 26, 2020 at 02:11:37PM +, Sasha Levin wrote: > <20200123101000.GB24255@Red> > References: <20200526031956.1897-3-longpe...@huawei.com> > <20200123101000.GB24255@Red> > > Hi > > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag >

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Sasha Levin
<20200123101000.GB24255@Red> References: <20200526031956.1897-3-longpe...@huawei.com> <20200123101000.GB24255@Red> Hi [This is an automated email] This commit has been processed because it contains a "Fixes:" tag fixing commit: dbaf0624ffa5 ("crypto: add virtio-crypto driver"). The bot has

RE: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Gonglei (Arei)
; (Arei) ; Herbert Xu > ; Michael S. Tsirkin ; Jason > Wang ; David S. Miller ; > Markus Elfring ; > virtualizat...@lists.linux-foundation.org; linux-kernel@vger.kernel.org; > sta...@vger.kernel.org > Subject: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in > virtio_crypto_skciph

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Markus, On 2020/5/26 15:19, Markus Elfring wrote: >> The system'll crash when the users insmod crypto/tcrypto.ko with mode=155 >> ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory >> of request structure. > > Wording adjustments: > * … system will crash … > * … It is

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-26 Thread Markus Elfring
> The system'll crash when the users insmod crypto/tcrypto.ko with mode=155 > ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory > of request structure. Wording adjustments: * … system will crash … * … It is caused by reusing the … > when these memory will be used

[PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

2020-05-25 Thread Longpeng(Mike)
The system'll crash when the users insmod crypto/tcrypto.ko with mode=155 ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory of request structure. In crypto_authenc_init_tfm(), the reqsize is set to: [PART 1] sizeof(authenc_request_ctx) + [PART 2] ictx->reqoff +