Commit Graph

171 Commits

Author SHA1 Message Date
Jan Engelhardt
2f66755226 Merge branch 'ipp2p' 2008-12-10 16:51:34 +01:00
Jan Engelhardt
d01a5f3d17 ipp2p: ensure better array bounds checking 2008-12-10 16:50:45 +01:00
Jan Engelhardt
bbda3e53da Merge branch 'SYSRQ' 2008-12-10 16:03:13 +01:00
Jan Engelhardt
22e73ea31f xt_SYSRQ: src: prefix variables 2008-12-10 16:02:21 +01:00
Jan Engelhardt
6b37f201d7 xt_SYSRQ: make new code compile for kernel <= 2.6.23 2008-12-10 15:45:43 +01:00
John Haxby
94ecf3847b xt_SYSRQ: improve security
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.

This patch extends the xt_SYSRQ module to avoid both disclosing the
sysrq password and preventing replay. This is done by changing the
request packet from the simple "<key><password>" to a slightly more
complex "<key>,<seqno>,<salt>,<hash>". The hash is the sha1 checksum
of "<key>,<seqno>,<salt>,<password>". A request can be constructed in
a small shell script (see manpage).

Verification of the hash in xt_SYSRQ follows much the same process.
The sequence number, seqno, is initialised to the current time (in
seconds) when the xt_SYSRQ module is loaded and is updated each time
a valid request is received. A request with a sequence number less
than the current sequence number or a wrong hash is silently ignored.
(Using the time for the sequence number assumes (requires) that time
doesn't go backwards on a reboot and that the requester and victim
have reasonably synchronized clocks.)

The random salt is there to prevent pre-computed dictionary attacks
difficult: dictionary attacks are still feasible if you capture a
packet because the hash is computed quickly -- taking perhaps several
milliseconds to compute a more complex hash in xt_SYSRQ when the
machine is unresponsive is probably not the best thing you could do.
However, cracking, say, a random 32 character password would take
some time and is probably beyond what the people in the target
untrustworthy environment are prepared to do or have the resources
for. It almost goes without saying that no two victim machines should
use the same password.

Finally, the module allocates all the resources it need at module
initialisation time on the assumption that if things are going badly
resource allocation is going to be troublesome.
2008-12-02 19:45:22 +01:00
Jan Engelhardt
ee968691d7 ipp2p: fix newline inspection in kazaa
LFCR looks suspect, it should most likely be CRLF.
2008-11-26 00:47:36 +01:00
Jan Engelhardt
22db3bcb9c ipp2p: kazaa code cleanup 2008-11-26 00:46:44 +01:00
Jan Engelhardt
7da803e908 doc: add manpages for xt_ECHO and xt_TEE 2008-11-24 17:42:32 +01:00
Jan Engelhardt
bd99e950f5 ipset: enable building of new modules
Whoops, modules need to be listed in GNUmakefile.in!
(Needed for out-of-srcdir builds.)
2008-11-20 23:08:33 +01:00
Jan Engelhardt
fdb7f34bc8 build: use new vars from automake-tranquility-3 2008-11-20 21:17:42 +01:00
Jan Engelhardt
85e3c24167 build: do not unconditionally install ipset
build_ipset=n was not completely respected and the ipset userspace
parts were still installed. This is now fixed.
2008-11-20 20:19:55 +01:00
Jan Engelhardt
aab8dd360f src: avoid use of _init
Xtables-addons's extensions will always be built as modules, so it is
safe to use __attribute__((constructor)).
2008-11-20 20:00:26 +01:00
Jan Engelhardt
a8f60d0d4b xt_ECHO: compile fix 2008-11-19 17:38:45 +01:00
Jan Engelhardt
5b1bfedb82 Xtables-addons 1.6 v1.6 2008-11-18 18:16:34 +01:00
Jan Engelhardt
ee7e4f5a42 Update for Linux 2.6.28 2008-11-18 12:51:25 +01:00
Jan Engelhardt
d20d1922db ipset: upgrade to ipset 2.4.5 2008-11-18 12:01:59 +01:00
Jan Engelhardt
be6fbee56a src: use NFPROTO_ constants 2008-11-18 11:57:14 +01:00
Jan Engelhardt
3c0b26c4b9 src: add NULL to sentinel struct option 2008-11-18 11:29:57 +01:00
Jan Engelhardt
25e2fbdf7d ipset: upgrade to ipset 2.4.4 2008-11-13 17:46:11 +01:00
Jan Engelhardt
5bd67db123 ipset: upgrade to ipset 2.4.3 2008-11-11 19:36:33 +01:00
Jan Engelhardt
f3737502bd build: use readlink -f
Coreutils 5.x does not know `readlink -e`; we can also use
`readlink -f` instead which is supported by 5.x.
2008-10-16 20:49:21 -04:00
Jan Engelhardt
74e7eb283a ipp2p: parenthesize unaligned-access macros 2008-09-24 12:29:21 -04:00
Jan Engelhardt
f3f0741469 Support for Linux 2.6.17 2008-09-22 13:40:25 -04:00
Jan Engelhardt
9c43965a86 Resolve compiler warnings in xt_ECHO
Reported-by: Jiri Moravec <jim.lkml@gmail.com>
2008-09-19 17:10:23 -04:00
Jan Engelhardt
3a4e719b8c src: compile fixes for 2.6.18 and 2.6.19
I did not test f30793f591 on all
supported kernel versions and noticed too late.
2008-09-01 18:41:45 -04:00
Jan Engelhardt
e87dc5d5e1 Xtables-addons 1.5.7 v1.5.7 2008-09-01 15:35:51 -04:00
Jan Engelhardt
a0d3ee45ea xt_SYSRQ: add missing aliases 2008-09-01 15:33:28 -04:00
Jan Engelhardt
38343af9e6 xt_portscan: IPv6 support 2008-09-01 15:32:15 -04:00
Jan Engelhardt
53abb1e735 src: remove redundant return statements 2008-09-01 15:31:10 -04:00
Jan Engelhardt
8a7354d8d5 build: remove dependency on netinet/in6.h 2008-09-01 15:27:43 -04:00
Jan Engelhardt
f30793f591 DHCP address match and mangler 2008-09-01 15:27:43 -04:00
Jan Engelhardt
ab27472eb4 src: move to a pskb-based API
It occurred that skb reallocation does happen on older kernels, and
those kernels should really be supported, since the patch is really
minimal.
2008-09-01 15:27:43 -04:00
Jan Engelhardt
213acdffda xt_condition: ues glue-provided init_net__proc_net 2008-09-01 15:27:43 -04:00
Jan Engelhardt
a47e6623b8 Merge reworked fuzzy extension 2008-09-01 15:27:11 -04:00
Jan Engelhardt
d894a3dd15 fuzzy: IPv6 support 2008-09-01 15:26:51 -04:00
Jan Engelhardt
75e9afbc4a fuzzy: misc cleanup 2008-09-01 15:26:47 -04:00
Jan Engelhardt
003591fe6f fuzzy: remove unneeded spinlock 2008-09-01 15:22:22 -04:00
Jan Engelhardt
fd83fefad1 fuzzy: import 20050627 code base 2008-09-01 15:22:16 -04:00
Jan Engelhardt
e601fd61f9 Automatically run depmod -a 2008-08-29 07:53:06 -04:00
James King
8fe612e43f ipset: adjust semaphore.h include for kernel >= 2.6.27
As of Linux kernel commit 2351ec533ed0dd56052ab96988d2161d5ecc8ed9,
semaphore.h was moved from asm/ to linux/, which breaks building of
ipset. Add compat glue to ip_set.c to fix building on 2.6.27 an
onwards.
2008-08-28 20:27:09 -04:00
Jan Engelhardt
6737682e82 xt_SYSRQ: fix compilation for Linux kernel version <= 2.6.19 2008-08-28 20:27:09 -04:00
Jan Engelhardt
fd9c6ffb03 Clear hotdrop before use
Must make sure that hotdrop is properly initialized. GCC
unfortunately did not warn.
2008-08-24 16:44:07 -04:00
Jan Engelhardt
4f25eab39d libxt_geoip: reorder option parsing code 2008-08-24 12:34:31 -04:00
Jan Engelhardt
006147a21e build: prepare make tarball for git 1.6.0 2008-08-21 09:26:05 -04:00
Jan Engelhardt
c18fae4f2f Xtables-addons 1.5.5 v1.5.5 2008-08-03 16:29:33 -04:00
Jan Engelhardt
b4784a48e8 cleanup [KM]build layout 2008-08-03 12:30:49 -04:00
Jan Engelhardt
039741e022 SYSRQ target 2008-08-03 12:26:09 -04:00
Jan Engelhardt
74880dd6ca Update license texts 2008-08-02 13:08:48 -04:00
Jan Engelhardt
5956a3354e compat: properly clamp return value from skb_make_writable() 2008-08-02 13:07:22 -04:00