<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - nft -c "" segfaults"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1215">1215</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>nft -c "" segfaults
</td>
</tr>
<tr>
<th>Product</th>
<td>nftables
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86_64
</td>
</tr>
<tr>
<th>OS</th>
<td>other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>major
</td>
</tr>
<tr>
<th>Priority</th>
<td>P5
</td>
</tr>
<tr>
<th>Component</th>
<td>nft
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pablo@netfilter.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>najamelan@autistici.org
</td>
</tr></table>
<p>
<div>
<pre>I'm trying to use nft -c to verify an autogenerated variable which is a set of
"ipv4 . port".
But the nft -c utility segfaults. It doesn't seem to segfault when the input is
invalid, I see:
<span class="quote">> nft -c "\;"</span >
Error: syntax error, unexpected junk
\;
^
but:
<span class="quote">> nft -c ";"</span >
fish: “nft -c ";"” terminated by signal SIGSEGV (Address boundary error)
and basically for any other valid input including the empty string.
Journalctl shows:
Stack trace of thread 7337:
#0 0x00007fd0f2abef10 mnl_socket_get_fd (libmnl.so.0)
#1 0x0000557b554d78a3 n/a (nft)
#2 0x0000557b554b68b8 n/a (nft)
#3 0x0000557b554b62c5 n/a (nft)
#4 0x00007fd0f201bf4a __libc_start_main (libc.so.6)
#5 0x0000557b554b654a n/a (nft)
# nft --version
nftables v0.8 (Joe Btfsplk)
# ldd (which nft)
linux-vdso.so.1 (0x00007ffccf0dc000)
libmnl.so.0 => /usr/lib/libmnl.so.0 (0x00007f56823b5000)
libnftnl.so.7 => /usr/lib/libnftnl.so.7 (0x00007f568218b000)
libreadline.so.7 => /usr/lib/libreadline.so.7 (0x00007f5681f3d000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f5681caa000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f56818f3000)
libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007f56816bb000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2
(0x00007f5682834000)
libtinfo.so.6 => /usr/lib/libtinfo.so.6 (0x00007f568148f000)
# uname --all
Linux computer 4.14.13-1-ARCH #1 SMP PREEMPT Wed Jan 10 11:14:50 UTC 2018
x86_64 GNU/Linux
I first ran into nft -c segfaulting when trying to test my set of ip's which is
quite big (about 12000) entries. The core dump was different than for the
little tests shown above. I don't know if it's the same bug, so this is the
core dump:
Stack trace of thread 5796:
#0 0x00007f1d8d726bc0 mnl_nlmsg_batch_is_empty (libmnl.so.0)
#1 0x00007f1d8d5028b1 nftnl_batch_iovec_len (libnftnl.so.7)
#2 0x0000564bd1eb190d n/a (nft)
#3 0x0000564bd1e908b8 n/a (nft)
#4 0x0000564bd1e904e0 n/a (nft)
#5 0x00007f1d8cc82f4a __libc_start_main (libc.so.6)
#6 0x0000564bd1e9054a n/a (nft)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>