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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA990C433F5 for ; Fri, 15 Oct 2021 21:14:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85FD8611C8 for ; Fri, 15 Oct 2021 21:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243088AbhJOVQm (ORCPT ); Fri, 15 Oct 2021 17:16:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243055AbhJOVQj (ORCPT ); Fri, 15 Oct 2021 17:16:39 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 756D2C061762 for ; Fri, 15 Oct 2021 14:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Q/oTrsPpaE1Rtcq8TOqDuEDg3qlnRAaq9t8odxoT1cA=; b=1GBhuy2rSsKcj+/nGXXGxIn8ii vlt2IUXR/uSRlPwf5YLWO8aqdFAF0hvFgn6dvEK1tZ1pXT4mDGsGWmpT8SHN5/wC8vhxGMP6VXl7i KOWatdnT6qRfLHBtr68USScIok6SPyBHatyiWbxlI1ZsyuM3sGj7jA58GbtEuuwwrBRqoeWPJmezk DCtyl96ZIOYw5GYu00ccfXRQtrHo9Bdwe5Z2zZJ6oEzpXl6ctBFpwkvPifnFZUgA4ed6R0osNL/OW b3WjD/fmBeyntYS2brBuw6pk3mZurB0DAOYD1ZcHCwVRbpIOk03QNrvEUdCPj+9mgnyPjBMtOv42n kmyPc0vw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbUX9-008nOm-7D; Fri, 15 Oct 2021 21:14:31 +0000 Date: Fri, 15 Oct 2021 14:14:31 -0700 From: Luis Chamberlain To: Shuah Khan Cc: jeyu@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] module: fix validate_section_offset() overflow bug on 64-bit Message-ID: References: <20211015205741.38283-1-skhan@linuxfoundation.org> <20211015205741.38283-2-skhan@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211015205741.38283-2-skhan@linuxfoundation.org> Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 15, 2021 at 02:57:41PM -0600, Shuah Khan wrote: > validate_section_offset() uses unsigned long local variable to > add/store shdr->sh_offset and shdr->sh_size on all platforms. > unsigned long is too short when sh_offset is Elf64_Off which > would be the case on 64bit ELF headers. > > Fix the overflow problem using the right size local variable when > CONFIG_64BIT is defined. > > Signed-off-by: Shuah Khan Thanks for doing this! I put this through the 0-day grinder. In the meantime, since this talks about a fix, can the commit log be a bit more descriptive about the impact of not applying the fix? In what situation would not having this patch applied create an issue? Is this theoretical or can an issue really happen. Has an issue gone undiscovered for a while, and if so what could the consequences have been all along? And it would seem this issue was found through code inspection, not through a real bug, correct? If this can be clarified on the commit log as well that would be great! Luis