enables access to .config

This is a discussion on enables access to .config within the Linux Security forums, part of the System Security and Security Related category; Hi, the linux kernel has the option "Enable access to .config through /proc/config.gz" This allows every ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-30-2005
Christian Christmann
 
Posts: n/a
Default enables access to .config

Hi,

the linux kernel has the option
"Enable access to .config through /proc/config.gz"

This allows every user to read the kernel configuration.

Is this not dangerous on a public server like one at a
university where students connect to via ssh?

Chris
Reply With Quote
  #2 (permalink)  
Old 03-30-2005
Stachu 'Dozzie' K.
 
Posts: n/a
Default Re: enables access to .config

On 30.03.2005, Christian Christmann <plfriko@yahoo.de> wrote:
> the linux kernel has the option
> "Enable access to .config through /proc/config.gz"
>
> This allows every user to read the kernel configuration.
>
> Is this not dangerous on a public server like one at a
> university where students connect to via ssh?


If you have some kernel configuration options/patches that you wouldn't
like to show to students, then you should disable this option.
Did you chmod-ed /usr/src that students can't read
/usr/src/linux/.config? If not, then enabling this option won't disclose
any additional information to students.
After all, if you're using 2.6.x kernel (is it the case?) you can always
chmod /proc/config.gz.

--
Feel free to correct my English
Stanislaw Klekot
Reply With Quote
  #3 (permalink)  
Old 03-30-2005
Jose Maria Lopez Hernandez
 
Posts: n/a
Default Re: enables access to .config

Stachu 'Dozzie' K. wrote:
> On 30.03.2005, Christian Christmann <plfriko@yahoo.de> wrote:
>
>>the linux kernel has the option
>>"Enable access to .config through /proc/config.gz"
>>
>>This allows every user to read the kernel configuration.
>>
>>Is this not dangerous on a public server like one at a
>>university where students connect to via ssh?

>
>
> If you have some kernel configuration options/patches that you wouldn't
> like to show to students, then you should disable this option.
> Did you chmod-ed /usr/src that students can't read
> /usr/src/linux/.config? If not, then enabling this option won't disclose
> any additional information to students.
> After all, if you're using 2.6.x kernel (is it the case?) you can always
> chmod /proc/config.gz.


I just disable it anytime I compile the kernel. I find it's
not useful for anything and it shows all your kernel
configuration. This can be bad if you are using patches like
grsecurity and you don't want to show them to your users.

Regards.

--

Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
jkerouac@bgsec.com
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
-- Jack Kerouac, "On the Road"
Reply With Quote
  #4 (permalink)  
Old 03-30-2005
Rolf Arne Schulze
 
Posts: n/a
Default Re: enables access to .config

On Wed, 30 Mar 2005 13:22:30 +0200, Christian Christmann wrote:
> Is this not dangerous on a public server like one at a
> university where students connect to via ssh?


So don't use the option.

--
Rolf Arne Schulze
Trans-atlantic weightloss challenge: http://tawlc.net/
Min Weblog: http://rolfas.net/
Reply With Quote
  #5 (permalink)  
Old 03-30-2005
Stachu 'Dozzie' K.
 
Posts: n/a
Default Re: enables access to .config

On 30.03.2005, Jose Maria Lopez Hernandez <jkerouac@bgsec.com> wrote:
> Stachu 'Dozzie' K. wrote:
>> On 30.03.2005, Christian Christmann <plfriko@yahoo.de> wrote:
>>
>>>the linux kernel has the option
>>>"Enable access to .config through /proc/config.gz"
>>>
>>>This allows every user to read the kernel configuration.
>>>
>>>Is this not dangerous on a public server like one at a
>>>university where students connect to via ssh?

>>
>>
>> If you have some kernel configuration options/patches that you wouldn't
>> like to show to students, then you should disable this option.
>> Did you chmod-ed /usr/src that students can't read
>> /usr/src/linux/.config? If not, then enabling this option won't disclose
>> any additional information to students.
>> After all, if you're using 2.6.x kernel (is it the case?) you can always
>> chmod /proc/config.gz.

>
> I just disable it anytime I compile the kernel. I find it's
> not useful for anything and it shows all your kernel
> configuration. This can be bad if you are using patches like
> grsecurity and you don't want to show them to your users.


But it might be useful when you have multiple machines, each with
different configuration. Remember that you can do
`chmod 600 /proc/config.gz'. Removing it can be useful only when you
expect that someone can got root on your machine and thus can read
config.gz, but he can also read kernel image from bootdisk, so it can be
not too big help.

--
Feel free to correct my English
Stanislaw Klekot
Reply With Quote
  #6 (permalink)  
Old 03-30-2005
Jose Maria Lopez Hernandez
 
Posts: n/a
Default Re: enables access to .config

Stachu 'Dozzie' K. wrote:
> But it might be useful when you have multiple machines, each with
> different configuration. Remember that you can do
> `chmod 600 /proc/config.gz'. Removing it can be useful only when you
> expect that someone can got root on your machine and thus can read
> config.gz, but he can also read kernel image from bootdisk, so it can be
> not too big help.


Yes it can be useful if you've got multiple machines, but what
I don't see it's the reason to have this data in the kernel. You
can have it in a file in /etc for example.

It could be useful if you've got multiple machines with different
kernels and you change them very often.

But it's all just an opinion.

Regards.

--

Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
jkerouac@bgsec.com
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
-- Jack Kerouac, "On the Road"
Reply With Quote
  #7 (permalink)  
Old 03-30-2005
Unruh
 
Posts: n/a
Default Re: enables access to .config

Jose Maria Lopez Hernandez <jkerouac@bgsec.com> writes:

>Stachu 'Dozzie' K. wrote:
>> But it might be useful when you have multiple machines, each with
>> different configuration. Remember that you can do
>> `chmod 600 /proc/config.gz'. Removing it can be useful only when you
>> expect that someone can got root on your machine and thus can read
>> config.gz, but he can also read kernel image from bootdisk, so it can be
>> not too big help.


>Yes it can be useful if you've got multiple machines, but what
>I don't see it's the reason to have this data in the kernel. You
>can have it in a file in /etc for example.


Under Mandrake, the info is kept in /boot. There is a config file for each
kernel, and a link to the config file for the "vmlinuz" (ie "default")
kernel. They have also switched off the /proc config. That would be useful
however for giving the config file for the currently running kernel
(instead of having to figure out which of the config files in /boot is
actually active at present)


>It could be useful if you've got multiple machines with different
>kernels and you change them very often.


>But it's all just an opinion.


>Regards.


>--


>Jose Maria Lopez Hernandez
>Director Tecnico de bgSEC
>jkerouac@bgsec.com
>bgSEC Seguridad y Consultoria de Sistemas Informaticos
>http://www.bgsec.com
>ESPAÑA


>The only people for me are the mad ones -- the ones who are mad to live,
>mad to talk, mad to be saved, desirous of everything at the same time,
>the ones who never yawn or say a commonplace thing, but burn, burn, burn
>like fabulous yellow Roman candles.
> -- Jack Kerouac, "On the Road"

Reply With Quote
  #8 (permalink)  
Old 03-31-2005
Pierre Asselin
 
Posts: n/a
Default Re: enables access to .config

Jose Maria Lopez Hernandez <jkerouac@bgsec.com> wrote:

> Yes it can be useful if you've got multiple machines, but what
> I don't see it's the reason to have this data in the kernel. You
> can have it in a file in /etc for example.


Even on a single machine it is useful if you have multiple *kernels*.
Not too common on a server, more so on laptops.

--
pa at panix dot com
Reply With Quote
  #9 (permalink)  
Old 03-31-2005
David Serrano (Hue-Bond)
 
Posts: n/a
Default Re: enables access to .config

Stachu 'Dozzie' K., mié20050330@18:41:59(CEST):
> On 30.03.2005, Jose Maria Lopez Hernandez <jkerouac@bgsec.com> wrote:
>>
>> This can be bad if you are using patches like
>> grsecurity and you don't want to show them to your users.


Just use the ACL system ;^).


> Remember that you can do `chmod 600 /proc/config.gz'.


No sense in writing to that file, so 400 would be wiser IMHO.


--
David Serrano
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:28 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0