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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Mar 2022 18:51:40 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     syzbot <syzbot+717ed82268812a643b28@...kaller.appspotmail.com>,
        bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
        jmattson@...gle.com, joro@...tes.org, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, mingo@...hat.com,
        pbonzini@...hat.com, seanjc@...gle.com,
        syzkaller-bugs@...glegroups.com, tglx@...utronix.de,
        vkuznets@...hat.com, wanpengli@...cent.com, x86@...nel.org
Subject: Re: [syzbot] general protection fault in kvm_mmu_uninit_tdp_mmu

On 3/25/22 16:10, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    f9006d9269ea Add linux-next specific files for 20220321
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=101191bd700000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=c1619ffa2b0259a1
> dashboard link: https://syzkaller.appspot.com/bug?extid=717ed82268812a643b28
> compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=109e8f5d700000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1666180b700000
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+717ed82268812a643b28@...kaller.appspotmail.com
> 

The following code is not safe:

arch/x86/kvm/mmu/tdp_mmu.c:

28	kvm->arch.tdp_mmu_zap_wq =
29		alloc_workqueue("kvm", WQ_UNBOUND|WQ_MEM_RECLAIM|WQ_CPU_INTENSIVE, 0);
30
31	return true;


Looks like kvm_mmu_init_tdp_mmu() error value is just ignored, and then 
all kvm_*_init_vm() functions are void, so the easiest solution is to 
check that tdp_mmu_zap_wq is valid pointer


#syz test: 
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master




With regards,
Pavel Skripkin
View attachment "ph" of type "text/plain" (1228 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ