All of lore.kernel.org
 help / color / mirror / Atom feed
* Menu locks / password authentication
@ 2009-02-27 20:53 Robert Millan
  2009-03-03 15:32 ` Vesa Jääskeläinen
  2009-03-08 22:14 ` Michał Radomski
  0 siblings, 2 replies; 9+ messages in thread
From: Robert Millan @ 2009-02-27 20:53 UTC (permalink / raw)
  To: grub-devel


It's funny, we're all discussing about performing security measurements in
GRUB and nobody mentioned that our user interface lacks even the most basic
lock mechanism :-)

Perhaps this would be a good time to retake the discussion on implementing
an equivalent to "lock" and "password" commands.  I think I even sent a patch
a while ago!

Vesa, do you still think we should design an extensible framework for
authentication before we do anything else?  I think it'd be interesting if
we could implement the lock/password paradigm, even if later it would be
replaced, since our users commonly need this, and it's blocking the
transition from GRUB Legacy.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Menu locks / password authentication
  2009-02-27 20:53 Menu locks / password authentication Robert Millan
@ 2009-03-03 15:32 ` Vesa Jääskeläinen
  2009-03-04 21:04   ` Robert Millan
  2009-03-08 22:14 ` Michał Radomski
  1 sibling, 1 reply; 9+ messages in thread
From: Vesa Jääskeläinen @ 2009-03-03 15:32 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan wrote:
> It's funny, we're all discussing about performing security measurements in
> GRUB and nobody mentioned that our user interface lacks even the most basic
> lock mechanism :-)
> 
> Perhaps this would be a good time to retake the discussion on implementing
> an equivalent to "lock" and "password" commands.  I think I even sent a patch
> a while ago!
> 
> Vesa, do you still think we should design an extensible framework for
> authentication before we do anything else?  I think it'd be interesting if
> we could implement the lock/password paradigm, even if later it would be
> replaced, since our users commonly need this, and it's blocking the
> transition from GRUB Legacy.

I think that most important thing at this time is to match needed
functionality with GRUB legacy. So just make it clean and perhaps think
a bit about how it can be easily extended :).

I think there was some hash algorithms posted previously that could be
used for this.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Menu locks / password authentication
  2009-03-03 15:32 ` Vesa Jääskeläinen
@ 2009-03-04 21:04   ` Robert Millan
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Millan @ 2009-03-04 21:04 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, Mar 03, 2009 at 05:32:40PM +0200, Vesa Jääskeläinen wrote:
> Robert Millan wrote:
> > It's funny, we're all discussing about performing security measurements in
> > GRUB and nobody mentioned that our user interface lacks even the most basic
> > lock mechanism :-)
> > 
> > Perhaps this would be a good time to retake the discussion on implementing
> > an equivalent to "lock" and "password" commands.  I think I even sent a patch
> > a while ago!
> > 
> > Vesa, do you still think we should design an extensible framework for
> > authentication before we do anything else?  I think it'd be interesting if
> > we could implement the lock/password paradigm, even if later it would be
> > replaced, since our users commonly need this, and it's blocking the
> > transition from GRUB Legacy.
> 
> I think that most important thing at this time is to match needed
> functionality with GRUB legacy. So just make it clean and perhaps think
> a bit about how it can be easily extended :).
> 
> I think there was some hash algorithms posted previously that could be
> used for this.

Hashing is nice, but basic password support can work without hash.  If you
give grub.cfg the proper perms, that is.

Anyway, for those interested:

  http://www.mail-archive.com/grub-devel@gnu.org/msg05350.html

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Menu locks / password authentication
  2009-02-27 20:53 Menu locks / password authentication Robert Millan
  2009-03-03 15:32 ` Vesa Jääskeläinen
@ 2009-03-08 22:14 ` Michał Radomski
  2009-03-09  7:16   ` phcoder
  1 sibling, 1 reply; 9+ messages in thread
From: Michał Radomski @ 2009-03-08 22:14 UTC (permalink / raw)
  To: The development of GRUB 2

On Fri, Feb 27, 2009 at 09:53:27PM +0100, Robert Millan wrote:
> 
> It's funny, we're all discussing about performing security measurements in
> GRUB and nobody mentioned that our user interface lacks even the most basic
> lock mechanism :-)
> 
Actualy... I'm working on password command... 

At this moment I have plain password checking and 
almost finished MD5 support.

-- 
- -  (_ _) Regards                                       -----,  (_ _)  - -
-     ','  |  Michał Radomski <ezzo (at) poczta (dot) pl>     |   ','     -
- -  vv-   `---                                                    -vv  - -



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Menu locks / password authentication
  2009-03-08 22:14 ` Michał Radomski
@ 2009-03-09  7:16   ` phcoder
  2009-03-09 10:49     ` Michał Radomski
  0 siblings, 1 reply; 9+ messages in thread
From: phcoder @ 2009-03-09  7:16 UTC (permalink / raw)
  To: The development of GRUB 2

Michał Radomski wrote:
> On Fri, Feb 27, 2009 at 09:53:27PM +0100, Robert Millan wrote:
>> It's funny, we're all discussing about performing security measurements in
>> GRUB and nobody mentioned that our user interface lacks even the most basic
>> lock mechanism :-)
>>
> Actualy... I'm working on password command... 
> 
> At this moment I have plain password checking and 
> almost finished MD5 support.
> 
What is your design? Is it expandable? Flexible?

-- 

Regards
Vladimir 'phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Menu locks / password authentication
  2009-03-09  7:16   ` phcoder
@ 2009-03-09 10:49     ` Michał Radomski
  2009-03-09 10:57       ` phcoder
  0 siblings, 1 reply; 9+ messages in thread
From: Michał Radomski @ 2009-03-09 10:49 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Mar 09, 2009 at 08:16:16AM +0100, phcoder wrote:
> Michał Radomski wrote:
>> On Fri, Feb 27, 2009 at 09:53:27PM +0100, Robert Millan wrote:
>>> It's funny, we're all discussing about performing security measurements in
>>> GRUB and nobody mentioned that our user interface lacks even the most basic
>>> lock mechanism :-)
>>>
>> Actualy... I'm working on password command... 
>>
>> At this moment I have plain password checking and almost finished MD5 
>> support.
>>
> What is your design? Is it expandable? Flexible?
>
Flexible Yes, expandable I think yes. 

Password checking is implemented as grub module, which blocks grub
execution until user supply a valid password. Take a look at 2 sample
configs: 

# this config will wait for valid password 
# after that it will show grub menu 
set timeout=5
password --plain qwerty 

menuentry "Linux" {
set root=(hd0,1)
linux /vmlinuz26 root=/dev/sda1 ro
initrd /kernel26.img
}
 
# this config will show menu, but if user would like to boot os,
# it will ask for a password.  
set timeout=5

menuentry "Linux" {
password --md5 md5_hash  
set root=(hd0,1)
linux /vmlinuz26 root=/dev/sda1 ro
initrd /kernel26.img
}


md5 algoritm is implemented as a library(grub2/lib), So it can by easy
used in other source files. 

I've also think about more complex solution (password file)
And I think that it is possible to add, without many changes. 


-- 
- -  (_ _) Regards                                       -----,  (_ _)  - -
-     ','  |  Michał Radomski <ezzo (at) poczta (dot) pl>     |   ','     -
- -  vv-   `---                                                    -vv  - -



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Menu locks / password authentication
  2009-03-09 10:49     ` Michał Radomski
@ 2009-03-09 10:57       ` phcoder
  2009-03-09 20:53         ` Michał Radomski
  0 siblings, 1 reply; 9+ messages in thread
From: phcoder @ 2009-03-09 10:57 UTC (permalink / raw)
  To: The development of GRUB 2

Michał Radomski wrote:
> On Mon, Mar 09, 2009 at 08:16:16AM +0100, phcoder wrote:
>> Michał Radomski wrote:
>>> On Fri, Feb 27, 2009 at 09:53:27PM +0100, Robert Millan wrote:
>>>> It's funny, we're all discussing about performing security measurements in
>>>> GRUB and nobody mentioned that our user interface lacks even the most basic
>>>> lock mechanism :-)
>>>>
>>> Actualy... I'm working on password command... 
>>>
>>> At this moment I have plain password checking and almost finished MD5 
>>> support.
>>>
>> What is your design? Is it expandable? Flexible?
>>
> Flexible Yes, expandable I think yes. 
> 
> Password checking is implemented as grub module, which blocks grub
> execution until user supply a valid password. Take a look at 2 sample
> configs: 
> 
> # this config will wait for valid password 
> # after that it will show grub menu 
> set timeout=5
> password --plain qwerty 
> 
> menuentry "Linux" {
> set root=(hd0,1)
> linux /vmlinuz26 root=/dev/sda1 ro
> initrd /kernel26.img
> }
>  
> # this config will show menu, but if user would like to boot os,
> # it will ask for a password.  
> set timeout=5
> 
> menuentry "Linux" {
> password --md5 md5_hash  
> set root=(hd0,1)
> linux /vmlinuz26 root=/dev/sda1 ro
> initrd /kernel26.img
> }
> 
> 
> md5 algoritm is implemented as a library(grub2/lib), So it can by easy
> used in other source files. 
> 
> I've also think about more complex solution (password file)
> And I think that it is possible to add, without many changes. 
> 
> 

What prevents an attacker from simply pressing 'e' or 'c' in menu? I 
personally would prefer the architecture with users as I described. Also 
I would recommend using other hashes that md5 (e.g. whirlpool or sha-2) 
because it's been depreceated
And blocking is a bad idea because if a legitimate user accidently 
chooses wrong entry he can't press ESC to go back.
Do you already have a copyright assignment?

-- 

Regards
Vladimir 'phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Menu locks / password authentication
  2009-03-09 10:57       ` phcoder
@ 2009-03-09 20:53         ` Michał Radomski
  2009-03-09 22:37           ` phcoder
  0 siblings, 1 reply; 9+ messages in thread
From: Michał Radomski @ 2009-03-09 20:53 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Mar 09, 2009 at 11:57:40AM +0100, phcoder wrote:
> I would recommend using other hashes that md5 (e.g. whirlpool or sha-2)  
> because it's been depreceated
I chose md5 because it is in grub2 wiki (see command list)
It is not a problem to add sha-2 or whirlpool.  

> Do you already have a copyright assignment?
You mean license? GPL3 

md5 code is based on grub-legacy. Some code is mine, some is from old grub. 
I hope that this is not a problem... 

-- 
- -  (_ _) Regards                                       -----,  (_ _)  - -
-     ','  |  Michał Radomski <ezzo (at) poczta (dot) pl>     |   ','     -
- -  vv-   `---                                                    -vv  - -



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Menu locks / password authentication
  2009-03-09 20:53         ` Michał Radomski
@ 2009-03-09 22:37           ` phcoder
  0 siblings, 0 replies; 9+ messages in thread
From: phcoder @ 2009-03-09 22:37 UTC (permalink / raw)
  To: The development of GRUB 2

Michał Radomski wrote:
> On Mon, Mar 09, 2009 at 11:57:40AM +0100, phcoder wrote:
>> I would recommend using other hashes that md5 (e.g. whirlpool or sha-2)  
>> because it's been depreceated
> I chose md5 because it is in grub2 wiki (see command list)
> It is not a problem to add sha-2 or whirlpool.  

grub1 has been depreceated and command list has been provided as a 
feature comparison.

> 
>> Do you already have a copyright assignment?
> You mean license? GPL3 
> 
No if you want to code for grub2 you have to sign the copyright 
assignment. look at "contributing changes"
> md5 code is based on grub-legacy. Some code is mine, some is from old grub. 
> I hope that this is not a problem... 
> 

I think that your design really has to be discussed
-- 

Regards
Vladimir 'phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-03-09 22:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 20:53 Menu locks / password authentication Robert Millan
2009-03-03 15:32 ` Vesa Jääskeläinen
2009-03-04 21:04   ` Robert Millan
2009-03-08 22:14 ` Michał Radomski
2009-03-09  7:16   ` phcoder
2009-03-09 10:49     ` Michał Radomski
2009-03-09 10:57       ` phcoder
2009-03-09 20:53         ` Michał Radomski
2009-03-09 22:37           ` phcoder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.