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>] [day] [month] [year] [list]
Message-ID: <20190619031503.GJ7221@shao2-debian>
Date:   Wed, 19 Jun 2019 11:15:03 +0800
From:   kernel test robot <rong.a.chen@...el.com>
To:     Matthew Garrett <matthewgarrett@...gle.com>
Cc:     Mimi Zohar <zohar@...ux.ibm.com>,
        Roberto Sassu <roberto.sassu@...wei.com>,
        Matthew Garrett <mjg59@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Mimi Zohar <zohar@...ux.vnet.ibm.com>,
        linux-integrity@...r.kernel.org, lkp@...org
Subject: [IMA] 686027912d:
 BUG:sleeping_function_called_from_invalid_context_at_mm/slab.h

FYI, we noticed the following commit (built with gcc-7):

commit: 686027912dd548026757aea664261010177f9625 ("IMA: support for per policy rule template formats")
https://git.kernel.org/cgit/linux/kernel/git/zohar/linux-integrity.git next-queued-testing

in testcase: pm-qa
with following parameters:

	test: thermal



on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 2G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


+----------------------------------------------------------------+------------+------------+
|                                                                | 33fa2a9ce3 | 686027912d |
+----------------------------------------------------------------+------------+------------+
| boot_successes                                                 | 18         | 0          |
| boot_failures                                                  | 16         | 35         |
| BUG:kernel_reboot-without-warning_in_test_stage                | 16         |            |
| BUG:sleeping_function_called_from_invalid_context_at_mm/slab.h | 0          | 35         |
+----------------------------------------------------------------+------------+------------+


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <rong.a.chen@...el.com>


[   12.865737] BUG: sleeping function called from invalid context at mm/slab.h:418
[   12.874069] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
[   12.876961] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc1-00010-g6860279 #1
[   12.880463] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[   12.884300] Call Trace:
[   12.885730]  dump_stack+0x5c/0x7b
[   12.897914]  ___might_sleep+0xf1/0x110
[   12.899805]  __kmalloc+0x186/0x220
[   12.901552]  template_desc_init_fields+0x1a3/0x2a0
[   12.904061]  ? selinux_inode_getsecid+0x30/0x30
[   12.906174]  ? security_inode_alloc+0x4d/0x90
[   12.908279]  ? __d_instantiate+0x34/0xf0
[   12.910235]  ? d_instantiate+0x3d/0x60
[   12.912168]  ? set_debug_rodata+0x11/0x11
[   12.914103]  lookup_template_desc+0x7f/0xa0
[   12.916137]  ? hash_setup+0xa6/0xa6
[   12.917938]  ima_template_desc_current+0x2e/0x40
[   12.920104]  hash_setup+0xe/0xa6
[   12.921819]  init_ima+0x17/0x9e
[   12.923415]  do_one_initcall+0x46/0x214
[   12.925327]  kernel_init_freeable+0x1c7/0x272
[   12.927389]  ? rest_init+0xd0/0xd0
[   12.929111]  kernel_init+0xa/0x110
[   12.930879]  ret_from_fork+0x35/0x40
[   12.932775] ima: No TPM chip found, activating TPM-bypass!
[   12.935327] ima: Allocated hash algorithm: sha1
[   12.937482] No architecture policies found
[   12.941471] evm: Initialising EVM extended attributes:
[   12.943889] evm: security.selinux
[   12.945555] evm: security.apparmor
[   12.947334] evm: security.ima
[   12.948909] evm: security.capability
[   12.950747] evm: HMAC attrs: 0x1
[   12.957065] PM:   Magic number: 7:871:763
[   12.959181] psmouse serio1: hash matches
[   12.961495] rtc_cmos 00:00: setting system clock to 2019-06-19T02:48:06 UTC (1560912486)
[   12.973895] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   12.979938] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   12.991948] Sending DHCP requests ., OK
[   12.994762] IP-Config: Got DHCP answer from 10.0.2.2, my address is 10.0.2.15
[   12.997916] IP-Config: Complete:
[   12.999701]      device=eth0, hwaddr=52:54:00:12:34:56, ipaddr=10.0.2.15, mask=255.255.255.0, gw=10.0.2.2
[   13.004101]      host=vm-snb-2G-442, domain=, nis-domain=(none)
[   13.006825]      bootserver=10.0.2.2, rootserver=10.0.2.2, rootpath=
[   13.006827]      nameserver0=10.0.2.3
[   13.016218] Freeing unused decrypted memory: 2040K
[   13.020818] Freeing unused kernel image memory: 2504K
[   13.028936] Write protecting the kernel read-only data: 22528k
[   13.033912] Freeing unused kernel image memory: 2012K
[   13.038439] Freeing unused kernel image memory: 1920K
[   13.041055] rodata_test: all tests were successful
[   13.043511] Run /init as init process
SELinux:  Could not open policy file <= /etc/selinux/targeted/policy/policy.31:  No such file or directory
[   13.060345] systemd[1]: RTC configured in localtime, applying delta of 480 minutes to system time.
[   13.074703] random: systemd: uninitialized urandom read (16 bytes read)
[   13.079213] random: systemd: uninitialized urandom read (16 bytes read)
[   13.082294] random: systemd: uninitialized urandom read (16 bytes read)


         Mounting POSIX Message Queue File System...
         Mounting Huge Pages File System...
         Mounting Debug File System...
         Mounting RPC Pipe File System...
         Starting Remount Root and Kernel File Systems...
         Starting Load Kernel Modules...
         Starting Journal Service...
         Mounting Configuration File System...
         Starting Apply Kernel Variables...
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
         Starting Create Static Device Nodes in /dev...
         Starting Preprocess NFS configuration...
         Starting udev Kernel Device Manager...
         Starting Raise network interfaces...
         Starting Flush Journal to Persistent Storage...
         Starting Create Volatile Files and Directories...
         Starting Update UTMP about System Boot/Shutdown...
         Starting RPC bind portmap service...
         Starting Network Time Synchronization...
         Starting Permit User Sessions...
         Starting LKP bootstrap...
         Starting System Logging Service...
         Starting LSB: Execute the kexec -e command to reboot system...
         Starting OpenBSD Secure Shell server...
         Starting Login Service...
         Starting /etc/rc.local Compatibility...
         Starting LSB: Start and stop bmc-watchdog...
[   13.298892] rc.local[278]: mkdir: cannot create directory '/var/lock/lkp-bootstrap.lock': File exists
         Starting LSB: Load kernel image with kexec...
[   14.031902] Floppy drive(s): fd0 is 2.88M AMI BIOS
[   14.085572] FDC 0 is a S82078B
[   14.089069] parport_pc 00:04: reported by Plug and Play ACPI
[   14.110200] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0x700, revision 0
[   14.114218] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
LKP: HOSTNAME vm-snb-2G-442, MAC 52:54:00:12:34:56, kernel 5.2.0-rc1-00010-g6860279 1, serial console /dev/ttyS0
[   14.318343] input: PC Speaker as /devices/platform/pcspkr/input/input5
[   14.345146] cryptd: max_cpu_qlen set to 1000
[   14.352023] libata version 3.00 loaded.
[   14.427699] ata_piix 0000:00:01.1: version 2.13
[   14.468503] SSE version of gcm_enc/dec engaged.
[   14.504549] scsi host0: ata_piix


To reproduce:

        # build kernel
	cd linux
	cp config-5.2.0-rc1-00010-g6860279 .config
	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig
	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare
	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare
	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash
	make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage


        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email



Thanks,
Rong Chen


View attachment "config-5.2.0-rc1-00010-g6860279" of type "text/plain" (196418 bytes)

View attachment "job-script" of type "text/plain" (4750 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (13520 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ