xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: XSA-180 follow-up: repurpose xenconsoled for logging
Date: Tue, 7 Jun 2016 10:57:14 +0100	[thread overview]
Message-ID: <57569A7A.9090703@citrix.com> (raw)
In-Reply-To: <20160606154838.GK14588@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]

On 06/06/16 16:48, Wei Liu wrote:
>> A distro which isn't equipped to deal with these things is of no
>> practical use in the real world.
>>
>> Any distro we care about supporting is equipped to deal with logs.
>>
>>>
>>> I agree that if logging using existing logging systems were workable,
>>> that would be a better solution.  Wei did actually spend a decent chunk
>>> of time looking at other options, including logrotate and journald
>>> before settling on using xenconsoled.
>>>
>>> A lot of this brainstorming and discussion happened off-list because
>>> XSA-180 was still embargoed, so I can understand why it looks like this
>>> came out of nowhere.  It would probably be good for Wei to report here
>>> what he found and why he decided to propose this solution instead.
>>
>> Please do.  Until there is an understanding of why the standard
>> mechanisms are not suitable, it is premature and naive to re-invent a wheel.
>>
> 
> With syslog and logrotate you will still end up filling up your disk.
> Logrotate can't actively rotate log files.

FWIW CentOS 6 and 7 (which use rsyslogd and systemd-journald
respectively) seem to have rate-limiting stuff enabled by default; the
attached program causes a lot of CPU utilization, but no disk resource
exhaustion.

> You can't just tap syslog to QEMU at the moment unless you use the
> script I sent to XSA-180 security@ discussion. That's still a hacked up
> solution.
> 
> I actually don't mind having syslog deal with those, but we need to
> provide some not-so-hacked-up way for doing it.

On Linux, it looks like you can create a socket and "connect" to /dev/log.

 -George


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: syslog-flood.c --]
[-- Type: text/x-csrc; name="syslog-flood.c", Size: 372 bytes --]

#include <syslog.h>
#include <time.h>

int main(int argc, char * argv[]) {
    int rc;
    
    struct timespec tv = { .tv_nsec = 5000 };
    
    openlog("DoS Attempt", 0, LOG_DAEMON);

    while(!(rc = nanosleep(&tv, NULL))) {
        syslog(LOG_ERR, "This is a nasty attempt to DoS syslog\n");
    }

    if(rc) {
        perror("nanosleep");
    }
}

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-06-07  9:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 14:00 XSA-180 follow-up: repurpose xenconsoled for logging Wei Liu
2016-06-03 10:57 ` George Dunlap
2016-06-03 13:30   ` Wei Liu
2016-06-03 14:10     ` George Dunlap
2016-06-03 14:21       ` Wei Liu
2016-06-03 16:57 ` Ian Jackson
2016-06-06 15:56   ` Wei Liu
2016-06-03 17:38 ` Andrew Cooper
2016-06-06 10:12   ` George Dunlap
2016-06-06 13:03     ` Andrew Cooper
2016-06-06 15:48       ` Wei Liu
2016-06-07  9:57         ` George Dunlap [this message]
2016-06-07 10:18           ` Wei Liu
2016-06-06 20:47     ` Doug Goldstein
2016-06-07 11:43       ` Wei Liu
2016-06-21 14:46 ` Wei Liu
2016-06-21 15:10   ` Juergen Gross
2016-06-21 15:23     ` Ian Jackson
2016-06-21 15:11   ` Ian Jackson
2016-06-21 15:53     ` George Dunlap
2016-06-21 16:04       ` Ian Jackson
2016-06-21 16:17         ` George Dunlap
2016-06-22  0:58       ` Jim Fehlig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57569A7A.9090703@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).