Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5148169imm; Tue, 19 Jun 2018 05:59:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL3EMuAQofkxeI/Ong3j5BW5QseyZHezsZrJT9yIj3O67kgKA/SJPbOn3Ltr5eEBovdeUA3 X-Received: by 2002:a17:902:868b:: with SMTP id g11-v6mr18384144plo.305.1529413152303; Tue, 19 Jun 2018 05:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529413152; cv=none; d=google.com; s=arc-20160816; b=qJDi+mJtJ8x+77gjNPGFYv5H9TFeCztljJnTyUh0AvosRrJ0M2VjTCDU0CZ7cwhg/q /fhkc4yNIZ/QGD1MRBCqwaABsw1/a3ktOLR2WjbcEXJyELn9Ar2+sWNtoBodCD2eyGUr tH9KD7ZruC4RmrmMx1m8aNKGyLXN8u1SoouIDi4Ki9gCyV2SClfpjHqyZKB3vb8jYRXW FPhbPvNVDfmjIauQ7zTK1PXE48fTSpoBxvLRYP36XLXrdnFdTy186yr4rNH5debhWklB rbn1VMZlphktk2dX1skYi2928asEpr6G4+Tbq8FCYkxxQIzOWXtfarHBCBsboCDFz3rr 4foQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:to:from:date:arc-authentication-results; bh=8jcxhTK05wtD2sVtps/LNJ2KRpS+OA5x4/88yWdGfQU=; b=RjILzr/eo07doInpQRzAFFw6s8VflpIvBX/Prqnolg1Oqmc3Dset9jUyPZEyRBqUzE 2XEj0VlFzfWzEeTaRV58JVDpearO7TYzPInybhrynkoe94zGl7wmhNnQwuSpaPbN4PgA DfN/j6ndUOgibkKW3FlVUUOK1lx+8QpT9tUt0Hg0T18ct1Kh367qjmxJ9wn8yuDeJ5Lc UwtJIydmHM7Ukdl04pF0MqhVytGD47RJc88vGQrTWH9WSGUgGjaBVBbo8oer3zhAdsPc 0XF/y3jvIRm6Vl83/BC/E6j+t2X5P4Pv6C+AQ+C0l49Vf9X0t55OCsqFLGI43zhnjgzv dikw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1-v6si6615404pgs.377.2018.06.19.05.58.58; Tue, 19 Jun 2018 05:59:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966189AbeFSM6M (ORCPT + 99 others); Tue, 19 Jun 2018 08:58:12 -0400 Received: from smtp1.it.da.ut.ee ([193.40.5.66]:37714 "EHLO smtp1.it.da.ut.ee" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965727AbeFSM6K (ORCPT ); Tue, 19 Jun 2018 08:58:10 -0400 Received: from math.ut.ee (unknown [IPv6:2001:bb8:2002:2400:5054:ff:fe3b:8db9]) by smtp1.it.da.ut.ee (Postfix) with ESMTP id 41A2E90015; Tue, 19 Jun 2018 15:58:08 +0300 (EEST) Received: by math.ut.ee (Postfix, from userid 1014) id 2F5382205E1; Tue, 19 Jun 2018 15:58:06 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by math.ut.ee (Postfix) with ESMTP id 383932205D1; Tue, 19 Jun 2018 15:58:06 +0300 (EEST) Date: Tue, 19 Jun 2018 15:58:06 +0300 (EEST) From: Meelis Roos To: Linux Kernel list , openipmi-developer@lists.sourceforge.net Subject: iomi-si UBSAN warning and NULL pointer dereference Message-ID: User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I tried 4.18.0-rc1-00043-gba4dbdedd3ed on HP Proliant Microserver N36L and got the follsing UBSAN warning + NULL pointer dereferences. It was working without any warnings in 4.17.0. [ 7.587532] ipmi message handler version 39.2 [ 7.594899] ipmi device interface [ 7.605792] IPMI System Interface driver. [ 7.605949] ipmi_si dmi-ipmi-si.0: ipmi_platform: probing via SMBIOS [ 7.606047] ipmi_si: SMBIOS: mem 0x0 regsize 1 spacing 1 irq 0 [ 7.606120] ipmi_si: Adding SMBIOS-specified kcs state machine [ 7.606326] ipmi_si: Trying SMBIOS-specified kcs state machine at mem address 0x0, slave address 0x20, irq 0 [ 7.606463] ipmi_si dmi-ipmi-si.0: Could not set up I/O space [ 7.606534] ================================================================================ [ 7.606629] UBSAN: Undefined behaviour in drivers/char/ipmi/ipmi_msghandler.c:3477:6 [ 7.606722] member access within null pointer of type 'struct ipmi_smi' [ 7.606797] CPU: 1 PID: 1360 Comm: systemd-udevd Not tainted 4.18.0-rc1-00043-gba4dbdedd3ed #26 [ 7.606892] Hardware name: HP ProLiant MicroServer, BIOS O41 10/01/2013 [ 7.606962] Call Trace: [ 7.607042] ? dump_stack+0x5a/0x9b [ 7.607116] ? ubsan_epilogue+0x9/0x40 [ 7.607188] ? ubsan_type_mismatch_common+0x11f/0x1a0 [ 7.607260] ? __ubsan_handle_type_mismatch+0x3a/0x60 [ 7.607337] ? ipmi_unregister_smi+0x55c/0x570 [ipmi_msghandler] [ 7.607424] ? try_smi_init+0xbaa/0x1ab5 [ipmi_si] [ 7.607509] ? init_ipmi_si+0x158/0x240 [ipmi_si] [ 7.607590] ? ipmi_si_add_smi+0x390/0x390 [ipmi_si] [ 7.607662] ? do_one_initcall+0x58/0x230 [ 7.607735] ? kmem_cache_alloc+0x43/0x1f0 [ 7.607807] ? do_init_module+0xa7/0x2a9 [ 7.607877] ? load_module+0x1f40/0x3510 [ 7.607947] ? __symbol_put+0x80/0x80 [ 7.608020] ? kernel_read_file+0x229/0x3a0 [ 7.608092] ? __do_sys_finit_module+0xfa/0x120 [ 7.608163] ? do_syscall_64+0x5a/0x1e0 [ 7.608233] ? page_fault+0x8/0x30 [ 7.608306] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 7.608376] ================================================================================ [ 7.608503] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [ 7.608600] PGD 0 P4D 0 [ 7.608672] Oops: 0000 [#1] SMP NOPTI [ 7.608743] CPU: 1 PID: 1360 Comm: systemd-udevd Not tainted 4.18.0-rc1-00043-gba4dbdedd3ed #26 [ 7.608836] Hardware name: HP ProLiant MicroServer, BIOS O41 10/01/2013 [ 7.608913] RIP: 0010:ipmi_unregister_smi+0x31/0x570 [ipmi_msghandler] [ 7.608982] Code: 54 55 48 89 fd 53 48 83 ec 30 65 48 8b 04 25 28 00 00 00 48 89 44 24 28 31 c0 48 85 ff 0f 84 24 05 00 00 48 c7 c7 c0 23 16 c0 <44> 8b 65 00 e8 a6 65 5c c2 48 83 fd f0 c7 45 00 ff ff ff ff c6 45 [ 7.609210] RSP: 0018:ffffa52c40227bb8 EFLAGS: 00010292 [ 7.609281] RAX: 0000000000000000 RBX: ffff8e8e3b2df200 RCX: 0000000000000006 [ 7.609352] RDX: 0000000000000000 RSI: 0000000000000202 RDI: ffffffffc01623c0 [ 7.609424] RBP: 0000000000000000 R08: 0000000000000199 R09: 000000000000025a [ 7.609495] R10: ffffffff821bc0b0 R11: 0000000000000006 R12: ffffffffc0181aa8 [ 7.609566] R13: 0000000000000000 R14: ffff8e8e3b2df240 R15: ffffffffc0181260 [ 7.609640] FS: 00007fef3a80b8c0(0000) GS:ffff8e8e3dd00000(0000) knlGS:0000000000000000 [ 7.609734] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7.609803] CR2: 0000000000000000 CR3: 000000003ab1a000 CR4: 00000000000006e0 [ 7.609873] Call Trace: [ 7.609956] ? try_smi_init+0xbaa/0x1ab5 [ipmi_si] [ 7.610040] ? init_ipmi_si+0x158/0x240 [ipmi_si] [ 7.610121] ? ipmi_si_add_smi+0x390/0x390 [ipmi_si] [ 7.610191] ? do_one_initcall+0x58/0x230 [ 7.610262] ? kmem_cache_alloc+0x43/0x1f0 [ 7.610333] ? do_init_module+0xa7/0x2a9 [ 7.610404] ? load_module+0x1f40/0x3510 [ 7.610475] ? __symbol_put+0x80/0x80 [ 7.610547] ? kernel_read_file+0x229/0x3a0 [ 7.610618] ? __do_sys_finit_module+0xfa/0x120 [ 7.610689] ? do_syscall_64+0x5a/0x1e0 [ 7.610759] ? page_fault+0x8/0x30 [ 7.610832] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 7.610902] Modules linked in: ipmi_si(+) ipmi_devintf ipmi_msghandler k10temp jc42 w83795 eeprom ip_tables [ 7.611014] CR2: 0000000000000000 [ 7.611094] ---[ end trace 099b4ef2a90b74a1 ]--- [ 7.611170] RIP: 0010:ipmi_unregister_smi+0x31/0x570 [ipmi_msghandler] [ 7.611239] Code: 54 55 48 89 fd 53 48 83 ec 30 65 48 8b 04 25 28 00 00 00 48 89 44 24 28 31 c0 48 85 ff 0f 84 24 05 00 00 48 c7 c7 c0 23 16 c0 <44> 8b 65 00 e8 a6 65 5c c2 48 83 fd f0 c7 45 00 ff ff ff ff c6 45 [ 7.611466] RSP: 0018:ffffa52c40227bb8 EFLAGS: 00010292 [ 7.611537] RAX: 0000000000000000 RBX: ffff8e8e3b2df200 RCX: 0000000000000006 [ 7.611609] RDX: 0000000000000000 RSI: 0000000000000202 RDI: ffffffffc01623c0 [ 7.611680] RBP: 0000000000000000 R08: 0000000000000199 R09: 000000000000025a [ 7.611751] R10: ffffffff821bc0b0 R11: 0000000000000006 R12: ffffffffc0181aa8 [ 7.611822] R13: 0000000000000000 R14: ffff8e8e3b2df240 R15: ffffffffc0181260 [ 7.611894] FS: 00007fef3a80b8c0(0000) GS:ffff8e8e3dd00000(0000) knlGS:0000000000000000 [ 7.611988] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7.612067] CR2: 0000000000000000 CR3: 000000003ab1a000 CR4: 00000000000006e0 -- Meelis Roos (mroos@linux.ee)