|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 1/6] tools/libxs: Fix length check in xs_talkv()
On 19.07.24 23:14, Jason Andryuk wrote: On 2024-07-18 12:48, Andrew Cooper wrote:If the sum of iov element lengths overflows, the XENSTORE_PAYLOAD_MAX can pass, after which we'll write 4G of data with a good-looking length field, and the remainder of the payload will be interpreted as subsequent commands. Check each iov element length for XENSTORE_PAYLOAD_MAX before accmulating it. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Anthony PERARD <anthony.perard@xxxxxxxxxx> CC: Juergen Gross <jgross@xxxxxxxx> --- tools/libs/store/xs.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index ec77379ab9bd..81a790cfe60f 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c@@ -571,21 +571,24 @@ static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, With the suggested change: Reviewed-by: Juergen Gross <jgross@xxxxxxxx> Juergen
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |