Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 31 Mar 2021 19:21:44 -0600
From: Dan Raymond <draymond@...valley.net>
To: Alan Coopersmith <alan.coopersmith@...cle.com>,
 libc-coord@...ts.openwall.com,
 Adhemerval Zanella <adhemerval.zanella@...aro.org>,
 libc-alpha@...rceware.org, Rich Felker <dalias@...c.org>
Subject: Re: syslog and LOG_KERN - Re: [PATCH] Bug
 3604: fix calls to openlog() with LOG_KERN facility


On 3/31/2021 1:44 PM, Alan Coopersmith wrote:
> On 3/31/21 12:27 PM, Adhemerval Zanella wrote:
>> Not allowing LOG_KERN by any user process seems to be de facto behavior
>> on all systems I am aware of:
>>
>>    * FreeBSD and MUSL explicit set to previous log facility (they check
>>      if the priority against a mask and since on both LOG_KERN is 0 is
>>      set to the previous/default value).
>>
>>    * Solaris 11.4 man page explicit says:
>>
>>         LOG_KERN      Messages generated by the kernel. These cannot 
>> be  gener-
>>                       ated by any user processes.
>
> The Solaris implementation is similar to FreeBSD & MUSL - LOG_KERN is 0,
> so appears the same to syslog() as not specifying a facility and letting
> the default value be used.


It's a fair point that even with this patch the user can't explicitly 
specify LOG_KERN during a call to syslog().  To use LOG_KERN they must 
call openlog() first and set it as the default facility.  That's a 
little clumsy but it is good enough to fix the klogd implementation in 
busybox.  What is the alternative?  To rewrite klogd so it bypasses 
syslog() altogether and writes directly to the syslogd socket?  That 
seems inefficient and doesn't really achieve any security.  If klogd can 
do this any user process can do it too.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.