lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 1 Dec 2022 08:25:41 -0800
From:   coverity-bot <keescook@...omium.org>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     Sean Christopherson <seanjc@...gle.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, Borislav Petkov <bp@...en8.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        linux-next@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Coverity: kvm_hv_flush_tlb(): Uninitialized variables

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221201 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Fri Nov 18 12:59:05 2022 -0500
    260970862c88 ("KVM: x86: hyper-v: Handle HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST{,EX} calls gently")

Coverity reported the following:

*** CID 1527764:  Uninitialized variables  (UNINIT)
arch/x86/kvm/hyperv.c:2024 in kvm_hv_flush_tlb()
2018     		 * Hyper-V TLFS doesn't explicitly forbid non-empty sparse vCPU
2019     		 * banks (and, thus, non-zero 'var_cnt') for the 'all vCPUs'
2020     		 * case (HV_GENERIC_SET_ALL).  Always adjust data_offset and
2021     		 * consumed_xmm_halves to make sure TLB flush entries are read
2022     		 * from the correct offset.
2023     		 */
vvv     CID 1527764:  Uninitialized variables  (UNINIT)
vvv     Using uninitialized value "data_offset".
2024     		data_offset += hc->var_cnt * sizeof(sparse_banks[0]);
2025     		consumed_xmm_halves += hc->var_cnt;
2026     	}
2027
2028     	if (hc->code == HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE ||
2029     	    hc->code == HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX ||

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@...omium.org>
Addresses-Coverity-ID: 1527764 ("Uninitialized variables")
Fixes: 260970862c88 ("KVM: x86: hyper-v: Handle HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST{,EX} calls gently")

Thanks for your attention!

-- 
Coverity-bot

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ