Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hBN9e-0005rG-In for mharc-grub-devel@gnu.org; Tue, 02 Apr 2019 13:24:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBN9c-0005qx-Mx for grub-devel@gnu.org; Tue, 02 Apr 2019 13:24:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBN8s-00067a-8A for grub-devel@gnu.org; Tue, 02 Apr 2019 13:24:11 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:45759) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hBN8s-000629-0t for grub-devel@gnu.org; Tue, 02 Apr 2019 13:24:10 -0400 Received: from 139.35.155.90.in-addr.arpa ([90.155.35.139] helo=riva.pelham.vpn.ucam.org) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hBN8q-0000MA-0L; Tue, 02 Apr 2019 17:24:08 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtp (Exim 4.89) (envelope-from ) id 1hBN8p-0007Wi-7M; Tue, 02 Apr 2019 18:24:07 +0100 Date: Tue, 2 Apr 2019 18:24:07 +0100 From: Colin Watson To: The development of GNU GRUB Cc: Eric Snowberg , daniel.kiper@oracle.com Subject: Re: [PATCH] ieee1275: Null pointer dereference in grub_ieee1275_encode_devname Message-ID: <20190402172407.eg6422nupfphbeap@riva.ucam.org> References: <1554223231-94892-1-git-send-email-eric.snowberg@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1554223231-94892-1-git-send-email-eric.snowberg@oracle.com> User-Agent: NeoMutt/20170113 (1.7.2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.189.89.112 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2019 17:24:57 -0000 On Tue, Apr 02, 2019 at 09:40:31AM -0700, Eric Snowberg wrote: > Function grub_strndup may return NULL, this is called from function > grub_ieee1275_get_devname which is then called from function > grub_ieee1275_encode_devname to set device. The device variable > could then be used with a NULL pointer. Makes sense to me, and the handling matches how the immediately-following possible grub_malloc failure is handled. Reviewed-by: Colin Watson -- Colin Watson [cjwatson@ubuntu.com]