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] [day] [month] [year] [list]
Date:   Tue, 11 Apr 2017 17:22:53 +0800
From:   Fengguang Wu <fengguang.wu@...el.com>
To:     Mimi Zohar <zohar@...ux.vnet.ibm.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-ima-devel@...ts.sourceforge.net,
        linux-ima-user@...ts.sourceforge.net,
        linux-security-module@...r.kernel.org, LKP <lkp@...org>
Subject: [ima] 05d1a717ec [   19.258978] BUG: sleeping function called from
 invalid context at arch/x86/mm/fault.c:1304

Greetings,

0day kernel testing robot got the below dmesg and the first bad commit is

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

commit 05d1a717ec0430c916a749b94eb90ab74bbfa356
Author:     Mimi Zohar <zohar@...ux.vnet.ibm.com>
AuthorDate: Mon Feb 29 19:52:05 2016 -0500
Commit:     Mimi Zohar <zohar@...ux.vnet.ibm.com>
CommitDate: Sun May 1 09:23:52 2016 -0400

     ima: add support for creating files using the mknodat syscall
     
     Commit 3034a14 "ima: pass 'opened' flag to identify newly created files"
     stopped identifying empty files as new files.  However new empty files
     can be created using the mknodat syscall.  On systems with IMA-appraisal
     enabled, these empty files are not labeled with security.ima extended
     attributes properly, preventing them from subsequently being opened in
     order to write the file data contents.  This patch defines a new hook
     named ima_post_path_mknod() to mark these empty files, created using
     mknodat, as new in order to allow the file data contents to be written.
     
     In addition, files with security.ima xattrs containing a file signature
     are considered "immutable" and can not be modified.  The file contents
     need to be written, before signing the file.  This patch relaxes this
     requirement for new files, allowing the file signature to be written
     before the file contents.
     
     Changelog:
     - defer identifying files with signatures stored as security.ima
       (based on Dmitry Rozhkov's comments)
     - removing tests (eg. dentry, dentry->d_inode, inode->i_size == 0)
       (based on Al's review)
     
     Signed-off-by: Mimi Zohar <zohar@...ux.vnet.ibm.com>
     Cc: Al Viro <<viro@...iv.linux.org.uk>
     Tested-by: Dmitry Rozhkov <dmitry.rozhkov@...ux.intel.com>

42a4c60319  ima: fix ima_inode_post_setattr
05d1a717ec  ima: add support for creating files using the mknodat syscall
39da7c509a  Linux 4.11-rc6
+--------------------------------------------------------------------------+------------+------------+-----------+
|                                                                          | 42a4c60319 | 05d1a717ec | v4.11-rc6 |
+--------------------------------------------------------------------------+------------+------------+-----------+
| boot_successes                                                           | 1009       | 889        | 908       |
| boot_failures                                                            | 28         | 20         | 4         |
| BUG:unable_to_handle_kernel                                              | 28         | 20         | 4         |
| Oops:#[##]                                                               | 28         | 20         | 4         |
| EIP_is_at_perf_prepare_sample                                            | 28         | 16         |           |
| Kernel_panic-not_syncing:Fatal_exception                                 | 18         | 14         | 4         |
| Kernel_panic-not_syncing:Fatal_exception_in_interrupt                    | 10         | 6          |           |
| calltrace:SyS_fstatat64                                                  | 3          | 1          |           |
| BUG:sleeping_function_called_from_invalid_context_at_arch/x86/mm/fault.c | 0          | 4          | 4         |
| calltrace:SyS_mknodat                                                    | 0          | 4          |           |
| calltrace:SyS_mknod                                                      | 0          | 4          |           |
| EIP_is_at_ima_match_policy                                               | 0          | 4          |           |
| EIP:ima_match_policy                                                     | 0          | 0          | 4         |
+--------------------------------------------------------------------------+------------+------------+-----------+

[   18.784299] caif:caif_disconnect_client(): nothing to disconnect
[   18.792568] caif:caif_disconnect_client(): nothing to disconnect
[   18.801310] caif:caif_disconnect_client(): nothing to disconnect
[   18.809277] caif:caif_disconnect_client(): nothing to disconnect
[   18.817304] caif:caif_disconnect_client(): nothing to disconnect
[   19.258978] BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1304
[   19.267526] in_atomic(): 0, irqs_disabled(): 0, pid: 1612, name: trinity-c0
[   19.273303] 4 locks held by trinity-c0/1612:
[   19.279773]  #0:  (sb_writers#4){......}, at: [<c1125588>] __sb_start_write+0x57/0x9a
[   19.293773]  #1:  (&sb->s_type->i_mutex_key#9/1){......}, at: [<c112ea9e>] filename_create+0x5d/0xf3
[   19.303991]  #2:  (rcu_read_lock){......}, at: [<c136ec06>] ima_match_policy+0x0/0x2c1
[   19.312833]  #3:  (&mm->mmap_sem){......}, at: [<c105940d>] __do_page_fault+0x154/0x3d5
[   19.321244] CPU: 0 PID: 1612 Comm: trinity-c0 Not tainted 4.6.0-rc2-00011-g05d1a71 #1
[   19.331050] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
[   19.339031]  00000000 d08c3480 ccc65e08 c13aeae7 ccc65e1c c107ac7c d08c3480 00000000
[   19.345350]  00000000 ccc65e38 c107acee 00000001 00000001 00000000 00000000 ccc65e98
[   19.352387]  ccc65e74 c105945f 00000000 00000000 00000000 00000000 cff59660 c107df62
[   19.356460] Call Trace:
[   19.360396]  [<c13aeae7>] dump_stack+0x16/0x18
[   19.362145]  [<c107ac7c>] ___might_sleep+0x11e/0x126
[   19.364037]  [<c107acee>] __might_sleep+0x6a/0x71
[   19.365789]  [<c105945f>] __do_page_fault+0x1a6/0x3d5
[   19.370161]  [<c107df62>] ? local_clock+0x19/0x1c
[   19.371814]  [<c10572d5>] ? kvm_sched_clock_read+0x9/0x18
[   19.373868]  [<c1057135>] ? kvm_async_pf_task_wake+0xeb/0xeb
[   19.375775]  [<c1059938>] do_page_fault+0x25/0x29
[   19.377450]  [<c1057157>] do_async_page_fault+0x22/0x5e
[   19.381714]  [<c1839be5>] error_code+0x65/0x70
[   19.383453]  [<c136ec50>] ? ima_match_policy+0x4a/0x2c1
[   19.385285]  [<c13b8ef3>] ? lockref_get+0x15/0x18
[   19.414917]  [<c136f53e>] ima_must_appraise+0x1b/0x25
[   19.416806]  [<c136d39b>] ima_post_path_mknod+0x18/0x31
[   19.421343]  [<c112f1b8>] SyS_mknodat+0x131/0x187
[   19.423173]  [<c112f223>] SyS_mknod+0x15/0x17
[   19.424820]  [<c1000fbc>] do_int80_syscall_32+0x53/0x9a
[   19.426668]  [<c1839101>] entry_INT80_32+0x31/0x31
[   19.430923] BUG: unable to handle kernel NULL pointer dereference at   (null)
[   19.433551] IP: [<c136ec50>] ima_match_policy+0x4a/0x2c1
[   19.435553] *pdpt = 000000000cc60001 *pde = 0000000000000000 
[   19.441485] Oops: 0000 [#1] PREEMPT DEBUG_PAGEALLOC 
[   19.443671] Modules linked in:
[   19.445237] CPU: 0 PID: 1612 Comm: trinity-c0 Not tainted 4.6.0-rc2-00011-g05d1a71 #1
[   19.451278] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
[   19.454767] task: d08c3480 ti: ccc64000 task.ti: ccc64000
[   19.456645] EIP: 0060:[<c136ec50>] EFLAGS: 00010286 CPU: 0
[   19.461079] EIP is at ima_match_policy+0x4a/0x2c1
[   19.462773] EAX: 00000000 EBX: 00000001 ECX: 15c2f201 EDX: 00000000
[   19.464763] ESI: 00000000 EDI: 00000000 EBP: ccc65f14 ESP: ccc65ed4
[   19.466784]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
[   19.471266] CR0: 80050033 CR2: 00000000 CR3: 0cc218e0 CR4: 000406f0
[   19.473620] DR0: 09a7c000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[   19.475758] DR6: ffff0ff0 DR7: 00030602
[   19.477254] Stack:
[   19.481017]  c13b8ef3 cf696070 ccc65f00 00000010 00008d45 58eba135 cfe0f030 0000000c
[   19.484752]  00000000 00000001 c1852140 cd1a1000 ccc65f2c 00000001 00000000 00000000
[   19.491467]  ccc65f24 c136f53e 00000004 cfe0f030 ccc65f30 c136d39b cd1a1000 ccc65f64
[   19.495212] Call Trace:
[   19.496416]  [<c13b8ef3>] ? lockref_get+0x15/0x18
[   19.500533]  [<c136f53e>] ima_must_appraise+0x1b/0x25
[   19.502271]  [<c136d39b>] ima_post_path_mknod+0x18/0x31
[   19.504001]  [<c112f1b8>] SyS_mknodat+0x131/0x187
[   19.505599]  [<c112f223>] SyS_mknod+0x15/0x17
[   19.507139]  [<c1000fbc>] do_int80_syscall_32+0x53/0x9a
[   19.510850]  [<c1839101>] entry_INT80_32+0x31/0x31
[   19.517472] Code: 99 d2 ff b8 68 1c d7 c1 31 c9 31 d2 68 06 ec 36 c1 6a 00 6a 00 6a 02 e8 e8 7a d1 ff a1 b0 42 48 c2 83 c4 10 c7 45 e0 00 00 00 00 <8b> 18 a1 70 93 c2 c1 89 45 d0 89 45 c0 3b 1d b0 42 48 c2 0f 84
[   19.541611] EIP: [<c136ec50>] ima_match_policy+0x4a/0x2c1 SS:ESP 0068:ccc65ed4
[   19.549818] CR2: 0000000000000000
[   19.551239] ---[ end trace 16992df93ec11794 ]---
[   19.570613] Kernel panic - not syncing: Fatal exception

                                                           # HH:MM RESULT GOOD BAD GOOD_BUT_DIRTY DIRTY_NOT_BAD
git bisect start v4.7 v4.6 --
git bisect  bad 4340fa55298d17049e71c7a34e04647379c269f3  # 03:27  B     44     1    0   0  Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
git bisect  bad 0eff4589c36edd03d50b835d0768b2c2ef3f20bd  # 04:18  B    387     1    0   0  Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
git bisect good 8908c94d6cd7513ba4512295abc945a6ff7f979c  # 16:16  G    908     0    0   0  Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
git bisect  bad 7beaa24ba49717419e24d1f6321e8b3c265a719c  # 16:36  B     17     1    0   0  Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
git bisect good 9797f6b0504122e4ad9ff047a3d0521ad6706386  # 06:09  G    902     0    0   0  Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
git bisect good 676d9735cd010fc439566e2b6e9b6adc3e1179ef  # 18:15  G    900     0    1   1  Merge tag 'rpmsg-v4.7' of git://github.com/andersson/remoteproc
git bisect good 2600a46ee0ed57c0e0a382c2a37ebac64d374d20  # 07:21  G    909     0    0   0  Merge tag 'trace-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
git bisect  bad 0efacbbaee1e94e9942da0912f5b46ffd45a74bd  # 07:32  B      5     2    0   0  Merge tag 'arc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
git bisect  bad f4f27d0028aabce57e44c16c2fdefccd6310d2f3  # 07:41  B      0     1   12   0  Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
git bisect good d55201ce08bfae40ae0062be126f49471a55bcad  # 20:15  G    900     0   25  25  Merge branch 'keys-trust' into keys-next
git bisect  bad 0250abcd726b4eba8a6175f09656fe544ed6491a  # 20:47  B    455     1    9   9  Merge tag 'keys-next-20160505' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next
git bisect good 9b091556a073a9f5f93e2ad23d118f45c4796a84  # 09:15  G    900     0   24  24  LSM: LoadPin for kernel file loading restrictions
git bisect good 42a4c603198f0d45b7aa936d3ac6ba1b8bd14a1b  # 22:12  G    908     0   27  27  ima: fix ima_inode_post_setattr
git bisect  bad 470bf1f27a1472264d18c84b324389509f0e30b3  # 22:34  B      0     1   12   0  seccomp: Fix comment typo
git bisect  bad 05d1a717ec0430c916a749b94eb90ab74bbfa356  # 23:04  B    146     1    4   4  ima: add support for creating files using the mknodat syscall
# first bad commit: [05d1a717ec0430c916a749b94eb90ab74bbfa356] ima: add support for creating files using the mknodat syscall
git bisect good 42a4c603198f0d45b7aa936d3ac6ba1b8bd14a1b  # 23:28  G   1000     0    1  28  ima: fix ima_inode_post_setattr
# extra tests with CONFIG_DEBUG_INFO_REDUCED
git bisect  bad 05d1a717ec0430c916a749b94eb90ab74bbfa356  # 23:59  B     75     1    3   3  ima: add support for creating files using the mknodat syscall
# extra tests on HEAD of linux-devel/devel-catchup-201704042237
git bisect  bad 43f7aefa53909294720237cd098ae65e0621218d  # 23:59  B     33     2    0   0  0day head guard for 'devel-catchup-201704042237'
# extra tests on tree/branch linus/master
git bisect  bad 39da7c509acff13fc8cb12ec1bb20337c988ed36  # 01:45  B    345     1    0   0  Linux 4.11-rc6
# extra tests with first bad commit reverted
git bisect good 54ebf3717ff597d61e5f992ee2f5c8b9e8cf04ac  # 16:11  G    908     0    0   0  Revert "ima: add support for creating files using the mknodat syscall"
# extra tests on tree/branch linux-next/master

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/lkp                          Intel Corporation

Download attachment "dmesg-yocto-vp-58:20170410231400:i386-randconfig-b0-04042241:4.6.0-rc2-00011-g05d1a71:1.gz" of type "application/gzip" (16708 bytes)

Download attachment "dmesg-yocto-vp-17:20170410094649:i386-randconfig-b0-04042241:4.6.0-rc2-00010-g42a4c60:1.gz" of type "application/gzip" (15696 bytes)

View attachment "reproduce-yocto-vp-58:20170410231400:i386-randconfig-b0-04042241:4.6.0-rc2-00011-g05d1a71:1" of type "text/plain" (901 bytes)

View attachment "config-4.6.0-rc2-00011-g05d1a71" of type "text/plain" (124868 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ