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]
Date:   Mon, 22 Mar 2021 16:10:59 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:     Mimi Zohar <zohar@...ux.ibm.com>,
        Dmitry Vyukov <dvyukov@...gle.com>
Cc:     linux-integrity@...r.kernel.org, James Morris <jmorris@...ei.org>,
        "Serge E . Hallyn" <serge@...lyn.com>,
        linux-security-module <linux-security-module@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Eric Biggers <ebiggers@...nel.org>
Subject: Re: [RFC PATCH 2/2] integrity: double check iint_cache was
 initialized

On 2021/03/20 5:03, Mimi Zohar wrote:
> The integrity's "iint_cache" is initialized at security_init().  Only
> after an IMA policy is loaded, which is initialized at late_initcall,
> is a file's integrity status stored in the "iint_cache".
> 
> All integrity_inode_get() callers first verify that the IMA policy has
> been loaded, before calling it.  Yet for some reason, it is still being
> called, causing a NULL pointer dereference.
> 
> As reported by Dmitry Vyukov:
> in qemu:
> qemu-system-x86_64       -enable-kvm     -machine q35,nvdimm -cpu
> max,migratable=off -smp 4       -m 4G,slots=4,maxmem=16G        -hda
> wheezy.img      -kernel arch/x86/boot/bzImage   -nographic -vga std
>  -soundhw all     -usb -usbdevice tablet  -bt hci -bt device:keyboard
>    -net user,host=10.0.2.10,hostfwd=tcp::10022-:22 -net
> nic,model=virtio-net-pci   -object
> memory-backend-file,id=pmem1,share=off,mem-path=/dev/zero,size=64M
>   -device nvdimm,id=nvdimm1,memdev=pmem1  -append "console=ttyS0
> root=/dev/sda earlyprintk=serial rodata=n oops=panic panic_on_warn=1
> panic=86400 lsm=smack numa=fake=2 nopcid dummy_hcd.num=8"   -pidfile
> vm_pid -m 2G -cpu host
> 

I tried similar command line (without "-enable-kvm" and without "-cpu host"
as I'm running from VMware, without "-soundhw all", without "-machine q35,nvdimm"
and "-device nvdimm,id=nvdimm1,memdev=pmem1" etc.) on 5.12-rc4. While I was finally
able to hit similar crash when I used "-smp 1" instead of "-smp 4", I suspect
this is not a integrity module's problem but a memory initialization/corruption
problem, for I got various different crashes (INT3) at memory allocation when
I was trimming command line options trying to reproduce the same crash.

Dmitry, do you get different crashes by changing command line arguments?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ