From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8791BC433B4 for ; Fri, 16 Apr 2021 12:16:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6106D61184 for ; Fri, 16 Apr 2021 12:16:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243328AbhDPMRG (ORCPT ); Fri, 16 Apr 2021 08:17:06 -0400 Received: from mail.skyhub.de ([5.9.137.197]:35768 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240467AbhDPMRF (ORCPT ); Fri, 16 Apr 2021 08:17:05 -0400 Received: from zn.tnic (p200300ec2f0cc5001db9c03a7172309d.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:c500:1db9:c03a:7172:309d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 73F431EC009F; Fri, 16 Apr 2021 14:16:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1618575398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=lv0TMcLKA1ayw9GDGqnm7d2eT974/lrFgjYkm021bpI=; b=bG5kqsScMLDkWVe2a53aZYTj9LC/4JZ5UMf6kIBaowU+iJ+Qzy+aFFVaW4YJiLOWFj3ApP XwXe8iugTI3i5dfiGkdWkN/zv05mQS3u8KDzAqlmgcIyygHZFVgoPtPw/LzZRO3atLL5v/ S0IkQilfpehjkuuRRKUO9uz8RKDn3xQ= Date: Fri, 16 Apr 2021 14:16:36 +0200 From: Borislav Petkov To: Mike Galbraith Cc: LKML , DaveYoung , Baoquan He , kexec@lists.infradead.org, x86@kernel.org, Andrew Morton Subject: Re: [patch] x86/crash: fix crash_setup_memmap_entries() out-of-bounds access Message-ID: <20210416121636.GA22348@zn.tnic> References: <9efaad2ba042b8791cbe8c3e7cad491fe05e06eb.camel@gmx.de> <20210416110701.GA3835@dhcp-128-65.nay.redhat.com> <063a63ddea914ac654cbe9a1d1d6c76986af7882.camel@gmx.de> <20210416114708.GB79779@dhcp-128-65.nay.redhat.com> <725fa3dc1da2737f0f6188a1a9701bead257ea9d.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <725fa3dc1da2737f0f6188a1a9701bead257ea9d.camel@gmx.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 16, 2021 at 02:02:07PM +0200, Mike Galbraith wrote: > [ 15.428011] BUG: KASAN: vmalloc-out-of-bounds in crash_setup_memmap_entries+0x17e/0x3a0 > [ 15.428018] Write of size 8 at addr ffffc90000426008 by task kexec/1187 > > (gdb) list *crash_setup_memmap_entries+0x17e > 0xffffffff8107cafe is in crash_setup_memmap_entries (arch/x86/kernel/crash.c:322). > 317 unsigned long long mend) > 318 { > 319 unsigned long start, end; > 320 > 321 cmem->ranges[0].start = mstart; > 322 cmem->ranges[0].end = mend; > 323 cmem->nr_ranges = 1; > 324 > 325 /* Exclude elf header region */ > 326 start = image->arch.elf_load_addr; > (gdb) > > Append missing struct crash_mem_range to cmem. This is winning this year's contest for most laconic patch commit message! :-) Please be more verbose and structure your commit message like this: Problem is A. It happens because of B. Fix it by doing C. (Potentially do D). For more detailed info, see Documentation/process/submitting-patches.rst, Section "2) Describe your changes". Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.skyhub.de ([5.9.137.197]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXNOs-009Lpy-OV for kexec@lists.infradead.org; Fri, 16 Apr 2021 12:16:44 +0000 Date: Fri, 16 Apr 2021 14:16:36 +0200 From: Borislav Petkov Subject: Re: [patch] x86/crash: fix crash_setup_memmap_entries() out-of-bounds access Message-ID: <20210416121636.GA22348@zn.tnic> References: <9efaad2ba042b8791cbe8c3e7cad491fe05e06eb.camel@gmx.de> <20210416110701.GA3835@dhcp-128-65.nay.redhat.com> <063a63ddea914ac654cbe9a1d1d6c76986af7882.camel@gmx.de> <20210416114708.GB79779@dhcp-128-65.nay.redhat.com> <725fa3dc1da2737f0f6188a1a9701bead257ea9d.camel@gmx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <725fa3dc1da2737f0f6188a1a9701bead257ea9d.camel@gmx.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Mike Galbraith Cc: LKML , DaveYoung , Baoquan He , kexec@lists.infradead.org, x86@kernel.org, Andrew Morton On Fri, Apr 16, 2021 at 02:02:07PM +0200, Mike Galbraith wrote: > [ 15.428011] BUG: KASAN: vmalloc-out-of-bounds in crash_setup_memmap_entries+0x17e/0x3a0 > [ 15.428018] Write of size 8 at addr ffffc90000426008 by task kexec/1187 > > (gdb) list *crash_setup_memmap_entries+0x17e > 0xffffffff8107cafe is in crash_setup_memmap_entries (arch/x86/kernel/crash.c:322). > 317 unsigned long long mend) > 318 { > 319 unsigned long start, end; > 320 > 321 cmem->ranges[0].start = mstart; > 322 cmem->ranges[0].end = mend; > 323 cmem->nr_ranges = 1; > 324 > 325 /* Exclude elf header region */ > 326 start = image->arch.elf_load_addr; > (gdb) > > Append missing struct crash_mem_range to cmem. This is winning this year's contest for most laconic patch commit message! :-) Please be more verbose and structure your commit message like this: Problem is A. It happens because of B. Fix it by doing C. (Potentially do D). For more detailed info, see Documentation/process/submitting-patches.rst, Section "2) Describe your changes". Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec