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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+G9fYvnHwNHpkkEG951VcTBCVuvfMP98WDHf04dVy7K=E4pLg@mail.gmail.com>
Date:   Mon, 2 Mar 2020 14:28:25 +0530
From:   Naresh Kamboju <naresh.kamboju@...aro.org>
To:     Wanpeng Li <kernellwp@...il.com>
Cc:     open list <linux-kernel@...r.kernel.org>,
        kvm list <kvm@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>
Subject: Re: [PATCH] KVM: X86: Fix dereference null cpufreq policy

On Mon, 2 Mar 2020 at 12:48, Wanpeng Li <kernellwp@...il.com> wrote:
>
> From: Wanpeng Li <wanpengli@...cent.com>
>
> Naresh Kamboju reported:
>
>    Linux version 5.6.0-rc4 (oe-user@...host) (gcc version
>   (GCC)) #1 SMP Sun Mar 1 22:59:08 UTC 2020
>    kvm: no hardware support
>    BUG: kernel NULL pointer dereference, address: 000000000000028c
>    #PF: supervisor read access in kernel mode
>    #PF: error_code(0x0000) - not-present page
>    PGD 0 P4D 0
>    Oops: 0000 [#1] SMP NOPTI
>    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc4 #1
>    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
>   04/01/2014
>    RIP: 0010:kobject_put+0x12/0x1c0
>    Call Trace:
>     cpufreq_cpu_put+0x15/0x20
>     kvm_arch_init+0x1f6/0x2b0
>     kvm_init+0x31/0x290
>     ? svm_check_processor_compat+0xd/0xd
>     ? svm_check_processor_compat+0xd/0xd
>     svm_init+0x21/0x23
>     do_one_initcall+0x61/0x2f0
>     ? rdinit_setup+0x30/0x30
>     ? rcu_read_lock_sched_held+0x4f/0x80
>     kernel_init_freeable+0x219/0x279
>     ? rest_init+0x250/0x250
>     kernel_init+0xe/0x110
>     ret_from_fork+0x27/0x50
>    Modules linked in:
>    CR2: 000000000000028c
>    ---[ end trace 239abf40c55c409b ]---
>    RIP: 0010:kobject_put+0x12/0x1c0
>
> cpufreq policy which is get by cpufreq_cpu_get() can be NULL if it is failure,
> this patch takes care of it.
>
> Fixes: aaec7c03de (KVM: x86: avoid useless copy of cpufreq policy)
> Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
> Cc: Naresh Kamboju <naresh.kamboju@...aro.org>
> Signed-off-by: Wanpeng Li <wanpengli@...cent.com>
Tested-by: Naresh Kamboju <naresh.kamboju@...aro.org>

Applied this patch and test boot pass.

- Naresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ