Skip to contentSkip to conversation

early params NULL pointer deref fix

PATCH In review Cyrill Gorcunov 2 participants 3 messages Jul 5, 2008 – Jul 9, 2008

lore
Share & tools
lore
#0 lore raw

cover early params NULL pointer deref fix

This series fix a possible NULL pointer deref in case if user
was stupid enough to pass boot parameter without a mandatory value

Actually there is a number of such issues on other platforms too
(like powerpc, sh, s390) so I think it should be fixed too (any volunteers?)

Any comments are welcome.

- Cyrill -

#1 lore raw
Quoted 8 lines · Cyrill Gorcunov

This series fix a possible NULL pointer deref in case if user was
stupid enough to pass boot parameter without a mandatory value

Actually there is a number of such issues on other platforms too
(like powerpc, sh, s390) so I think it should be fixed too (any volunteers?)

Any comments are welcome.

thanks Cyrill, i picked them up.

I'm wondering, would it be possible to filter NULL out on one higher level? Would it break any existing functionality? (i dont think it would or should)

Ingo

#2 lore raw

[Ingo Molnar - Wed, Jul 09, 2008 at 01:57:48PM +0200]

| 
| * Cyrill Gorcunov <[email protected]> wrote:
| 
| >  This series fix a possible NULL pointer deref in case if user was 
| > stupid enough to pass boot parameter without a mandatory value
| > 
| >  Actually there is a number of such issues on other platforms too 
| > (like powerpc, sh, s390) so I think it should be fixed too (any 
| > volunteers?)
| > 
| >  Any comments are welcome.
| 
| thanks Cyrill, i picked them up.
| 
| I'm wondering, would it be possible to filter NULL out on one higher 
| level? Would it break any existing functionality? (i dont think it would 
| or should)
| 
| 	Ingo
| 

well, actually it would and should :)

Currently parser does a simple thing - just parses command line and split key/param pairs. But kernel code uses it in three ways:

1) as simple flag specified on booting
2) as key and value
3) combination of 1) and 2)

So for now I don't see any simple solution for this. We could use '=' param postfix to specify that a mandatory value required for param and throw out any misconfigured boot options but it will make way 3) invalid so kernel code will have to be fixed then. So some additional review and conversation about this are needed.

- Cyrill -