<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:fw@strlen.de" title="Florian Westphal <fw@strlen.de>"> <span class="fn">Florian Westphal</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - coredump when parsing ip protocol with number > 6"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1072">bug 1072</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>fw@strlen.de
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - coredump when parsing ip protocol with number > 6"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1072#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - coredump when parsing ip protocol with number > 6"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1072">bug 1072</a>
from <span class="vcard"><a class="email" href="mailto:fw@strlen.de" title="Florian Westphal <fw@strlen.de>"> <span class="fn">Florian Westphal</span></a>
</span></b>
<pre>(In reply to frederik.schwan from <a href="show_bug.cgi?id=1072#c0">comment #0</a>)
<span class="quote">> My goal: filter GRE (IP proto 47) traffic
> This rule gives me a coredump when I try to load it:
> ip protocol 47 ip saddr x.x.x.x accept</span >
Thanks, this is a regression from 0.5 when we don't have
the higher-level protocol.
Fix is
diff --git a/src/payload.c b/src/payload.c
--- a/src/payload.c
+++ b/src/payload.c
@@ -85,6 +85,9 @@ static void payload_expr_pctx_update(struct proto_ctx *ctx,
base = ctx->protocol[left->payload.base].desc;
desc = proto_find_upper(base, proto);
+ if (!desc)
+ return;
+
assert(desc->base <= PROTO_BASE_MAX);
if (desc->base == base->base) {
assert(base->length > 0);
I'll send a patch.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>