<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 - v0.9.0: segfault when using nft -f <file> and issuing "ruleset flush" twice"
   href="https://bugzilla.netfilter.org/show_bug.cgi?id=1424">1424</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>v0.9.0: segfault when using nft -f <file> and issuing "ruleset flush" twice
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>nftables
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Debian GNU/Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </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>eexexiexit@riseup.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=591" name="attach_591" title="strace output of the script that segfaults">attachment 591</a> <a href="attachment.cgi?id=591&action=edit" title="strace output of the script that segfaults">[details]</a></span>
strace output of the script that segfaults

Disclaimer: I am totally new to nftable, so forbid my stupidity.

Running this file segfaults on two of my machines (both debian stable
"buster"):

/tmp/test:

#!/usr/sbin/nft -f
flush ruleset
create table inet fw
list table inet fw
flush ruleset

the same command sequence runs smoothly when issued interactively.

kernel message:

[ 8841.187933] show_signal_msg: 12 callbacks suppressed
[ 8841.187936] test[17806]: segfault at 10 ip 00007f175a76929b sp
00007ffc67e5c940 error 4 in libnftables.so.0.0.0[7f175a763000+47000]
[ 8841.190580] Code: ff 48 8b 44 24 28 64 48 33 04 25 28 00 00 00 75 06 48 83
c4 30 5b c3 e8 53 a9 ff ff 0f 1f 00 41 56 41 55 41 54 49 89 fc 55 53 <8b> 7f 10
48 89 f3 e8 2a be ff ff 49 8b 4c 24 40 48 8d 35 e9 0f 04
Segmentation fault

uname -a:

Linux something 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08)
x86_64 GNU/Linux

Linux otherthing 4.19.0-8-686-pae #1 SMP Debian 4.19.98-1 (2020-01-26) i686
GNU/Linux

/usr/sbin/nft --version:
nftables v0.9.0 (Fearless Fosdick)

strace is attached.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>