grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: latest grub2 & unaligned pointer in gfxmenu


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: latest grub2 & unaligned pointer in gfxmenu
Date: Mon, 16 Feb 2015 09:14:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0

On 15.02.2015 16:57, Toomas Soome wrote:
> 
> ah, nevermind the gfxmenu;
> 
> 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_unmount and 
> returns error code. then grub_file_open() jumps to fail_ label, calls 
> grub_file_close(), which in turn gets back to zfs_unmount() and you get null 
> pointer dereferences. 
> 
> so, the bug is about zfs_unmount() function and the fix is also simple, 
> zfs_unmount should return if data == NULL.
> 
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?
> 
> 
>> On 12.02.2015, at 20:28, Toomas Soome <address@hidden> wrote:
>>
>>
>> hi!
>>
>> is there any known bugs related gfxmenu?  i’m getting unaligned pointer 
>> error on binary built on illumos (gcc-4.4.4).
>>
>> the issue only appears when theme is configured in grub.cfg, without it and 
>> gfxterm in cli mode does work.
>>
>> rgds,
>> toomas
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]