[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environm
From: |
P J P |
Subject: |
Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables |
Date: |
Wed, 29 May 2019 15:08:16 +0530 (IST) |
Hello Marc,
+-- On Thu, 23 May 2019, Marc-André Lureau wrote --+
| I don't see how you could exploit this today.
|
| QMP parser has MAX_TOKEN_COUNT (2ULL << 20).
I see, didn't realise that. I tried to reproduce it and
{"error": {"class": "GenericError", "desc": "JSON token count limit
exceeded"}}
got above error around ~1048570 tokens; Much earlier than 0x200000(=2097152)
as defined by MAX_TOKEN_COUNT. I guess multiple packets are being merged to
form the incoming command and there is a glitch in there.
| We could have "assert(count < MAX_TOKEN_COUNT)" in the loop, if it helps.
No, assert() doesn't seem good.
I think same limit will apply to commands coming via QAPIs as well?
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F
- [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, P J P, 2019/05/19
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, Daniel Henrique Barboza, 2019/05/20
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, Marc-André Lureau, 2019/05/22
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, P J P, 2019/05/23
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, Marc-André Lureau, 2019/05/23
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables,
P J P <=
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, Marc-André Lureau, 2019/05/29
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, P J P, 2019/05/29
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, Marc-André Lureau, 2019/05/29
- Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables, P J P, 2019/05/29