[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 14/30] opts: don't silently truncate long paramet
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PULL 14/30] opts: don't silently truncate long parameter keys |
Date: |
Wed, 9 May 2018 07:46:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 09.05.2018 00:14, Paolo Bonzini wrote:
> From: Daniel P. Berrangé <address@hidden>
Here the accent is right ^
> The existing QemuOpts parsing code uses a fixed size 128 byte buffer
> for storing the parameter keys. If a key exceeded this size it was
> silently truncate and no error reported to the user. This behaviour was
> reasonable & harmless because traditionally the key names are all
> statically declared, and it was known that no code was declaring a key
> longer than 127 bytes. This assumption, however, ceased to be valid once
> the block layer added support for dot-separate compound keys. This
> syntax allows for keys that can be arbitrarily long, limited only by the
> number of block drivers you can stack up. With this usage, silently
> truncating the key name can never lead to correct behaviour.
>
> Hopefully such truncation would turn into an error, when the block code
> then tried to extract options later, but there's no guarantee that will
> happen. It is conceivable that an option specified by the user may be
> truncated and then ignored. This could have serious consequences,
> possibly even leading to security problems if the ignored option set a
> security relevant parameter.
>
> If the operating system didn't limit the user's argv when spawning QEMU,
> the code should honour whatever length arguments were given without
> imposing its own length restrictions. This patch thus changes the code
> to use a heap allocated buffer for storing the keys during parsing,
> lifting the arbitrary length restriction.
>
> Signed-off-by: Daniel P. Berrangé <address@hidden>
But this one got mojibaked -------^
Thomas
- [Qemu-devel] [PULL 06/30] memdev: remove "id" property, (continued)
- [Qemu-devel] [PULL 06/30] memdev: remove "id" property, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 05/30] qom: allow object_get_canonical_path_component without parent, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 09/30] exec: extract address_space_translate_iommu, fix page_mask corner case, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 08/30] exec: small changes to flatview_do_translate, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 10/30] exec: reintroduce MemoryRegion caching, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 11/30] qemu-thread: always keep the posix wrapper layer, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 12/30] update-linux-headers: drop hyperv.h, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 07/30] exec: move memory access declarations to a common header, inline *_phys functions, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 13/30] accel: use g_strsplit for parsing accelerator names, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 14/30] opts: don't silently truncate long parameter keys, Paolo Bonzini, 2018/05/08
- Re: [Qemu-devel] [PULL 14/30] opts: don't silently truncate long parameter keys,
Thomas Huth <=
- [Qemu-devel] [PULL 17/30] qemu-options: Mark -virtioconsole as deprecated, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 18/30] qemu-options: Remove remainders of the -tdf option, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 19/30] qemu-options: Bail out on unsupported options instead of silently ignoring them, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 20/30] qemu-options: Remove deprecated -no-kvm-pit-reinjection, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 16/30] target/i386: sev: fix memory leaks, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 15/30] opts: don't silently truncate long option values, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 21/30] qemu-options: Remove deprecated -no-kvm-irqchip, Paolo Bonzini, 2018/05/08
- [Qemu-devel] [PULL 25/30] configure: Really use local libfdt if the system one is too old, Paolo Bonzini, 2018/05/08