crypto/virtio: fix out of bounds access bug
Subsystems (3)
PATCH 1/1 crypto/virtio: fix out of bounds access bug
Coverity flags an untrusted loop bound. Check length of session iv.
Coverity issue: 375802
--- drivers/crypto/virtio/virtio_rxtx.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/virtio/virtio_rxtx.c +3 -0
@@ -264,6 +264,9 @@ virtqueue_crypto_sym_enqueue_xmit(if (cop->phys_addr) desc[idx].addr = cop->phys_addr + session->iv.offset;else { +if (VIRTIO_CRYPTO_MAX_IV_SIZE < session->iv.length) +return -ENOMEM ; + rte_memcpy(crypto_op_cookie->iv, rte_crypto_op_ctod_offset(cop, uint8_t *, session->iv.offset),
Signature · 1 line
2.25.1
PATCH v2 1/1 crypto/virtio: fix out of bounds access bug
Coverity flags an untrusted loop bound. Check length of session iv.
Coverity issue: 375802
---
v2: Fix checkpatch warning
--- drivers/crypto/virtio/virtio_rxtx.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/virtio/virtio_rxtx.c +3 -0
@@ -264,6 +264,9 @@ virtqueue_crypto_sym_enqueue_xmit(if (cop->phys_addr) desc[idx].addr = cop->phys_addr + session->iv.offset;else { +if (session->iv.length >VIRTIO_CRYPTO_MAX_IV_SIZE ) +return -ENOMEM ; + rte_memcpy(crypto_op_cookie->iv, rte_crypto_op_ctod_offset(cop, uint8_t *, session->iv.offset),
Signature · 1 line
2.25.1
Quoted 13 lines
-----Original Message-----
From: Dooley, Brian <[email protected]>
Sent: Tuesday, February 22, 2022 9:55 AM
To: [email protected]
Cc: Dooley, Brian <[email protected]>; Zhang, Roy Fan <[email protected]>; [email protected]; Jay Zhou <[email protected]>
Subject: [PATCH v2]crypto/virtio: fix out of bounds access bugCoverity flags an untrusted loop bound. Check length of session iv.
Coverity issue: 375802
Quoted 7 lines
Fixes b063e843fa03 ("crypto/virtio: fix IV physical address")Signed-off-by Brian Dooley <[email protected]>---
Quoted 13 lines
-----Original Message-----
From: Dooley, Brian <[email protected]>
Sent: Tuesday, February 22, 2022 9:55 AM
To: [email protected]
Cc: Dooley, Brian <[email protected]>; Zhang, Roy Fan <[email protected]>; [email protected]; Jay Zhou <[email protected]>
Subject: [PATCH v2]crypto/virtio: fix out of bounds access bugCoverity flags an untrusted loop bound. Check length of session iv.
Coverity issue: 375802
Quoted 7 lines
Fixes b063e843fa03 ("crypto/virtio: fix IV physical address")Signed-off-by Brian Dooley <[email protected]>---
Reacking as the last ack not shown in patchwork
Akhil Goyal
AppliedQuoted 10 lines
Quoted 10 lines
Coverity flags an untrusted loop bound. Check length of session iv.
Coverity issue: 375802
Fixes b063e843fa03 ("crypto/virtio: fix IV physical address")
Quoted 5 lines
Quoted 3 lines
Signed-off-by Brian Dooley <[email protected]>---
Reacking as the last ack not shown in patchwork
Acked-by Fan Zhang <[email protected]>
Applied to dpdk-next-crypto
Thanks.