From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YNHlr-0008IX-Nm for mharc-grub-devel@gnu.org; Mon, 16 Feb 2015 04:15:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNHlp-0008Hv-5Z for grub-devel@gnu.org; Mon, 16 Feb 2015 04:15:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNHlj-0006MR-C5 for grub-devel@gnu.org; Mon, 16 Feb 2015 04:15:13 -0500 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:38806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNHlj-0006KK-67 for grub-devel@gnu.org; Mon, 16 Feb 2015 04:15:07 -0500 Received: by mail-we0-f182.google.com with SMTP id m14so22089297wev.13 for ; Mon, 16 Feb 2015 01:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=5Ipf3oyQZJ5Ps2xjAAqwn9zvg30d8Elx719KQhvtrow=; b=ZVb19BpZxvcmpUXlbKIvMw/2wl3hfVKYqaOtYqS4iZC7dK5tagJceuwoEV6HoCMZE1 PGH2wXOPKskEMHVENbXhCBeIjw6hd2H0wovevGThb72o1LVrAz34ror+gk8EVDpR89NV AH2xdxFg80PTzxIn+ydzekWoFDkKatNF9tXBYm3QMd6luiaPVf6ws//hv/ntkg6J0unW ELXZYCpWefBxTBDHZJjnL2PXlV96gsDaVG0nD3kAzquO+fBi3+zVs7Khk8NXmMzvw9FS sqh9F9xWkd+vj01FHOjY85/CxEH2/ds6hS19M/WZBl05XAFecsCyoNsXCUKeHhiGw7mx qayw== X-Received: by 10.194.95.200 with SMTP id dm8mr49338239wjb.122.1424078106102; Mon, 16 Feb 2015 01:15:06 -0800 (PST) Received: from [192.168.42.12] (152.228.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch. [178.197.228.152]) by mx.google.com with ESMTPSA id o7sm14748523wix.12.2015.02.16.01.15.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 01:15:05 -0800 (PST) Message-ID: <54E1A6E8.7070902@gmail.com> Date: Mon, 16 Feb 2015 09:14:32 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-Version: 1.0 To: Toomas Soome , The development of GRUB 2 Subject: Re: latest grub2 & unaligned pointer in gfxmenu References: <6DC188A9-830D-4B44-8444-83A52B768F4A@me.com> <01167E52-2B3A-4BAB-AFED-7DAACBCBE3D8@me.com> In-Reply-To: <01167E52-2B3A-4BAB-AFED-7DAACBCBE3D8@me.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4OEbcTiNWIUc6l7hk3HfvcI1QpsoWoMkG" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::236 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 09:15:14 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4OEbcTiNWIUc6l7hk3HfvcI1QpsoWoMkG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 15.02.2015 16:57, Toomas Soome wrote: >=20 > ah, nevermind the gfxmenu; >=20 > the bug was triggered by [ -s filename ] test, with non-existing file. = what happens is that grub_zfs_open() will get an error, calls zfs_unmoun= t and returns error code. then grub_file_open() jumps to fail_ label, cal= ls grub_file_close(), which in turn gets back to zfs_unmount() and you ge= t null pointer dereferences.=20 >=20 > so, the bug is about zfs_unmount() function and the fix is also simple,= zfs_unmount should return if data =3D=3D NULL. >=20 Sorry, it doesn't make any sense. In kern/file.c at fail label you have: if (device) grub_device_close (device); /* if (net) grub_net_close (net); */ grub_free (file); grub_memcpy (grub_file_filters_enabled, grub_file_filters_all, sizeof (grub_file_filters_enabled)); Which has only grub_free, no grub_file_close call. Do you see sth different there? What kind of ZFS is it? Is it a simple one-device one or something more complicated? >=20 >=20 >> On 12.02.2015, at 20:28, Toomas Soome wrote: >> >> >> hi! >> >> is there any known bugs related gfxmenu? i=E2=80=99m getting unaligne= d pointer error on binary built on illumos (gcc-4.4.4). >> >> the issue only appears when theme is configured in grub.cfg, without i= t and gfxterm in cli mode does work. >> >> rgds, >> toomas >=20 >=20 --4OEbcTiNWIUc6l7hk3HfvcI1QpsoWoMkG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iF4EAREKAAYFAlThpvYACgkQmBXlbbo5nOsVuAD/X4YE4qm0DwNIu82WzKl+AE4b lYK3vuJHdnwOqo9xcqMA+waEGiAYZsw9PabyPkhvA39bumpL+VTxtH24Cf+L2vRs =E4qR -----END PGP SIGNATURE----- --4OEbcTiNWIUc6l7hk3HfvcI1QpsoWoMkG--