[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/12] io/channel-socket: qio_channel_socket_flush(): improve msg
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH 12/12] io/channel-socket: qio_channel_socket_flush(): improve msg validation |
Date: |
Mon, 25 Sep 2023 22:40:40 +0300 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
io/channel-socket.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/io/channel-socket.c b/io/channel-socket.c
index 02ffb51e99..3a899b0608 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -782,6 +782,11 @@ static int qio_channel_socket_flush(QIOChannel *ioc,
"Error not from zero copy");
return -1;
}
+ if (serr->ee_data < serr->ee_info) {
+ error_setg_errno(errp, serr->ee_origin,
+ "Wrong notification bounds");
+ return -1;
+ }
/* No errors, count successfully finished sendmsg()*/
sioc->zero_copy_sent += serr->ee_data - serr->ee_info + 1;
--
2.34.1
- [PATCH 08/12] block/nvme: nvme_process_completion() fix bound for cid, (continued)
- [PATCH 08/12] block/nvme: nvme_process_completion() fix bound for cid, Vladimir Sementsov-Ogievskiy, 2023/09/25
- [PATCH 07/12] pcie_sriov: unregister_vfs(): fix error path, Vladimir Sementsov-Ogievskiy, 2023/09/25
- [PATCH 10/12] hw/core/loader: gunzip(): initialize z_stream, Vladimir Sementsov-Ogievskiy, 2023/09/25
- [PATCH 11/12] hw/core/loader: read_targphys(): add upper bound, Vladimir Sementsov-Ogievskiy, 2023/09/25
- [PATCH 12/12] io/channel-socket: qio_channel_socket_flush(): improve msg validation,
Vladimir Sementsov-Ogievskiy <=
- [PATCH 09/12] kvm-all: introduce limits for name_size and num_desc, Vladimir Sementsov-Ogievskiy, 2023/09/25