[lkml]   [2010]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] kernel: make /proc/kallsyms mode 400 to reduce ease of attacking

> On Fri, Nov 19, 2010 at 11:19 AM, Sarah Sharp
> <> wrote:
> >
> > .config and dmesg are attached. The box is running klogd 1.5.5ubuntu3
> > (from Jaunty). Yes, I know that's old. I read the bit in the commit
> > about changing the permissions of kallsyms after boot, but if I can't
> > boot that doesn't help. Perhaps this can be made a configuration
> > option?
> It's not worth a config option.
> If it actually breaks user-space, I think we should just revert it.

User space klogd is what's broken in this case:

ksyms = fopen(KSYMS, "r");

if ( ksyms == NULL )
if ( errno == ENOENT )
Syslog(LOG_INFO, "No module symbols loaded - "
"kernel modules not enabled.\n");
Syslog(LOG_ERR, "Error loading kernel symbols " \
"- %s\n", strerror(errno));

The fclose(NULL) is a bug, as I don't think the standards require
that to be handled gracefully.

> It's kind of sad to default to the world-visible thing,

klogd also gets symbols from, so /proc/kallsyms access
is not a strict requirement.

I haven't checked to see if klogd can work without a symbol source
at all, but I'll wager it can.


 \ /
  Last update: 2010-11-19 22:21    [W:0.043 / U:8.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site