bugGNU GRUB - Bugs: bug #41524, value of GRUB_ENABLE_CRYPTODISK:...


You are not allowed to post comments on this tracker with your current authentication level.

bug #41524: value of GRUB_ENABLE_CRYPTODISK: util/grub-install.c instructs '1' but util/config.c expects 'y'

Submitter:  TJ <intuitivenipple>
Submitted:  Sun 09 Feb 2014 03:46:40 PM UTC
Category:  Security Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  2.02~beta1
Release:  Reproducibility:  Every Time
Planned Release:  None

Sun 09 Feb 2014 03:52:45 PM UTC, comment #1: 

Was already fixed in master.

Vladimir Serbinenko <phcoder>
Group administrator
Sun 09 Feb 2014 03:46:40 PM UTC, original submission:  

root@XPSm1530:/# grub-install /dev/sdc
Installing for i386-pc platform.
grub-install: error: attempt to install to encrypted disk without cryptodisk enabled. Set `GRUB_ENABLE_CRYPTODISK=1' in file `/etc/default/grub'.

root@XPSm1530:/# grep GRUB_ENABLE_CRYPTODISK /etc/default/grub

root@XPSm1530:/# apt-cache policy grub-pc
  Installed: 2.02~beta2-6
  Candidate: 2.02~beta2-6
  Version table:
 *** 2.02~beta2-6 0
        500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
        100 /var/lib/dpkg/status

The message give incorrect information about the value to be assigned.

# grep -A 4 '!config\.is_cryptodisk_enabled' util/grub-install.c
  if (!config.is_cryptodisk_enabled && have_cryptodisk)
    grub_util_error (_("attempt to install to encrypted disk without cryptodisk enabled. "
                       "Set `%s' in file `%s'."), "GRUB_ENABLE_CRYPTODISK=1",
                     grub_util_get_config_filename ());

It appears to assume that any boolean-like value is acceptable, whereas the configuration scanner only looks for 'y'.

# grep -A5 GRUB_ENABLE_CRYPTODISK util/config.c
      if (grub_strncmp (ptr, "GRUB_ENABLE_CRYPTODISK=",
                        sizeof ("GRUB_ENABLE_CRYPTODISK=") - 1) == 0)
          ptr += sizeof ("GRUB_ENABLE_CRYPTODISK=") - 1;
          if (*ptr == '"' || *ptr == '\'')
          if (*ptr == 'y')
            cfg->is_cryptodisk_enabled = 1;

TJ <intuitivenipple>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by intuitivenipple (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-09 phcoder StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code