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: <20210820070300.GB29369@xsang-OptiPlex-9020>
Date:   Fri, 20 Aug 2021 15:03:00 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     Christoph Hellwig <hch@....de>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        lkp@...ts.01.org, lkp@...el.com
Subject: [bio]  a4aa1b0494: BUG:kernel_NULL_pointer_dereference,address



Greeting,

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

commit: a4aa1b0494ea9e90022c4d9ff6d99aaf211cdf7c ("bio: optimize initialization of a bio")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master


in testcase: blktests
version: blktests-x86_64-62ec9d6-1_20210818
with following parameters:

	test: srp-group-01
	ucode: 0xe2



on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz with 32G memory

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



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


[   28.320872][ T1121] BUG: kernel NULL pointer dereference, address: 0000000000000336
[   28.328534][ T1121] #PF: supervisor read access in kernel mode
[   28.334370][ T1121] #PF: error_code(0x0000) - not-present page
[   28.340220][ T1121] PGD 0 P4D 0
[   28.343460][ T1121] Oops: 0000 [#1] SMP PTI
[   28.347647][ T1121] CPU: 0 PID: 1121 Comm: dd Tainted: G          I       5.14.0-rc5-00049-ga4aa1b0494ea #1
[   28.357403][ T1121] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.1.1 10/07/2015
[ 28.365515][ T1121] RIP: 0010:bio_integrity_alloc (block/bio-integrity.c:59 (discriminator 1)) 
[ 28.371179][ T1121] Code: 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 41 56 41 55 41 89 f5 41 54 55 89 d5 53 4c 8b 77 70 48 89 fb 4d 85 f6 74 7f <49> 83 be b0 00 00 00 00 74 75 49 8d be a0 00 00 00 e8 4c 49 c9 ff
All code
========
   0:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
   7:	00 
   8:	0f 1f 40 00          	nopl   0x0(%rax)
   c:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  11:	41 56                	push   %r14
  13:	41 55                	push   %r13
  15:	41 89 f5             	mov    %esi,%r13d
  18:	41 54                	push   %r12
  1a:	55                   	push   %rbp
  1b:	89 d5                	mov    %edx,%ebp
  1d:	53                   	push   %rbx
  1e:	4c 8b 77 70          	mov    0x70(%rdi),%r14
  22:	48 89 fb             	mov    %rdi,%rbx
  25:	4d 85 f6             	test   %r14,%r14
  28:	74 7f                	je     0xa9
  2a:*	49 83 be b0 00 00 00 	cmpq   $0x0,0xb0(%r14)		<-- trapping instruction
  31:	00 
  32:	74 75                	je     0xa9
  34:	49 8d be a0 00 00 00 	lea    0xa0(%r14),%rdi
  3b:	e8 4c 49 c9 ff       	callq  0xffffffffffc9498c

Code starting with the faulting instruction
===========================================
   0:	49 83 be b0 00 00 00 	cmpq   $0x0,0xb0(%r14)
   7:	00 
   8:	74 75                	je     0x7f
   a:	49 8d be a0 00 00 00 	lea    0xa0(%r14),%rdi
  11:	e8 4c 49 c9 ff       	callq  0xffffffffffc94962
[   28.390663][ T1121] RSP: 0018:ffffc900009d7ad8 EFLAGS: 00010202
[   28.396597][ T1121] RAX: 000ffff88885d4e0 RBX: ffffc900009d7c90 RCX: 0000000000000002
[   28.404433][ T1121] RDX: 0000000000000002 RSI: 0000000000000c00 RDI: ffffc900009d7c90
[   28.412279][ T1121] RBP: 0000000000000002 R08: 0000000000002000 R09: 0000000000000400
[   28.420108][ T1121] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000002000
[   28.427944][ T1121] R13: 0000000000000c00 R14: 0000000000000286 R15: ffff888861f6a800
[   28.435775][ T1121] FS:  00007f923909f580(0000) GS:ffff88882da00000(0000) knlGS:0000000000000000
[   28.444561][ T1121] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   28.451008][ T1121] CR2: 0000000000000336 CR3: 000000085f4a6001 CR4: 00000000003706f0
[   28.458839][ T1121] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   28.466669][ T1121] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   28.474501][ T1121] Call Trace:
[ 28.477643][ T1121] bio_integrity_prep (block/bio-integrity.c:252) 
[ 28.482435][ T1121] blk_mq_submit_bio (block/blk-mq.c:2192) 
[ 28.487142][ T1121] submit_bio_noacct (block/blk-core.c:1011 block/blk-core.c:1044) 
[ 28.491934][ T1121] ? __blkdev_direct_IO_simple (fs/block_dev.c:285) 
[ 28.497594][ T1121] __blkdev_direct_IO_simple (fs/block_dev.c:283) 
[ 28.503081][ T1121] ? __handle_mm_fault (mm/memory.c:4556 mm/memory.c:4693) 
[ 28.508059][ T1121] ? kernel_init_free_pages+0x4d/0x80 
[ 28.513892][ T1121] ? blkdev_get_block (fs/block_dev.c:224) 
[ 28.518601][ T1121] generic_file_direct_write (mm/filemap.c:3558) 
[ 28.524008][ T1121] __generic_file_write_iter (mm/filemap.c:3740) 
[ 28.529420][ T1121] blkdev_write_iter (fs/block_dev.c:1645) 
[ 28.534124][ T1121] new_sync_write (fs/read_write.c:519 (discriminator 1)) 
[ 28.538669][ T1121] vfs_write (fs/read_write.c:605) 
[ 28.542765][ T1121] ksys_write (fs/read_write.c:658) 
[ 28.546866][ T1121] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
[ 28.551137][ T1121] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113) 
[   28.556890][ T1121] RIP: 0033:0x7f9238fc7504
[ 28.561174][ T1121] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b3 0f 1f 80 00 00 00 00 48 8d 05 f9 61 0d 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53
All code
========
   0:	00 f7                	add    %dh,%bh
   2:	d8 64 89 02          	fsubs  0x2(%rcx,%rcx,4)
   6:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
   d:	eb b3                	jmp    0xffffffffffffffc2
   f:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
  16:	48 8d 05 f9 61 0d 00 	lea    0xd61f9(%rip),%rax        # 0xd6216
  1d:	8b 00                	mov    (%rax),%eax
  1f:	85 c0                	test   %eax,%eax
  21:	75 13                	jne    0x36
  23:	b8 01 00 00 00       	mov    $0x1,%eax
  28:	0f 05                	syscall 
  2a:*	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax		<-- trapping instruction
  30:	77 54                	ja     0x86
  32:	c3                   	retq   
  33:	0f 1f 00             	nopl   (%rax)
  36:	41 54                	push   %r12
  38:	49 89 d4             	mov    %rdx,%r12
  3b:	55                   	push   %rbp
  3c:	48 89 f5             	mov    %rsi,%rbp
  3f:	53                   	push   %rbx

Code starting with the faulting instruction
===========================================
   0:	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax
   6:	77 54                	ja     0x5c
   8:	c3                   	retq   
   9:	0f 1f 00             	nopl   (%rax)
   c:	41 54                	push   %r12
   e:	49 89 d4             	mov    %rdx,%r12
  11:	55                   	push   %rbp
  12:	48 89 f5             	mov    %rsi,%rbp
  15:	53                   	push   %rbx
[   28.580650][ T1121] RSP: 002b:00007ffcec240428 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[   28.588927][ T1121] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9238fc7504
[   28.596771][ T1121] RDX: 0000000000100000 RSI: 00007f9238c32000 RDI: 0000000000000001
[   28.604617][ T1121] RBP: 0000000000100000 R08: 00000000ffffffff R09: 0000000000000000
[   28.607231][  T348] job=/lkp/jobs/scheduled/lkp-skl-d03/blktests-srp-group-01-ucode=0xe2-debian-10.4-x86_64-20200603.cgz-a4aa1b0494ea9e90022c4d9ff6d99aaf211cdf7c-20210820-43875-1u57eak-2.yaml
[   28.612453][ T1121] R10: ffffffffffffff3b R11: 0000000000000246 R12: 00007f9238c32000
[   28.612454][ T1121] R13: 0000000000000000 R14: 0000000000000000 R15: 00007f9238c32000
[   28.612455][ T1121] Modules linked in: ib_srpt
[   28.629500][  T348]
[   28.637329][ T1121]  target_core_iblock target_core_mod rdma_cm iw_cm ib_cm ib_umad scsi_debug rdma_rxe ip6_udp_tunnel udp_tunnel ib_uverbs null_blk ib_core loop xfs libcrc32c dm_multipath dm_mod ipmi_devintf ipmi_msghandler sd_mod t10_pi sg intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel i915 kvm intel_gtt ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops irqbypass crct10dif_pclmul drm mei_wdt wmi_bmof crc32_pclmul ahci crc32c_intel ghash_clmulni_intel libahci mei_me rapl intel_cstate mei intel_pch_thermal intel_uncore libata wmi video intel_pmc_core acpi_pad ip_tables
[   28.707256][ T1121] CR2: 0000000000000336
[   28.711267][ T1121] ---[ end trace fc7c690e5cba113e ]---
[ 28.716649][ T1121] RIP: 0010:bio_integrity_alloc (block/bio-integrity.c:59 (discriminator 1)) 
[ 28.722310][ T1121] Code: 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 41 56 41 55 41 89 f5 41 54 55 89 d5 53 4c 8b 77 70 48 89 fb 4d 85 f6 74 7f <49> 83 be b0 00 00 00 00 74 75 49 8d be a0 00 00 00 e8 4c 49 c9 ff
All code
========
   0:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
   7:	00 
   8:	0f 1f 40 00          	nopl   0x0(%rax)
   c:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  11:	41 56                	push   %r14
  13:	41 55                	push   %r13
  15:	41 89 f5             	mov    %esi,%r13d
  18:	41 54                	push   %r12
  1a:	55                   	push   %rbp
  1b:	89 d5                	mov    %edx,%ebp
  1d:	53                   	push   %rbx
  1e:	4c 8b 77 70          	mov    0x70(%rdi),%r14
  22:	48 89 fb             	mov    %rdi,%rbx
  25:	4d 85 f6             	test   %r14,%r14
  28:	74 7f                	je     0xa9
  2a:*	49 83 be b0 00 00 00 	cmpq   $0x0,0xb0(%r14)		<-- trapping instruction
  31:	00 
  32:	74 75                	je     0xa9
  34:	49 8d be a0 00 00 00 	lea    0xa0(%r14),%rdi
  3b:	e8 4c 49 c9 ff       	callq  0xffffffffffc9498c

Code starting with the faulting instruction
===========================================
   0:	49 83 be b0 00 00 00 	cmpq   $0x0,0xb0(%r14)
   7:	00 
   8:	74 75                	je     0x7f
   a:	49 8d be a0 00 00 00 	lea    0xa0(%r14),%rdi
  11:	e8 4c 49 c9 ff       	callq  0xffffffffffc94962


To reproduce:

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp install                job.yaml  # job file is attached in this email
        bin/lkp split-job --compatible job.yaml  # generate the yaml file for lkp run
        bin/lkp run                    generated-yaml-file



---
0DAY/LKP+ Test Infrastructure                   Open Source Technology Center
https://lists.01.org/hyperkitty/list/lkp@lists.01.org       Intel Corporation

Thanks,
Oliver Sang


View attachment "config-5.14.0-rc5-00049-ga4aa1b0494ea" of type "text/plain" (175472 bytes)

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

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

View attachment "job.yaml" of type "text/plain" (4596 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ