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'

Submitted by:  TJ <intuitivenipple>
Submitted on:  Sun Feb 9 15:46:40 2014  
 
Category: SecuritySeverity: Major
Priority: 5 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: 2.02~beta1Reproducibility: Every Time
Planned Release: None

Sun Feb 9 15:52:45 2014, comment #1:

Was already fixed in master.

Vladimir Serbinenko <phcoder>
Project Administrator
Sun Feb 9 15:46:40 2014, 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
GRUB_ENABLE_CRYPTODISK=1

root@XPSm1530:/# apt-cache policy grub-pc
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 == '\'')
ptr++;
if (*ptr == 'y')
cfg->is_cryptodisk_enabled = 1;
continue;

TJ <intuitivenipple>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Feb 9 15:52:45 2014phcoderStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1