Re: [PATCH] util: don't validate empty params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Fri, Jun 23, 2023 at 11:22 AM Oleg Vasilev <oleg.vasilev@xxxxxxxxxxxxx> wrote:
If there are no parameters, there is nothing to validate.
If params == NULL, memcpy below results in memcpy(sorted, NULL, 0),
which is UB.

Found by UBSAN. Example of this codepath: virDomainBlockCopy()
(where nparams == 0 is valid) -> qemuDomainBlockCopy()

Signed-off-by: Oleg Vasilev <oleg.vasilev@xxxxxxxxxxxxx>
---
 src/util/virtypedparam.c | 4 ++++
 1 file changed, 4 insertions(+)


Reviewed-by: Kristina Hanicova <khanicov@xxxxxxxxxx>

Kristina

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux