Mailing List Archive

[PATCH 04/**] Properly terminate option struct
The option struct needs to be terminated, otherwise ip{,6}tables
will access illegal memory in merge_options().

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>

---
extensions/libip6t_NFLOG.c | 1 +
extensions/libipt_NFLOG.c | 1 +
2 files changed, 2 insertions(+)

Index: iptables/extensions/libip6t_NFLOG.c
===================================================================
--- iptables.orig/extensions/libip6t_NFLOG.c
+++ iptables/extensions/libip6t_NFLOG.c
@@ -19,6 +19,7 @@ static struct option opts[] = {
{ "nflog-prefix", 1, 0, NFLOG_PREFIX },
{ "nflog-range", 1, 0, NFLOG_RANGE },
{ "nflog-threshold", 1, 0, NFLOG_THRESHOLD },
+ {NULL},
};

static void help(void)
Index: iptables/extensions/libipt_NFLOG.c
===================================================================
--- iptables.orig/extensions/libipt_NFLOG.c
+++ iptables/extensions/libipt_NFLOG.c
@@ -19,6 +19,7 @@ static struct option opts[] = {
{ "nflog-prefix", 1, 0, NFLOG_PREFIX },
{ "nflog-range", 1, 0, NFLOG_RANGE },
{ "nflog-threshold", 1, 0, NFLOG_THRESHOLD },
+ {NULL},
};

static void help(void)
Re: [PATCH 04/**] Properly terminate option struct [ In reply to ]
From: Jan Engelhardt <jengelh@computergmbh.de>

> The option struct needs to be terminated, otherwise ip{,6}tables
> will access illegal memory in merge_options().
>
> Signed-off-by: Jan Engelhardt <jengelh@gmx.de>

nice catch. Applied.

-- Yasuyuki Kozakai