netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Haxby <john.haxby@oracle.com>
To: Patrick McHardy <kaber@trash.net>
Cc: Jan Engelhardt <jengelh@medozas.de>,
	Netfilter Development Mailinglist
	<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] More secure SYSRQ for xtables-addons
Date: Tue, 02 Dec 2008 09:43:36 +0000	[thread overview]
Message-ID: <49350348.1070008@oracle.com> (raw)
In-Reply-To: <493491D3.50708@trash.net>

Patrick McHardy wrote:
> John Haxby wrote:
>> Rationale:
>>
>> I want to be able to use SYSRQ to reboot, crash or partially diagnose 
>> machines that become unresponsive for one reason or another.   These 
>> machines, typically, are blades or rack mounted machines that do not 
>> have a PS/2 connection for a keyboard and the old method of wheeling 
>> round a "crash trolley" that has a monitor and a keyboard on it no 
>> longer works:  USB keyboards rarely, if ever, work because by the 
>> time the machine is responding only to a ping, udev is incapable of 
>> setting up a new keyboard.g/majordomo-info.html
>
> This module is starting to look kind of useful. Maybe its time for
> a resubmission for review and possibly merging once these patches
> are included.
>
That's nice to hear!

> If we were to merge it, it would also be good to get some feedback
> from the crypto guys about whether the chosen authentication scheme
> meets its claims.

I agree.   I've talked this through with some people, but it needs some 
proper thought.    The weaknesses that I've identified are these:

 * The password can be recovered with an off-line dictionary attack.  
This is mitigated by using a good salt: in my example in the man page I 
use a 96 bit salt (dd bs=12 count=1 if=/dev/urandom) which makes a 
pre-computed dictionary attack difficult without large resources.  
However, a normal exhaustive search using the common password cracking 
techniques will yield a poorly chosen password fairly quickly.

 * The sha-1 hash is thought to be weak under some circumstances which 
makes its use for new cryptographic applications inappropriate.   The 
weaknesses, however, seem to be that SHA-1 is not good for digital 
signatures, but it would seem good enough for this purpose.  On the 
other hand, making the hash algorithm a module parameter so that it can 
be swapped out should SHA-1 prove unsuitable is straightforward (and I 
should probably do that).

 * If two machines have the same password then the mechanism is subject 
to a simple replay attack.   An attacker simply needs to capture the 
packet and send it to each of the possible target machines and see which 
ones crash :-)

 * A replay attack is possible on a single machine if the clock goes 
backwards (for example, on a reboot if the hardware clock is not UTC and 
the system time is not correctly set on boot).

 * xt_SYSRQ spamming could cause a DoS attack: simply spewing an endless 
stream of requests could tie up enough CPU resources to cause trouble.


All these attacks can be mitigated by good practices: using good, random 
passwords; changing the password(s) after an usage episode; changing the 
password(s) frequently anyway and so on.   Of course, stopping access to 
port 9 (or whatever) at a boundary and limiting the frequency of 
xt_SYSRQ requests almost goes without saying.

jch

  parent reply	other threads:[~2008-12-02  9:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-27 12:28 [PATCH] More secure SYSRQ for xtables-addons John Haxby
2008-12-01 19:34 ` Jan Engelhardt
2008-12-01 22:02   ` John Haxby
2008-12-01 22:37     ` Jan Engelhardt
2008-12-01 22:40     ` sg_set_page not usable for .bss? Jan Engelhardt
2008-12-02  0:10       ` David Miller
2008-12-02  0:13         ` Jan Engelhardt
2008-12-02  0:14           ` David Miller
2008-12-02  1:41             ` Jan Engelhardt
2008-12-02  6:55               ` David Miller
2008-12-02  1:39 ` [PATCH] More secure SYSRQ for xtables-addons Patrick McHardy
2008-12-02  1:53   ` Jan Engelhardt
2008-12-02  9:43   ` John Haxby [this message]
2008-12-02 17:46 ` John Haxby
2008-12-12  8:38   ` John Haxby
2008-12-13 22:14     ` Jan Engelhardt
2008-12-15 12:09       ` Jan Engelhardt

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=49350348.1070008@oracle.com \
    --to=john.haxby@oracle.com \
    --cc=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.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).