lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.1.10.0806210957140.28924@fbirervta.pbzchgretzou.qr>
Date:	Sun, 29 Jun 2008 16:29:53 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...ozas.de>
To:	Joonwoo Park <joonwpark81@...il.com>
cc:	Patrick McHardy <kaber@...sh.net>, netdev <netdev@...r.kernel.org>,
	netfilter-devel <netfilter-devel@...r.kernel.org>,
	Thomas Graf <tgraf@...g.ch>,
	Pablo Neira Ayuso <pablo@...filter.org>
Subject: Re: [PATCH 6/8] netfilter: fix string extension for case insensitive
 pattern matching


On Saturday 2008-06-21 09:54, Joonwoo Park wrote:

>icase of xt_string_info indicates case [in]sensitive matching.
>netfilter can find cmd.exe, Cmd.exe, cMd.exe and etc easily.
>
>Signed-off-by: Joonwoo Park <joonwpark81@...il.com>
>---
> include/linux/netfilter/xt_string.h |    1 +
> net/netfilter/xt_string.c           |    2 +-
> 2 files changed, 2 insertions(+), 1 deletions(-)
>
>diff --git a/include/linux/netfilter/xt_string.h b/include/linux/netfilter/xt_string.h
>index bb21dd1..dfd347f 100644
>--- a/include/linux/netfilter/xt_string.h
>+++ b/include/linux/netfilter/xt_string.h
>@@ -12,6 +12,7 @@ struct xt_string_info
> 	char 	  pattern[XT_STRING_MAX_PATTERN_SIZE];
> 	u_int8_t  patlen;
> 	u_int8_t  invert;
>+	u_int8_t  icase;
> 
> 	/* Used internally by the kernel */
> 	struct ts_config __attribute__((aligned(8))) *config;

Why not just doing it this way?


enum {
	XT_STRING_INVERT = 1 << 0,
	XT_STRING_ICASE  = 1 << 1,
};

struct xt_string_info {
	...
	union {
		uint8_t invert;
		uint8_t flags;
	};
	...
};

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ